| | |
| | | import java.time.ZoneId; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 定时任务调度测试 |
| | |
| | | ServiceSubtaskVO ivrTaskcall = new ServiceSubtaskVO(); |
| | | ivrTaskcall.setTaskid(commonTaskcallMQ.getTaskid()); |
| | | ivrTaskcall.setSendstate(2L); |
| | | List<ServiceSubtask> selectServiceSubtaskList = iServiceSubtaskService.selectServiceSubtaskList(ivrTaskcall); |
| | | List<ServiceSubtask> subtaskList = iServiceSubtaskService.selectServiceSubtaskList(ivrTaskcall); |
| | | |
| | | // 按照 endtime 离当前时间最近的排序 |
| | | List<ServiceSubtask> selectServiceSubtaskList = subtaskList.stream().sorted(Comparator.comparing(subtask -> Math.abs(subtask.getEndtime().getTime() - new Date().getTime()))).collect(Collectors.toList()); |
| | | |
| | | if (descByCode.equals("电话")) { |
| | | String value = ""; |
| | | List<String> list = new ArrayList<>(); |
| | |
| | | } |
| | | } |
| | | //将要执行的放到缓存中 |
| | | redisCache.setCacheList("cache-0", list); |
| | | |
| | | if (list.size() > 0) { |
| | | // redisCache.setCacheListLeft("cache-0", list); |
| | | redisCache.setCacheListLeftAndDistinct("cache-0", list); |
| | | } |
| | | } else if (descByCode.equals("多媒体")) { |
| | | //多媒体 |
| | | } else if (descByCode.equals("纸质")) { |