| | |
| | | TRIM(BOTH '"' FROM JSON_EXTRACT(ctc.call_task_callee_content,'$."$水库名称$"')) as waterName, |
| | | TRIM(BOTH '"' FROM JSON_EXTRACT(ctc.call_task_callee_content,'$."$用户名$"')) as userName |
| | | from call_task_callee ctc left join call_task_result ctr on ctc.call_id = ctr.call_id |
| | | where ctc.task_id = #{taskId} |
| | | where 1=1 |
| | | and ctr.call_result!='200000' |
| | | <choose> |
| | | <when test="taskIdList != null and taskIdList.size()>0"> |
| | | and ctc.task_id in |
| | | <foreach collection="taskIdList" item="id" separator ="," open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </when> |
| | | <otherwise> |
| | | and ctc.task_id in ('') |
| | | </otherwise> |
| | | </choose> |
| | | <if test="callId!=null and callId!=''"> |
| | | and ctc.call_id = #{callId} |
| | | </if> |
| | | </select> |
| | | |
| | | <!--查询符合当前时间外呼任务id集合--> |
| | | <select id="getTaskIdListByTime" resultType="java.lang.String"> |
| | | select task_id from sm_call_sms_notice_task |
| | | where 1=1 |
| | | and date_format(start_time,'%Y-%m-%d %H:%i:%s') <= #{time} |
| | | and date_format(end_time,'%Y-%m-%d %H:%i:%s') >= #{time} |
| | | </select> |
| | | </mapper> |