用户结构修改以及openai获取客户端令牌

This commit is contained in:
2025-11-01 23:40:44 +08:00
parent ac4b144ad5
commit db72d08b98
20 changed files with 250 additions and 502 deletions

View File

@@ -0,0 +1,131 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vetti.hotake.mapper.HotakeSysFileMapper">
<resultMap type="HotakeSysFile" id="HotakeSysFileResult">
<result property="id" column="id" />
<result property="minioBucketName" column="minio_bucket_name" />
<result property="code" column="code" />
<result property="fileName" column="file_name" />
<result property="fileType" column="file_type" />
<result property="fileSize" column="file_size" />
<result property="storagePath" column="storage_path" />
<result property="fileMd5" column="file_md5" />
<result property="uploadPlatform" column="upload_platform" />
<result property="available" column="available" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectHotakeSysFileVo">
select id, minio_bucket_name, code, file_name, file_type, file_size, storage_path, file_md5, upload_platform, available, create_by, create_time, update_by, update_time, remark from hotake_sys_file
</sql>
<select id="selectHotakeSysFileList" parameterType="HotakeSysFile" resultMap="HotakeSysFileResult">
<include refid="selectHotakeSysFileVo"/>
<where>
<if test="minioBucketName != null and minioBucketName != ''"> and minio_bucket_name = #{minioBucketName}</if>
<if test="code != null and code != ''"> and code = #{code}</if>
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
<if test="fileType != null and fileType != ''"> and file_type = #{fileType}</if>
<if test="fileSize != null "> and file_size = #{fileSize}</if>
<if test="storagePath != null and storagePath != ''"> and storage_path = #{storagePath}</if>
<if test="fileMd5 != null and fileMd5 != ''"> and file_md5 = #{fileMd5}</if>
<if test="uploadPlatform != null "> and upload_platform = #{uploadPlatform}</if>
<if test="available != null "> and available = #{available}</if>
</where>
</select>
<select id="selectHotakeSysFileById" parameterType="Long" resultMap="HotakeSysFileResult">
<include refid="selectHotakeSysFileVo"/>
where id = #{id}
</select>
<insert id="insertHotakeSysFile" parameterType="HotakeSysFile" useGeneratedKeys="true" keyProperty="id">
insert into Hotake_sys_file
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="minioBucketName != null and minioBucketName != ''">minio_bucket_name,</if>
<if test="code != null and code != ''">code,</if>
<if test="fileName != null and fileName != ''">file_name,</if>
<if test="fileType != null and fileType != ''">file_type,</if>
<if test="fileSize != null">file_size,</if>
<if test="storagePath != null and storagePath != ''">storage_path,</if>
<if test="fileMd5 != null">file_md5,</if>
<if test="uploadPlatform != null">upload_platform,</if>
<if test="available != null">available,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="minioBucketName != null and minioBucketName != ''">#{minioBucketName},</if>
<if test="code != null and code != ''">#{code},</if>
<if test="fileName != null and fileName != ''">#{fileName},</if>
<if test="fileType != null and fileType != ''">#{fileType},</if>
<if test="fileSize != null">#{fileSize},</if>
<if test="storagePath != null and storagePath != ''">#{storagePath},</if>
<if test="fileMd5 != null">#{fileMd5},</if>
<if test="uploadPlatform != null">#{uploadPlatform},</if>
<if test="available != null">#{available},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateHotakeSysFile" parameterType="HotakeSysFile">
update Hotake_sys_file
<trim prefix="SET" suffixOverrides=",">
<if test="minioBucketName != null and minioBucketName != ''">minio_bucket_name = #{minioBucketName},</if>
<if test="code != null and code != ''">code = #{code},</if>
<if test="fileName != null and fileName != ''">file_name = #{fileName},</if>
<if test="fileType != null and fileType != ''">file_type = #{fileType},</if>
<if test="fileSize != null">file_size = #{fileSize},</if>
<if test="storagePath != null and storagePath != ''">storage_path = #{storagePath},</if>
<if test="fileMd5 != null">file_md5 = #{fileMd5},</if>
<if test="uploadPlatform != null">upload_platform = #{uploadPlatform},</if>
<if test="available != null">available = #{available},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteHotakeSysFileById" parameterType="Long">
delete from Hotake_sys_file where id = #{id}
</delete>
<delete id="deleteHotakeSysFileByIds" parameterType="String">
delete from Hotake_sys_file where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<insert id="batchInsertHotakeSysFile">
insert into Hotake_sys_file( id, minio_bucket_name, code, file_name, file_type, file_size, storage_path, file_md5, upload_platform, available, create_by, create_time, update_by, update_time, remark,) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.id}, #{item.minioBucketName}, #{item.code}, #{item.fileName}, #{item.fileType}, #{item.fileSize}, #{item.storagePath}, #{item.fileMd5}, #{item.uploadPlatform}, #{item.available}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark},)
</foreach>
</insert>
<select id="selectHotakeSysFileByIds" parameterType="String" resultMap="HotakeSysFileResult">
<include refid="selectHotakeSysFileVo"/> where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</select>
</mapper>

View File

