FastgptChatVoiceHomoMapper.xml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.fs.fastGpt.mapper.FastgptChatVoiceHomoMapper">
  6. <resultMap type="FastgptChatVoiceHomo" id="FastgptChatVoiceHomoResult">
  7. <result property="id" column="id" />
  8. <result property="content" column="content" />
  9. <result property="changeCount" column="change_count" />
  10. <result property="companyId" column="company_id" />
  11. <result property="createTime" column="create_time" />
  12. </resultMap>
  13. <sql id="selectFastgptChatVoiceHomoVo">
  14. select id, content, change_count, company_id, create_time from fastgpt_chat_voice_homo
  15. </sql>
  16. <select id="selectFastgptChatVoiceHomoList" parameterType="FastgptChatVoiceHomo" resultMap="FastgptChatVoiceHomoResult">
  17. <include refid="selectFastgptChatVoiceHomoVo"/>
  18. <where>
  19. <if test="content != null and content != ''"> and content = #{content}</if>
  20. <if test="changeCount != null and changeCount != ''"> and change_count = #{changeCount}</if>
  21. <if test="companyId != null "> and company_id = #{companyId}</if>
  22. </where>
  23. </select>
  24. <select id="selectFastgptChatVoiceHomoById" parameterType="Long" resultMap="FastgptChatVoiceHomoResult">
  25. <include refid="selectFastgptChatVoiceHomoVo"/>
  26. where id = #{id}
  27. </select>
  28. <insert id="insertFastgptChatVoiceHomo" parameterType="FastgptChatVoiceHomo">
  29. insert into fastgpt_chat_voice_homo
  30. <trim prefix="(" suffix=")" suffixOverrides=",">
  31. <if test="id != null">id,</if>
  32. <if test="content != null">content,</if>
  33. <if test="changeCount != null">change_count,</if>
  34. <if test="companyId != null">company_id,</if>
  35. <if test="createTime != null">create_time,</if>
  36. </trim>
  37. <trim prefix="values (" suffix=")" suffixOverrides=",">
  38. <if test="id != null">#{id},</if>
  39. <if test="content != null">#{content},</if>
  40. <if test="changeCount != null">#{changeCount},</if>
  41. <if test="companyId != null">#{companyId},</if>
  42. <if test="createTime != null">#{createTime},</if>
  43. </trim>
  44. </insert>
  45. <update id="updateFastgptChatVoiceHomo" parameterType="FastgptChatVoiceHomo">
  46. update fastgpt_chat_voice_homo
  47. <trim prefix="SET" suffixOverrides=",">
  48. <if test="content != null">content = #{content},</if>
  49. <if test="changeCount != null">change_count = #{changeCount},</if>
  50. <if test="companyId != null">company_id = #{companyId},</if>
  51. <if test="createTime != null">create_time = #{createTime},</if>
  52. </trim>
  53. where id = #{id}
  54. </update>
  55. <delete id="deleteFastgptChatVoiceHomoById" parameterType="Long">
  56. delete from fastgpt_chat_voice_homo where id = #{id}
  57. </delete>
  58. <delete id="deleteFastgptChatVoiceHomoByIds" parameterType="String">
  59. delete from fastgpt_chat_voice_homo where id in
  60. <foreach item="id" collection="array" open="(" separator="," close=")">
  61. #{id}
  62. </foreach>
  63. </delete>
  64. </mapper>