|
@@ -0,0 +1,76 @@
|
|
|
+<?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.FastgptChatArtificialWordsMapper">
|
|
|
+
|
|
|
+ <resultMap type="FastgptChatArtificialWords" id="FastgptChatArtificialWordsResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="type" column="type" />
|
|
|
+ <result property="content" column="content" />
|
|
|
+ <result property="status" column="status" />
|
|
|
+ <result property="sort" column="sort" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectFastgptChatArtificialWordsVo">
|
|
|
+ select id, `type`, content, status, sort, create_time from fastgpt_chat_artificial_words
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectFastgptChatArtificialWordsList" parameterType="FastgptChatArtificialWords" resultMap="FastgptChatArtificialWordsResult">
|
|
|
+ <include refid="selectFastgptChatArtificialWordsVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="type != null "> and `type` = #{type}</if>
|
|
|
+ <if test="content != null and content != ''"> and content = #{content}</if>
|
|
|
+ <if test="status != null "> and status = #{status}</if>
|
|
|
+ <if test="sort != null "> and sort = #{sort}</if>
|
|
|
+ </where>
|
|
|
+ order by sort asc,id desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectFastgptChatArtificialWordsById" parameterType="Long" resultMap="FastgptChatArtificialWordsResult">
|
|
|
+ <include refid="selectFastgptChatArtificialWordsVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertFastgptChatArtificialWords" parameterType="FastgptChatArtificialWords" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into fastgpt_chat_artificial_words
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="type != null">`type`,</if>
|
|
|
+ <if test="content != null">content,</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="status != null">#{status},</if>
|
|
|
+ <if test="sort != null">#{sort},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateFastgptChatArtificialWords" parameterType="FastgptChatArtificialWords">
|
|
|
+ update fastgpt_chat_artificial_words
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="type != null">type = #{type},</if>
|
|
|
+ <if test="content != null">content = #{content},</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="deleteFastgptChatArtificialWordsById" parameterType="Long">
|
|
|
+ delete from fastgpt_chat_artificial_words where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteFastgptChatArtificialWordsByIds" parameterType="String">
|
|
|
+ delete from fastgpt_chat_artificial_words where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|