|
|
@@ -53,58 +53,60 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectCcCallPhoneList" parameterType="CcCallPhone" resultMap="CcCallPhoneResult">
|
|
|
- <include refid="selectCcCallPhoneVo"/>
|
|
|
+ select cp.*,ct.batch_name as batchName from cc_call_phone cp left join cc_call_task ct on cp.batch_id = ct.batch_id
|
|
|
<where>
|
|
|
- <if test="uuid != null and uuid != '' "> and uuid = #{uuid}</if>
|
|
|
- <if test="batchId != null "> and batch_id = #{batchId}</if>
|
|
|
- <if test="telephone != null and telephone != ''"> and telephone = #{telephone}</if>
|
|
|
- <if test="custName != null and custName != ''"> and cust_name = #{custName}</if>
|
|
|
- <if test="callstatus != null "> and callstatus = #{callstatus}</if>
|
|
|
+ <if test="uuid != null and uuid != '' "> and cp.uuid = #{uuid}</if>
|
|
|
+ <if test="telephone != null and telephone != ''"> and cp.telephone = #{telephone}</if>
|
|
|
+ <if test="custName != null and custName != ''"> and cp.cust_name = #{custName}</if>
|
|
|
+ <if test="callstatus != null "> and cp.callstatus = #{callstatus}</if>
|
|
|
<if test="params.calloutTimeStart != null and params.calloutTimeStart != ''"><!-- 开始时间检索 -->
|
|
|
- AND callout_time >= #{params.calloutTimeStart}
|
|
|
+ AND cp.callout_time >= #{params.calloutTimeStart}
|
|
|
</if>
|
|
|
<if test="params.calloutTimeEnd != null and params.calloutTimeEnd != ''"><!-- 结束时间检索 -->
|
|
|
- AND callout_time <= #{params.calloutTimeEnd}
|
|
|
+ AND cp.callout_time <= #{params.calloutTimeEnd}
|
|
|
</if>
|
|
|
<if test="params.callEndTimeStart != null and params.callEndTimeStart != ''"><!-- 开始时间检索 -->
|
|
|
- AND call_end_time >= #{params.callEndTimeStart}
|
|
|
+ AND cp.call_end_time >= #{params.callEndTimeStart}
|
|
|
</if>
|
|
|
<if test="params.callEndTimeEnd != null and params.callEndTimeEnd != ''"><!-- 结束时间检索 -->
|
|
|
- AND call_end_time <= #{params.callEndTimeEnd}
|
|
|
+ AND cp.call_end_time <= #{params.callEndTimeEnd}
|
|
|
</if>
|
|
|
<if test="params.timeLenStart != null and params.timeLenStart != ''"><!-- 开始时间检索 -->
|
|
|
- AND time_len >= #{params.timeLenStart}
|
|
|
+ AND cp.time_len >= #{params.timeLenStart}
|
|
|
</if>
|
|
|
<if test="params.timeLenEnd != null and params.timeLenEnd != ''"><!-- 结束时间检索 -->
|
|
|
- AND time_len <= #{params.timeLenEnd}
|
|
|
+ AND cp.time_len <= #{params.timeLenEnd}
|
|
|
</if>
|
|
|
<if test="params.connectedTimeStart != null and params.connectedTimeStart != ''"><!-- 开始时间检索 -->
|
|
|
- AND connected_time >= #{params.connectedTimeStart}
|
|
|
+ AND cp.connected_time >= #{params.connectedTimeStart}
|
|
|
</if>
|
|
|
<if test="params.connectedTimeEnd != null and params.connectedTimeEnd != ''"><!-- 结束时间检索 -->
|
|
|
- AND connected_time <= #{connectedTimeEnd}
|
|
|
+ AND cp.connected_time <= #{connectedTimeEnd}
|
|
|
</if>
|
|
|
<if test="params.answeredTimeStart != null and params.answeredTimeStart != ''"><!-- 开始时间检索 -->
|
|
|
- AND answered_time >= #{params.answeredTimeStart}
|
|
|
+ AND cp.answered_time >= #{params.answeredTimeStart}
|
|
|
</if>
|
|
|
<if test="params.answeredTimeEnd != null and params.answeredTimeEnd != ''"><!-- 结束时间检索 -->
|
|
|
- AND answered_time <= #{params.answeredTimeEnd}
|
|
|
+ AND cp.answered_time <= #{params.answeredTimeEnd}
|
|
|
</if>
|
|
|
<if test="batchId != null and batchId != ''">
|
|
|
- AND batch_id = #{batchId}
|
|
|
+ AND cp.batch_id = #{batchId}
|
|
|
+ </if>
|
|
|
+ <if test="batchName != null and batchName != ''">
|
|
|
+ AND ct.batch_name like concat('%', #{batchName}, '%')
|
|
|
</if>
|
|
|
<if test="intent != null and intent != ''">
|
|
|
- AND intent = #{intent}
|
|
|
+ AND cp.intent = #{intent}
|
|
|
</if>
|
|
|
<if test="billingStatus != null ">
|
|
|
- and billing_status = #{billingStatus}
|
|
|
+ and cp.billing_status = #{billingStatus}
|
|
|
</if>
|
|
|
<if test="callerNumber != null and callerNumber != '' ">
|
|
|
- and caller_number = #{callerNumber}
|
|
|
+ and cp.caller_number = #{callerNumber}
|
|
|
</if>
|
|
|
- AND callstatus >= 3 AND call_end_time > 0
|
|
|
+ AND cp.callstatus >= 3 AND cp.call_end_time > 0
|
|
|
</where>
|
|
|
- order by call_end_time desc
|
|
|
+ order by cp.call_end_time desc
|
|
|
</select>
|
|
|
|
|
|
<select id="getCustIntentionList" parameterType="CcCallPhone" resultMap="CcCallPhoneResult">
|