AiSipCallLlmAgentAccountMapper.xml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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.aiSipCall.mapper.AiSipCallLlmAgentAccountMapper">
  6. <resultMap type="AiSipCallLlmAgentAccount" id="AiSipCallLlmAgentAccountResult">
  7. <result property="id" column="id" />
  8. <result property="accountJson" column="account_json" />
  9. <result property="providerClassName" column="provider_class_name" />
  10. <result property="name" column="name" />
  11. <result property="accountEntity" column="account_entity" />
  12. <result property="interruptFlag" column="interrupt_flag" />
  13. <result property="interruptKeywords" column="interrupt_keywords" />
  14. <result property="interruptIgnoreKeywords" column="interrupt_ignore_keywords" />
  15. <result property="intentionTips" column="intention_tips" />
  16. <result property="concurrentNum" column="concurrent_num" />
  17. <result property="transferManualDigit" column="transfer_manual_digit" />
  18. <result property="kbCatId" column="kb_cat_id" />
  19. <result property="remoteLlmAgentAccountId" column="remote_llm_agent_account_id" />
  20. </resultMap>
  21. <sql id="selectAiSipCallLlmAgentAccountVo">
  22. select id, account_json, provider_class_name, name, account_entity, interrupt_flag, interrupt_keywords, interrupt_ignore_keywords, intention_tips, concurrent_num, transfer_manual_digit, kb_cat_id, remote_llm_agent_account_id from ai_sip_call_llm_agent_account
  23. </sql>
  24. <select id="selectAiSipCallLlmAgentAccountList" parameterType="AiSipCallLlmAgentAccount" resultMap="AiSipCallLlmAgentAccountResult">
  25. <include refid="selectAiSipCallLlmAgentAccountVo"/>
  26. <where>
  27. <if test="accountJson != null and accountJson != ''"> and account_json = #{accountJson}</if>
  28. <if test="providerClassName != null and providerClassName != ''"> and provider_class_name like concat('%', #{providerClassName}, '%')</if>
  29. <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
  30. <if test="accountEntity != null and accountEntity != ''"> and account_entity = #{accountEntity}</if>
  31. <if test="interruptFlag != null "> and interrupt_flag = #{interruptFlag}</if>
  32. <if test="interruptKeywords != null and interruptKeywords != ''"> and interrupt_keywords = #{interruptKeywords}</if>
  33. <if test="interruptIgnoreKeywords != null and interruptIgnoreKeywords != ''"> and interrupt_ignore_keywords = #{interruptIgnoreKeywords}</if>
  34. <if test="intentionTips != null and intentionTips != ''"> and intention_tips = #{intentionTips}</if>
  35. <if test="concurrentNum != null "> and concurrent_num = #{concurrentNum}</if>
  36. <if test="transferManualDigit != null and transferManualDigit != ''"> and transfer_manual_digit = #{transferManualDigit}</if>
  37. <if test="kbCatId != null "> and kb_cat_id = #{kbCatId}</if>
  38. <if test="remoteLlmAgentAccountId != null "> and remote_llm_agent_account_id = #{remoteLlmAgentAccountId}</if>
  39. </where>
  40. </select>
  41. <select id="selectAiSipCallLlmAgentAccountById" parameterType="Long" resultMap="AiSipCallLlmAgentAccountResult">
  42. <include refid="selectAiSipCallLlmAgentAccountVo"/>
  43. where id = #{id}
  44. </select>
  45. <insert id="insertAiSipCallLlmAgentAccount" parameterType="AiSipCallLlmAgentAccount" useGeneratedKeys="true" keyProperty="id">
  46. insert into ai_sip_call_llm_agent_account
  47. <trim prefix="(" suffix=")" suffixOverrides=",">
  48. <if test="accountJson != null">account_json,</if>
  49. <if test="providerClassName != null and providerClassName != ''">provider_class_name,</if>
  50. <if test="name != null and name != ''">name,</if>
  51. <if test="accountEntity != null and accountEntity != ''">account_entity,</if>
  52. <if test="interruptFlag != null">interrupt_flag,</if>
  53. <if test="interruptKeywords != null">interrupt_keywords,</if>
  54. <if test="interruptIgnoreKeywords != null">interrupt_ignore_keywords,</if>
  55. <if test="intentionTips != null">intention_tips,</if>
  56. <if test="concurrentNum != null">concurrent_num,</if>
  57. <if test="transferManualDigit != null and transferManualDigit != ''">transfer_manual_digit,</if>
  58. <if test="kbCatId != null">kb_cat_id,</if>
  59. <if test="remoteLlmAgentAccountId != null">remote_llm_agent_account_id,</if>
  60. </trim>
  61. <trim prefix="values (" suffix=")" suffixOverrides=",">
  62. <if test="accountJson != null">#{accountJson},</if>
  63. <if test="providerClassName != null and providerClassName != ''">#{providerClassName},</if>
  64. <if test="name != null and name != ''">#{name},</if>
  65. <if test="accountEntity != null and accountEntity != ''">#{accountEntity},</if>
  66. <if test="interruptFlag != null">#{interruptFlag},</if>
  67. <if test="interruptKeywords != null">#{interruptKeywords},</if>
  68. <if test="interruptIgnoreKeywords != null">#{interruptIgnoreKeywords},</if>
  69. <if test="intentionTips != null">#{intentionTips},</if>
  70. <if test="concurrentNum != null">#{concurrentNum},</if>
  71. <if test="transferManualDigit != null and transferManualDigit != ''">#{transferManualDigit},</if>
  72. <if test="kbCatId != null">#{kbCatId},</if>
  73. <if test="remoteLlmAgentAccountId != null">#{remoteLlmAgentAccountId},</if>
  74. </trim>
  75. </insert>
  76. <update id="updateAiSipCallLlmAgentAccount" parameterType="AiSipCallLlmAgentAccount">
  77. update ai_sip_call_llm_agent_account
  78. <trim prefix="SET" suffixOverrides=",">
  79. <if test="accountJson != null">account_json = #{accountJson},</if>
  80. <if test="providerClassName != null and providerClassName != ''">provider_class_name = #{providerClassName},</if>
  81. <if test="name != null and name != ''">name = #{name},</if>
  82. <if test="accountEntity != null and accountEntity != ''">account_entity = #{accountEntity},</if>
  83. <if test="interruptFlag != null">interrupt_flag = #{interruptFlag},</if>
  84. <if test="interruptKeywords != null">interrupt_keywords = #{interruptKeywords},</if>
  85. <if test="interruptIgnoreKeywords != null">interrupt_ignore_keywords = #{interruptIgnoreKeywords},</if>
  86. <if test="intentionTips != null">intention_tips = #{intentionTips},</if>
  87. <if test="concurrentNum != null">concurrent_num = #{concurrentNum},</if>
  88. <if test="transferManualDigit != null and transferManualDigit != ''">transfer_manual_digit = #{transferManualDigit},</if>
  89. <if test="kbCatId != null">kb_cat_id = #{kbCatId},</if>
  90. <if test="remoteLlmAgentAccountId != null">remote_llm_agent_account_id = #{remoteLlmAgentAccountId},</if>
  91. </trim>
  92. where id = #{id}
  93. </update>
  94. <delete id="deleteAiSipCallLlmAgentAccountById" parameterType="Long">
  95. delete from ai_sip_call_llm_agent_account where id = #{id}
  96. </delete>
  97. <delete id="deleteAiSipCallLlmAgentAccountByIds" parameterType="String">
  98. delete from ai_sip_call_llm_agent_account where id in
  99. <foreach item="id" collection="array" open="(" separator="," close=")">
  100. #{id}
  101. </foreach>
  102. </delete>
  103. </mapper>