| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <?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.FastGptChatReplaceTextMapper">
- <resultMap type="FastGptChatReplaceText" id="FastGptChatReplaceTextResult">
- <result property="id" column="id" />
- <result property="type" column="type" />
- <result property="content" column="content" />
- <result property="changeCount" column="change_count" />
- <result property="status" column="status" />
- <result property="sort" column="sort" />
- <result property="createTime" column="create_time" />
- </resultMap>
- <sql id="selectFastGptChatReplaceTextVo">
- select id, type, content, change_count, status, sort, create_time from fastgpt_chat_replace_text
- </sql>
- <select id="selectFastGptChatReplaceTextList" parameterType="FastGptChatReplaceText" resultMap="FastGptChatReplaceTextResult">
- <include refid="selectFastGptChatReplaceTextVo"/>
- <where>
- <if test="type != null "> and type = #{type}</if>
- <if test="content != null and content != ''"> and content like concat('%', #{content}, '%')</if>
- <if test="status != null "> and status = #{status}</if>
- <if test="sort != null "> and sort = #{sort}</if>
- </where>
- order by sort desc,id desc
- </select>
- <select id="selectFastGptChatReplaceTextById" parameterType="Long" resultMap="FastGptChatReplaceTextResult">
- <include refid="selectFastGptChatReplaceTextVo"/>
- where id = #{id}
- </select>
- <insert id="insertFastGptChatReplaceText" parameterType="FastGptChatReplaceText" useGeneratedKeys="true" keyProperty="id">
- insert into fastgpt_chat_replace_text
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="type != null">type,</if>
- <if test="content != null">content,</if>
- <if test="changeCount != null">change_count,</if>
- <if test="status != null">status,</if>
- <if test="sort != null">sort,</if>
- <if test="createTime != null">create_time,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="type != null">#{type},</if>
- <if test="content != null">#{content},</if>
- <if test="changeCount != null">#{changeCount},</if>
- <if test="status != null">#{status},</if>
- <if test="sort != null">#{sort},</if>
- <if test="createTime != null">#{createTime},</if>
- </trim>
- </insert>
- <update id="updateFastGptChatReplaceText" parameterType="FastGptChatReplaceText">
- update fastgpt_chat_replace_text
- <trim prefix="SET" suffixOverrides=",">
- <if test="type != null">type = #{type},</if>
- <if test="content != null">content = #{content},</if>
- <if test="changeCount != null">change_count = #{changeCount},</if>
- <if test="status != null">status = #{status},</if>
- <if test="sort != null">sort = #{sort},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteFastGptChatReplaceTextById" parameterType="Long">
- delete from fastgpt_chat_replace_text where id = #{id}
- </delete>
- <delete id="deleteFastGptChatReplaceTextByIds" parameterType="String">
- delete from fastgpt_chat_replace_text where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|