| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209 |
- <?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.aiSipCall.mapper.AiSipCallTaskMapper">
-
- <resultMap type="AiSipCallTask" id="AiSipCallTaskResult">
- <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="executing" column="executing" />
- <result property="stopTime" column="stop_time" />
- <result property="userid" column="userid" />
- <result property="taskType" column="task_type" />
- <result property="gatewayId" column="gateway_id" />
- <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" />
- <result property="remoteBatchId" column="remote_batch_id" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- <result property="companyId" column="company_id" />
- <result property="companyUserId" column="company_user_id" />
- <result property="status" column="status" />
- </resultMap>
- <sql id="selectAiSipCallTaskVo">
- select * from ai_sip_call_task
- </sql>
- <select id="selectAiSipCallTaskList" parameterType="AiSipCallTask" resultMap="AiSipCallTaskResult">
- <include refid="selectAiSipCallTaskVo"/>
- <where>
- <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="rate != null "> and rate = #{rate}</if>
- <if test="threadNum != null "> and thread_num = #{threadNum}</if>
- <if test="executing != null "> and executing = #{executing}</if>
- <if test="stopTime != null "> and stop_time = #{stopTime}</if>
- <if test="userid != null and userid != ''"> and userid = #{userid}</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="avgRingTimeLen != null "> and avg_ring_time_len = #{avgRingTimeLen}</if>
- <if test="avgCallTalkTimeLen != null "> and avg_call_talk_time_len = #{avgCallTalkTimeLen}</if>
- <if test="avgCallEndProcessTimeLen != null "> and avg_call_end_process_time_len = #{avgCallEndProcessTimeLen}</if>
- <if test="callNodeNo != null and callNodeNo != ''"> and call_node_no = #{callNodeNo}</if>
- <if test="llmAccountId != null "> and llm_account_id = #{llmAccountId}</if>
- <if test="playTimes != null "> and play_times = #{playTimes}</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>
- <if test="autoStop != null "> and auto_stop = #{autoStop}</if>
- <if test="ivrId != null and ivrId != ''"> and ivr_id = #{ivrId}</if>
- <if test="remoteBatchId != null "> and remote_batch_id = #{remoteBatchId}</if>
- <if test="createBy != null "> and create_by = #{createBy}</if>
- <if test="createTime != null "> and create_time = #{createTime}</if>
- <if test="updateBy != null "> and update_by = #{updateBy}</if>
- <if test="updateTime != null "> and update_time = #{updateTime}</if>
- <if test="companyId != null "> and company_id = #{companyId}</if>
- <if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
- <if test="createTimeStart != null and createTimeStart != ''"> and create_time >= #{createTimeStart}</if>
- <if test="createTimeEnd != null and createTimeEnd != ''"> and create_time <= #{createTimeEnd}</if>
- <if test="status != null "> and status = #{status}</if>
- </where>
- order by create_time desc
- </select>
-
- <select id="selectAiSipCallTaskByBatchId" parameterType="Long" resultMap="AiSipCallTaskResult">
- <include refid="selectAiSipCallTaskVo"/>
- where batch_id = #{batchId}
- </select>
-
- <insert id="insertAiSipCallTask" parameterType="AiSipCallTask" useGeneratedKeys="true" keyProperty="batchId">
- insert into ai_sip_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="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 and callNodeNo != ''">call_node_no,</if>
- <if test="llmAccountId != null">llm_account_id,</if>
- <if test="playTimes != null">play_times,</if>
- <if test="asrProvider != null">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">ivr_id,</if>
- <if test="remoteBatchId != null">remote_batch_id,</if>
- <if test="createBy != null">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="companyId != null">company_id,</if>
- <if test="companyUserId != null">company_user_id,</if>
- <if test="status != null">status,</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="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 and callNodeNo != ''">#{callNodeNo},</if>
- <if test="llmAccountId != null">#{llmAccountId},</if>
- <if test="playTimes != null">#{playTimes},</if>
- <if test="asrProvider != null">#{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">#{ivrId},</if>
- <if test="remoteBatchId != null">#{remoteBatchId},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="companyId != null">#{companyId},</if>
- <if test="companyUserId != null">#{companyUserId},</if>
- <if test="status != null">#{status},</if>
- </trim>
- </insert>
- <update id="updateAiSipCallTask" parameterType="AiSipCallTask">
- update ai_sip_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="executing != null">executing = #{executing},</if>
- <if test="stopTime != null">stop_time = #{stopTime},</if>
- <if test="userid != null and userid != ''">userid = #{userid},</if>
- <if test="taskType != null">task_type = #{taskType},</if>
- <if test="gatewayId != null">gateway_id = #{gatewayId},</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 and callNodeNo != ''">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">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">ivr_id = #{ivrId},</if>
- <if test="remoteBatchId != null">remote_batch_id = #{remoteBatchId},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="companyId != null">company_id = #{companyId},</if>
- <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
- <if test="status != null">status = #{status},</if>
- </trim>
- where batch_id = #{batchId}
- </update>
- <delete id="deleteAiSipCallTaskByBatchId" parameterType="Long">
- delete from ai_sip_call_task where batch_id = #{batchId}
- </delete>
- <delete id="deleteAiSipCallTaskByBatchIds" parameterType="String">
- delete from ai_sip_call_task where batch_id in
- <foreach item="batchId" collection="array" open="(" separator="," close=")">
- #{batchId}
- </foreach>
- </delete>
- </mapper>
|