| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <?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.fs.fastGpt.mapper.FastGptChatMsgLogsMapper">
-
- <resultMap type="FastGptChatMsgLogs" id="FastGptChatMsgLogsResult">
- <result property="logsId" column="logs_id" />
- <result property="msgId" column="msg_id" />
- <result property="logsType" column="logs_type" />
- <result property="content" column="content" />
- <result property="companyUserId" column="company_user_id" />
- <result property="createTime" column="create_time" />
- <result property="sContent" column="s_content" />
- <result property="userContent" column="user_content" />
- <result property="createBy" column="create_by" />
- <result property="companyId" column="company_id" />
- </resultMap>
- <sql id="selectFastGptChatMsgLogsVo">
- select logs_id, msg_id, logs_type, content, company_user_id, create_time, s_content, user_content, create_by, company_id from fastgpt_chat_msg_logs
- </sql>
- <select id="selectFastGptChatMsgLogsList" parameterType="FastGptChatMsgLogs" resultMap="FastGptChatMsgLogsResult">
- <include refid="selectFastGptChatMsgLogsVo"/>
- <where>
- <if test="msgId != null "> and msg_id = #{msgId}</if>
- <if test="logsType != null "> and logs_type = #{logsType}</if>
- <if test="content != null and content != ''"> and content = #{content}</if>
- <if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
- <if test="sContent != null and sContent != ''"> and s_content = #{sContent}</if>
- <if test="userContent != null and userContent != ''"> and user_content = #{userContent}</if>
- <if test="companyId != null "> and company_id = #{companyId}</if>
- </where>
- </select>
-
- <select id="selectFastGptChatMsgLogsByLogsId" parameterType="Long" resultMap="FastGptChatMsgLogsResult">
- <include refid="selectFastGptChatMsgLogsVo"/>
- where logs_id = #{logsId}
- </select>
-
- <insert id="insertFastGptChatMsgLogs" parameterType="FastGptChatMsgLogs" useGeneratedKeys="true" keyProperty="logsId">
- insert into fastgpt_chat_msg_logs
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="msgId != null">msg_id,</if>
- <if test="logsType != null">logs_type,</if>
- <if test="content != null">content,</if>
- <if test="companyUserId != null">company_user_id,</if>
- <if test="createTime != null">create_time,</if>
- <if test="sContent != null">s_content,</if>
- <if test="userContent != null">user_content,</if>
- <if test="createBy != null">create_by,</if>
- <if test="companyId != null">company_id,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="msgId != null">#{msgId},</if>
- <if test="logsType != null">#{logsType},</if>
- <if test="content != null">#{content},</if>
- <if test="companyUserId != null">#{companyUserId},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="sContent != null">#{sContent},</if>
- <if test="userContent != null">#{userContent},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="companyId != null">#{companyId},</if>
- </trim>
- </insert>
- <update id="updateFastGptChatMsgLogs" parameterType="FastGptChatMsgLogs">
- update fastgpt_chat_msg_logs
- <trim prefix="SET" suffixOverrides=",">
- <if test="msgId != null">msg_id = #{msgId},</if>
- <if test="logsType != null">logs_type = #{logsType},</if>
- <if test="content != null">content = #{content},</if>
- <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="sContent != null">s_content = #{sContent},</if>
- <if test="userContent != null">user_content = #{userContent},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="companyId != null">company_id = #{companyId},</if>
- </trim>
- where logs_id = #{logsId}
- </update>
- <delete id="deleteFastGptChatMsgLogsByLogsId" parameterType="Long">
- delete from fastgpt_chat_msg_logs where logs_id = #{logsId}
- </delete>
- <delete id="deleteFastGptChatMsgLogsByLogsIds" parameterType="String">
- delete from fastgpt_chat_msg_logs where logs_id in
- <foreach item="logsId" collection="array" open="(" separator="," close=")">
- #{logsId}
- </foreach>
- </delete>
- </mapper>
|