| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- <?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.aicall.mapper.CcCallTaskMapper">
-
- <resultMap type="CcCallTask" id="CcCallTaskResult">
- <result property="batchId" column="batch_id" />
- <result property="groupId" column="group_id" />
- <result property="batchName" column="batch_name" />
- <result property="ifcall" column="ifcall" />
- <result property="rate" column="rate" />
- <result property="threadNum" column="thread_num" />
- <result property="createtime" column="createtime" />
- <result property="executing" column="executing" />
- <result property="stopTime" column="stop_time" />
- <result property="userid" column="userid" />
- <result property="gatewayId" column="gateway_id" />
- <result property="taskType" column="task_type" />
- <result property="voiceCode" column="voice_code" />
- <result property="voiceSource" column="voice_source" />
- <result property="avgRingTimeLen" column="avg_ring_time_len" />
- <result property="avgCallTalkTimeLen" column="avg_call_talk_time_len" />
- <result property="avgCallEndProcessTimeLen" column="avg_call_end_process_time_len" />
- <result property="callNodeNo" column="call_node_no" />
- <result property="llmAccountId" column="llm_account_id" />
- <result property="playTimes" column="play_times" />
- <result property="asrProvider" column="asr_provider" />
- <result property="aiTransferType" column="ai_transfer_type" />
- <result property="aiTransferData" column="ai_transfer_data" />
- <result property="autoStop" column="auto_stop" />
- <result property="ivrId" column="ivr_id" />
- </resultMap>
- <sql id="selectCcCallTaskVo">
- select batch_id, group_id, batch_name, ifcall, rate, thread_num, createtime, executing, stop_time, userid, task_type, gateway_id, voice_code, voice_source, avg_ring_time_len, avg_call_talk_time_len, avg_call_end_process_time_len, call_node_no, llm_account_id, play_times, asr_provider, ai_transfer_type, ai_transfer_data, auto_stop, ivr_id from cc_call_task
- </sql>
- <select id="selectCcCallTaskList" parameterType="CcCallTask" resultMap="CcCallTaskResult">
- <include refid="selectCcCallTaskVo"/>
- <where>
- <if test="batchId != null "> and batch_id = #{batchId}</if>
- <if test="groupId != null and groupId != ''"> and group_id = #{groupId}</if>
- <if test="batchName != null and batchName != ''"> and batch_name like concat('%', #{batchName}, '%')</if>
- <if test="ifcall != null "> and ifcall = #{ifcall}</if>
- <if test="taskType != null "> and task_type = #{taskType}</if>
- <if test="gatewayId != null "> and gateway_id = #{gatewayId}</if>
- <if test="voiceCode != null and voiceCode != ''"> and voice_code = #{voiceCode}</if>
- <if test="voiceSource != null and voiceSource != ''"> and voice_source = #{voiceSource}</if>
- <if test="llmAccountId != null"> and llm_account_id = #{llmAccountId}</if>
- <if test="params.createTimeStart != null and params.createTimeStart != ''"><!-- 开始时间检索 -->
- AND createtime >= #{params.createTimeStart}
- </if>
- <if test="params.createTimeEnd != null and params.createTimeEnd != ''"><!-- 结束时间检索 -->
- AND createtime <= #{params.createTimeEnd}
- </if>
- <if test="asrProvider != null and asrProvider != ''" > and asr_provider = #{asrProvider}</if>
- <if test="aiTransferType != null and aiTransferType != ''" > and ai_transfer_type = #{aiTransferType}</if>
- <if test="aiTransferData != null and aiTransferData != ''" > and ai_transfer_data = #{aiTransferData}</if>
- </where>
- order by batch_id desc
- </select>
-
- <select id="selectCcCallTaskByBatchId" parameterType="Long" resultMap="CcCallTaskResult">
- <include refid="selectCcCallTaskVo"/>
- where batch_id = #{batchId}
- </select>
- <insert id="insertCcCallTask" parameterType="CcCallTask" useGeneratedKeys="true" keyProperty="batchId">
- insert into cc_call_task
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="groupId != null and groupId != ''">group_id,</if>
- <if test="batchName != null and batchName != ''">batch_name,</if>
- <if test="ifcall != null">ifcall,</if>
- <if test="rate != null">rate,</if>
- <if test="threadNum != null">thread_num,</if>
- <if test="createtime != null">createtime,</if>
- <if test="executing != null">executing,</if>
- <if test="stopTime != null">stop_time,</if>
- <if test="userid != null and userid != ''">userid,</if>
- <if test="taskType != null">task_type,</if>
- <if test="gatewayId != null">gateway_id,</if>
- <if test="voiceCode != null and voiceCode != ''">voice_code,</if>
- <if test="voiceSource != null and voiceSource != ''">voice_source,</if>
- <if test="avgRingTimeLen != null">avg_ring_time_len,</if>
- <if test="avgCallTalkTimeLen != null">avg_call_talk_time_len,</if>
- <if test="avgCallEndProcessTimeLen != null">avg_call_end_process_time_len,</if>
- <if test="callNodeNo != null">call_node_no,</if>
- <if test="llmAccountId != null">llm_account_id,</if>
- <if test="playTimes != null">play_times,</if>
- <if test="asrProvider != null and asrProvider != ''">asr_provider,</if>
- <if test="aiTransferType != null and aiTransferType != ''">ai_transfer_type,</if>
- <if test="aiTransferData != null and aiTransferData != ''">ai_transfer_data,</if>
- <if test="autoStop != null ">auto_stop,</if>
- <if test="ivrId != null and ivrId != ''">ivr_id,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="groupId != null and groupId != ''">#{groupId},</if>
- <if test="batchName != null and batchName != ''">#{batchName},</if>
- <if test="ifcall != null">#{ifcall},</if>
- <if test="rate != null">#{rate},</if>
- <if test="threadNum != null">#{threadNum},</if>
- <if test="createtime != null">#{createtime},</if>
- <if test="executing != null">#{executing},</if>
- <if test="stopTime != null">#{stopTime},</if>
- <if test="userid != null and userid != ''">#{userid},</if>
- <if test="taskType != null">#{taskType},</if>
- <if test="gatewayId != null">#{gatewayId},</if>
- <if test="voiceCode != null and voiceCode != ''">#{voiceCode},</if>
- <if test="voiceSource != null and voiceSource != ''">#{voiceSource},</if>
- <if test="avgRingTimeLen != null">#{avgRingTimeLen},</if>
- <if test="avgCallTalkTimeLen != null">#{avgCallTalkTimeLen},</if>
- <if test="avgCallEndProcessTimeLen != null">#{avgCallEndProcessTimeLen},</if>
- <if test="callNodeNo != null">#{callNodeNo},</if>
- <if test="llmAccountId != null">#{llmAccountId},</if>
- <if test="playTimes != null">#{playTimes},</if>
- <if test="asrProvider != null and asrProvider != ''">#{asrProvider},</if>
- <if test="aiTransferType != null and aiTransferType != ''">#{aiTransferType},</if>
- <if test="aiTransferData != null and aiTransferData != ''">#{aiTransferData},</if>
- <if test="autoStop != null ">#{autoStop},</if>
- <if test="ivrId != null and ivrId != ''">#{ivrId},</if>
- </trim>
- </insert>
- <update id="updateCcCallTask" parameterType="CcCallTask">
- update cc_call_task
- <trim prefix="SET" suffixOverrides=",">
- <if test="groupId != null and groupId != ''">group_id = #{groupId},</if>
- <if test="batchName != null and batchName != ''">batch_name = #{batchName},</if>
- <if test="ifcall != null">ifcall = #{ifcall},</if>
- <if test="rate != null">rate = #{rate},</if>
- <if test="threadNum != null">thread_num = #{threadNum},</if>
- <if test="createtime != null">createtime = #{createtime},</if>
- <if test="executing != null">executing = #{executing},</if>
- <if test="stopTime != null">stop_time = #{stopTime},</if>
- <if test="userid != null and userid != ''">userid = #{userid},</if>
- <if test="gatewayId != null">gateway_id = #{gatewayId},</if>
- <if test="taskType != null">task_type = #{taskType},</if>
- <if test="voiceCode != null and voiceCode != ''">voice_code = #{voiceCode},</if>
- <if test="voiceSource != null and voiceSource != ''">voice_source = #{voiceSource},</if>
- <if test="avgRingTimeLen != null">avg_ring_time_len = #{avgRingTimeLen},</if>
- <if test="avgCallTalkTimeLen != null">avg_call_talk_time_len = #{avgCallTalkTimeLen},</if>
- <if test="avgCallEndProcessTimeLen != null">avg_call_end_process_time_len = #{avgCallEndProcessTimeLen},</if>
- <if test="callNodeNo != null">call_node_no = #{callNodeNo},</if>
- <if test="llmAccountId != null">llm_account_id = #{llmAccountId},</if>
- <if test="playTimes != null">play_times = #{playTimes},</if>
- <if test="asrProvider != null and asrProvider != ''">asr_provider = #{asrProvider},</if>
- <if test="aiTransferType != null and aiTransferType != ''">ai_transfer_type = #{aiTransferType},</if>
- <if test="aiTransferData != null and aiTransferData != ''">ai_transfer_data = #{aiTransferData},</if>
- <if test="autoStop != null ">auto_stop = #{autoStop},</if>
- <if test="ivrId != null and ivrId != ''">ivr_id = #{ivrId},</if>
- </trim>
- where batch_id = #{batchId}
- </update>
- <delete id="deleteCcCallTaskByBatchId" parameterType="Long">
- delete from cc_call_task where batch_id = #{batchId}
- </delete>
- <delete id="deleteCcCallTaskByBatchIds" parameterType="String">
- delete from cc_call_task where batch_id in
- <foreach item="batchId" collection="array" open="(" separator="," close=")">
- #{batchId}
- </foreach>
- </delete>
- <select id="selectCcCallTaskByBatchName" resultMap="CcCallTaskResult">
- <include refid="selectCcCallTaskVo"/>
- where batch_name = #{batchName} and task_type = #{taskType}
- </select>
- <insert id="bakCallTaskByBatchId" parameterType="Long">
- insert into his_cc_call_task select * from cc_call_task where batch_id = #{batchId}
- </insert>
- </mapper>
|