| | |
| | | package cn.gistack.job.executor.jobhandler; |
| | | |
| | | import cn.gistack.alerts.sms.feign.ISmsRecordClient; |
| | | import cn.gistack.sm.intelligentCall.feign.OutCallClient; |
| | | import cn.gistack.sm.sms.feign.IDataAbnormalWarnClient; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.xxl.job.core.biz.model.ReturnT; |
| | |
| | | |
| | | @Autowired |
| | | private ISmsRecordClient smsRecordClient; |
| | | |
| | | @Autowired |
| | | private IDataAbnormalWarnClient dataAbnormalWarnClient; |
| | | |
| | | /** |
| | | * 外呼未接通-发送短信 |
| | |
| | | XxlJobLogger.log("结束自动创建任务..."); |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | |
| | | /** |
| | | * 监测数据表异常,异常发送短信给运维人员 |
| | | * @return |
| | | */ |
| | | @XxlJob("sendOperate") |
| | | public ReturnT<String> sendOperate(String param) { |
| | | XxlJobLogger.log("开始执行任务..."); |
| | | JSONObject jsonParam = JSON.parseObject(param); |
| | | String tableName = jsonParam.getString("tableName"); |
| | | String phones = jsonParam.getString("phones"); |
| | | dataAbnormalWarnClient.sendOperate(tableName, phones); |
| | | XxlJobLogger.log("结束执行任务..."); |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | |
| | | } |