CompanyVoiceRoboticCallLogCallphoneMapper.xml 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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.company.mapper.CompanyVoiceRoboticCallLogCallphoneMapper">
  6. <resultMap type="CompanyVoiceRoboticCallLogCallphone" id="CompanyVoiceRoboticCallLogCallphoneResult">
  7. <result property="logId" column="log_id" />
  8. <result property="roboticId" column="robotic_id" />
  9. <result property="callerId" column="caller_id" />
  10. <result property="runTime" column="run_time" />
  11. <result property="runParam" column="run_param" />
  12. <result property="result" column="result" />
  13. <result property="status" column="status" />
  14. <result property="createTime" column="create_time" />
  15. <result property="recordPath" column="record_path" />
  16. <result property="contentList" column="content_list" />
  17. <result property="callerNum" column="caller_num" />
  18. <result property="calleeNum" column="callee_num" />
  19. <result property="uuid" column="uuid" />
  20. <result property="callCreateTime" column="call_create_time" />
  21. <result property="callAnswerTime" column="call_answer_time" />
  22. <result property="intention" column="intention" />
  23. <result property="companyId" column="company_id" />
  24. <result property="companyUserId" column="company_user_id" />
  25. <result property="callTime" column="call_time" />
  26. <result property="cost" column="cost" />
  27. </resultMap>
  28. <sql id="selectCompanyVoiceRoboticCallLogCallphoneVo">
  29. select log_id, robotic_id, caller_id, run_time, run_param, result, status, create_time, record_path, content_list, caller_num, callee_num, uuid, call_create_time, call_answer_time, intention, company_id, company_user_id, call_time, cost from company_voice_robotic_call_log_callphone
  30. </sql>
  31. <select id="selectCompanyVoiceRoboticCallLogCallphoneList" parameterType="CompanyVoiceRoboticCallLogCallphone" resultMap="CompanyVoiceRoboticCallLogCallphoneResult">
  32. <include refid="selectCompanyVoiceRoboticCallLogCallphoneVo"/>
  33. <where>
  34. <if test="roboticId != null "> and robotic_id = #{roboticId}</if>
  35. <if test="callerId != null "> and caller_id = #{callerId}</if>
  36. <if test="runTime != null "> and run_time = #{runTime}</if>
  37. <if test="runParam != null and runParam != ''"> and run_param = #{runParam}</if>
  38. <if test="result != null and result != ''"> and result = #{result}</if>
  39. <if test="status != null "> and status = #{status}</if>
  40. <if test="recordPath != null and recordPath != ''"> and record_path = #{recordPath}</if>
  41. <if test="contentList != null and contentList != ''"> and content_list = #{contentList}</if>
  42. <if test="callerNum != null and callerNum != ''"> and caller_num = #{callerNum}</if>
  43. <if test="calleeNum != null and calleeNum != ''"> and callee_num = #{calleeNum}</if>
  44. <if test="uuid != null and uuid != ''"> and uuid = #{uuid}</if>
  45. <if test="callCreateTime != null "> and call_create_time = #{callCreateTime}</if>
  46. <if test="callAnswerTime != null "> and call_answer_time = #{callAnswerTime}</if>
  47. <if test="intention != null and intention != ''"> and intention = #{intention}</if>
  48. <if test="companyId != null "> and company_id = #{companyId}</if>
  49. <if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
  50. <if test="callTime != null "> and call_time = #{callTime}</if>
  51. <if test="cost != null "> and cost = #{cost}</if>
  52. </where>
  53. </select>
  54. <select id="selectCompanyVoiceRoboticCallLogCallphoneByLogId" parameterType="Long" resultMap="CompanyVoiceRoboticCallLogCallphoneResult">
  55. <include refid="selectCompanyVoiceRoboticCallLogCallphoneVo"/>
  56. where log_id = #{logId}
  57. </select>
  58. <insert id="insertCompanyVoiceRoboticCallLogCallphone" parameterType="CompanyVoiceRoboticCallLogCallphone" useGeneratedKeys="true" keyProperty="logId">
  59. insert into company_voice_robotic_call_log_callphone
  60. <trim prefix="(" suffix=")" suffixOverrides=",">
  61. <if test="roboticId != null">robotic_id,</if>
  62. <if test="callerId != null">caller_id,</if>
  63. <if test="runTime != null">run_time,</if>
  64. <if test="runParam != null">run_param,</if>
  65. <if test="result != null">result,</if>
  66. <if test="status != null">status,</if>
  67. <if test="createTime != null">create_time,</if>
  68. <if test="recordPath != null">record_path,</if>
  69. <if test="contentList != null">content_list,</if>
  70. <if test="callerNum != null">caller_num,</if>
  71. <if test="calleeNum != null">callee_num,</if>
  72. <if test="uuid != null">uuid,</if>
  73. <if test="callCreateTime != null">call_create_time,</if>
  74. <if test="callAnswerTime != null">call_answer_time,</if>
  75. <if test="intention != null">intention,</if>
  76. <if test="companyId != null">company_id,</if>
  77. <if test="companyUserId != null">company_user_id,</if>
  78. <if test="callTime != null">call_time,</if>
  79. <if test="cost != null">cost,</if>
  80. </trim>
  81. <trim prefix="values (" suffix=")" suffixOverrides=",">
  82. <if test="roboticId != null">#{roboticId},</if>
  83. <if test="callerId != null">#{callerId},</if>
  84. <if test="runTime != null">#{runTime},</if>
  85. <if test="runParam != null">#{runParam},</if>
  86. <if test="result != null">#{result},</if>
  87. <if test="status != null">#{status},</if>
  88. <if test="createTime != null">#{createTime},</if>
  89. <if test="recordPath != null">#{recordPath},</if>
  90. <if test="contentList != null">#{contentList},</if>
  91. <if test="callerNum != null">#{callerNum},</if>
  92. <if test="calleeNum != null">#{calleeNum},</if>
  93. <if test="uuid != null">#{uuid},</if>
  94. <if test="callCreateTime != null">#{callCreateTime},</if>
  95. <if test="callAnswerTime != null">#{callAnswerTime},</if>
  96. <if test="intention != null">#{intention},</if>
  97. <if test="companyId != null">#{companyId},</if>
  98. <if test="companyUserId != null">#{companyUserId},</if>
  99. <if test="callTime != null">#{callTime},</if>
  100. <if test="cost != null">#{cost},</if>
  101. </trim>
  102. </insert>
  103. <update id="updateCompanyVoiceRoboticCallLogCallphone" parameterType="CompanyVoiceRoboticCallLogCallphone">
  104. update company_voice_robotic_call_log_callphone
  105. <trim prefix="SET" suffixOverrides=",">
  106. <if test="roboticId != null">robotic_id = #{roboticId},</if>
  107. <if test="callerId != null">caller_id = #{callerId},</if>
  108. <if test="runTime != null">run_time = #{runTime},</if>
  109. <if test="runParam != null">run_param = #{runParam},</if>
  110. <if test="result != null">result = #{result},</if>
  111. <if test="status != null">status = #{status},</if>
  112. <if test="createTime != null">create_time = #{createTime},</if>
  113. <if test="recordPath != null">record_path = #{recordPath},</if>
  114. <if test="contentList != null">content_list = #{contentList},</if>
  115. <if test="callerNum != null">caller_num = #{callerNum},</if>
  116. <if test="calleeNum != null">callee_num = #{calleeNum},</if>
  117. <if test="uuid != null">uuid = #{uuid},</if>
  118. <if test="callCreateTime != null">call_create_time = #{callCreateTime},</if>
  119. <if test="callAnswerTime != null">call_answer_time = #{callAnswerTime},</if>
  120. <if test="intention != null">intention = #{intention},</if>
  121. <if test="companyId != null">company_id = #{companyId},</if>
  122. <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
  123. <if test="callTime != null">call_time = #{callTime},</if>
  124. <if test="cost != null">cost = #{cost},</if>
  125. </trim>
  126. where log_id = #{logId}
  127. </update>
  128. <delete id="deleteCompanyVoiceRoboticCallLogCallphoneByLogId" parameterType="Long">
  129. delete from company_voice_robotic_call_log_callphone where log_id = #{logId}
  130. </delete>
  131. <delete id="deleteCompanyVoiceRoboticCallLogCallphoneByLogIds" parameterType="String">
  132. delete from company_voice_robotic_call_log_callphone where log_id in
  133. <foreach item="logId" collection="array" open="(" separator="," close=")">
  134. #{logId}
  135. </foreach>
  136. </delete>
  137. <select id="selectNoResultLogByCallees" parameterType="com.fs.company.domain.CompanyVoiceRoboticCallees" resultType="CompanyVoiceRoboticCallLogCallphone">
  138. select * from company_voice_robotic_call_log_callphone where robotic_id = #{roboticId} And caller_id = #{id} And status = 1
  139. </select>
  140. <select id="selectLogByRoboticIdAndCallerId" resultType="CompanyVoiceRoboticCallLogCallphone">
  141. select * from company_voice_robotic_call_log_callphone where robotic_id = #{roboticId} And caller_id = #{callerId}
  142. </select>
  143. </mapper>