新增通过手机号查询外呼未接通已短信通过的人员信息接口
| | |
| | | public R sendSignRainMsg(@RequestBody Map<String,Object> params){ |
| | | return R.data(smsService.sendSignRainMsg(params)); |
| | | } |
| | | |
| | | /** |
| | | * 通过手机号获取外呼未接通已发短信通知的人员水库信息 |
| | | * @param phone 手机号码 |
| | | * @return |
| | | */ |
| | | @GetMapping("/getCallNotConnectSmsNoticeInfo") |
| | | public R getCallNotConnectSmsNoticeInfo(String phone){ |
| | | return R.data(smsService.getCallNotConnectSmsNoticeInfo(phone)); |
| | | } |
| | | } |
| | |
| | | /** |
| | | * 查询当前任务未接通的人员信息(包含水库编号)--MYSQL |
| | | * @param taskId |
| | | * @param phone |
| | | * @return |
| | | */ |
| | | @DS("znwh") |
| | | List<Map<String, Object>> getNotConnectPatrolPersonList(@Param("taskId") String taskId); |
| | | List<Map<String, Object>> getNotConnectPatrolPersonList(@Param("taskId") String taskId, |
| | | @Param("phone") String phone); |
| | | } |
| | |
| | | |
| | | <!--查询当前任务未接通的人员信息(包含水库编号)-MYSQL--> |
| | | <select id="getNotConnectPatrolPersonList" resultType="java.util.Map"> |
| | | select ctc.callee_number as userPhone, |
| | | select ctc.callee_number as userPhone,ctc.task_id as taskId, |
| | | TRIM(BOTH '"' FROM JSON_EXTRACT(ctc.call_task_callee_content,'$."$水库编码$"')) as waterCode, |
| | | 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} |
| | | and ctc.call_status = 4 and ctr.call_result!='200000' |
| | | <if test="phone!=null and phone!=''"> |
| | | and ctc.callee_number = #{phone} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | /** |
| | | * 查询当前任务未接通的人员信息(包含水库编号) |
| | | * @param taskId |
| | | * @param phone |
| | | * @return |
| | | */ |
| | | @DS("znwh") |
| | | List<Map<String, Object>> getNotConnectPatrolPersonList(String taskId); |
| | | List<Map<String, Object>> getNotConnectPatrolPersonList(String taskId,String phone); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | String sendSmsByOutCallNotConnect(String taskId,String time); |
| | | |
| | | /** |
| | | * 通过手机号获取外呼未接通已发短信通知的人员水库信息 |
| | | * @param phone 手机号码 |
| | | * @return |
| | | */ |
| | | Object getCallNotConnectSmsNoticeInfo(String phone); |
| | | } |
| | |
| | | public String sendSmsByOutCallNotConnect(String taskId,String time) { |
| | | String templateId = "2431012249882"; |
| | | // 查询当前任务未接通的人员信息(包含水库编号) |
| | | List<Map<String, Object>> list = smsTemplateService.getNotConnectPatrolPersonList(taskId); |
| | | List<Map<String, Object>> list = smsTemplateService.getNotConnectPatrolPersonList(taskId,null); |
| | | SmsTemplate smsTemplate = smsTemplateService.getOne(new QueryWrapper<SmsTemplate>().eq("template_id", templateId)); |
| | | if (list.size()>0) { |
| | | List<Map<String, Object>> newList = new ArrayList<>(); |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 通过手机号获取外呼未接通已发短信通知的人员水库信息 |
| | | * @param phone 手机号码 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Object getCallNotConnectSmsNoticeInfo(String phone) { |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | // 通过手机号查询外呼任务id |
| | | String taskId = bladeRedis.get(MinConstant.fill_info_prefix + phone); |
| | | // 判断 |
| | | if (null!=taskId && !taskId.equals("")){ |
| | | // 通过手机号和外呼任务id 查询水库人员信息 |
| | | list = smsTemplateService.getNotConnectPatrolPersonList(taskId,phone); |
| | | // 返回 |
| | | return list; |
| | | } |
| | | // 没有,已过期 |
| | | return list; |
| | | } |
| | | } |
| | |
| | | /** |
| | | * 查询当前任务未接通的人员信息(包含水库编号) |
| | | * @param taskId |
| | | * @param phone |
| | | * @return |
| | | */ |
| | | @Override |
| | | @DS("znwh") |
| | | public List<Map<String, Object>> getNotConnectPatrolPersonList(String taskId) { |
| | | return baseMapper.getNotConnectPatrolPersonList(taskId); |
| | | public List<Map<String, Object>> getNotConnectPatrolPersonList(String taskId,String phone) { |
| | | return baseMapper.getNotConnectPatrolPersonList(taskId,phone); |
| | | } |
| | | } |