@@ -0,0 +1,145 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vetti.hotake.mapper.HotakeSysNoticeMapper">
<resultMap type="HotakeSysNotice" id="HotakeSysNoticeResult">
<result property="id" column="id"/>
<result property="noticeTypeId" column="notice_type_id"/>
<result property="cvId" column="cv_id"/>
<result property="noticeTitle" column="notice_title"/>
<result property="noticeContent" column="notice_content"/>
<result property="sendUserId" column="send_user_id"/>
<result property="receiveUserId" column="receive_user_id"/>
<result property="isView" column="is_view"/>
<result property="imagePath" column="image_path" typeHandler="com.vetti.common.handle.JsonTypeHandler"/>
<result property="isDel" column="is_del"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/>
</resultMap>
<sql id="selectHotakeSysNoticeVo">
select id,
notice_type_id,
cv_id,
notice_title,
notice_content,
send_user_id,
receive_user_id,
is_view,
is_del,
create_by,
create_time,
update_by,
update_time,
remark
from hotake_sys_notice
</sql>
<select id="selectHotakeSysNoticeList" parameterType="HotakeSysNotice" resultMap="HotakeSysNoticeResult">
<include refid="selectHotakeSysNoticeVo"/>
<where>
<if test="noticeTypeId != null ">and notice_type_id = #{noticeTypeId}</if>
<if test="cvId != null ">and cv_id = #{cvId}</if>
<if test="noticeTitle != null and noticeTitle != ''">and notice_title = #{noticeTitle}</if>
<if test="noticeContent != null and noticeContent != ''">and notice_content = #{noticeContent}</if>
<if test="sendUserId != null ">and send_user_id = #{sendUserId}</if>
<if test="receiveUserId != null ">and receive_user_id = #{receiveUserId}</if>
<if test="isView != null and isView != ''">and is_view = #{isView}</if>
<if test="isDel != null and isDel != ''">and is_del = #{isDel}</if>
</where>
</select>
<select id="selectHotakeSysNoticeById" parameterType="Long" resultMap="HotakeSysNoticeResult">
<include refid="selectHotakeSysNoticeVo"/>
where id = #{id}
</select>
<insert id="insertHotakeSysNotice" parameterType="HotakeSysNotice" useGeneratedKeys="true" keyProperty="id">
insert into hotake_sys_notice
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="noticeTypeId != null">notice_type_id,</if>
<if test="cvId != null">cv_id,</if>
<if test="noticeTitle != null">notice_title,</if>
<if test="noticeContent != null">notice_content,</if>
<if test="sendUserId != null">send_user_id,</if>
<if test="receiveUserId != null">receive_user_id,</if>
<if test="isView != null">is_view,</if>
<if test="imagePath != null">image_path,</if>
<if test="isDel != null">is_del,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="noticeTypeId != null">#{noticeTypeId},</if>
<if test="cvId != null">#{cvId},</if>
<if test="noticeTitle != null">#{noticeTitle},</if>
<if test="noticeContent != null">#{noticeContent},</if>
<if test="sendUserId != null">#{sendUserId},</if>
<if test="receiveUserId != null">#{receiveUserId},</if>
<if test="isView != null">#{isView},</if>
<if test="imagePath != null">#{imagePath, typeHandler=com.vetti.common.handle.JsonTypeHandler},</if>
<if test="isDel != null">#{isDel},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateHotakeSysNotice" parameterType="HotakeSysNotice">
update hotake_sys_notice
<trim prefix="SET" suffixOverrides=",">
<if test="noticeTypeId != null">notice_type_id = #{noticeTypeId},</if>
<if test="cvId != null">cv_id = #{cvId},</if>
<if test="noticeTitle != null">notice_title = #{noticeTitle},</if>
<if test="noticeContent != null">notice_content = #{noticeContent},</if>
<if test="sendUserId != null">send_user_id = #{sendUserId},</if>
<if test="receiveUserId != null">receive_user_id = #{receiveUserId},</if>
<if test="isView != null">is_view = #{isView},</if>
<if test="imagePath != null">image_path =
#{imagePath, typeHandler=com.vetti.common.handle.JsonTypeHandler},
</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteHotakeSysNoticeById" parameterType="Long">
delete
from hotake_sys_notice
where id = #{id}
</delete>
<delete id="deleteHotakeSysNoticeByIds" parameterType="String">
delete from hotake_sys_notice where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<insert id="batchInsertHotakeSysNotice">
insert into hotake_sys_notice( id, notice_type_id, cv_id, notice_title, notice_content, send_user_id,
receive_user_id, is_view,image_path, is_del, create_by, create_time, update_by, update_time, remark,) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.id}, #{item.noticeTypeId}, #{item.cvId}, #{item.noticeTitle}, #{item.noticeContent},
#{item.sendUserId}, #{item.receiveUserId},
#{item.isView},#{item.imagePath, typeHandler=com.vetti.common.handle.JsonTypeHandler}, #{item.isDel},
#{item.createBy},
#{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark},)
</foreach>
</insert>
</mapper>

View File

@@ -0,0 +1,5 @@
#Generated by Maven
#Sat Nov 01 22:10:37 CST 2025
artifactId=vetti-hotakes
groupId=com.vetti
version=3.9.0

View File

@@ -0,0 +1,6 @@
com/vetti/hotake/service/impl/HotakeSysNoticeServiceImpl.class
com/vetti/hotake/domain/dto/HotakeSysNoticeViewDto.class
com/vetti/hotake/service/IHotakeSysNoticeService.class
com/vetti/hotake/domain/HotakeSysNotice.class
com/vetti/hotake/domain/dto/HotakeSysNoticeDto.class
com/vetti/hotake/mapper/HotakeSysNoticeMapper.class

View File

@@ -0,0 +1,2 @@
/Users/wangxiangshun/Public/project-aio/vetti/vetti-service/vetti-ai/src/main/java/com/vetti/ai/service/ChatCommonService.java
/Users/wangxiangshun/Public/project-aio/vetti/vetti-service/vetti-ai/src/main/java/com/vetti/ai/service/impl/ChatCommonServiceImpl.java