| | |
| | | notifyMsg("task", 1); |
| | | } |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | public synchronized void notifyCrn(){ |
| | | notifyMsg("crn", 1); |
| | | } |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | public synchronized void notifyDualCrn(){ |
| | | notifyMsg("dualCrn", 1); |
| | | } |
| | | |
| | | private synchronized void notifyMsg(String notifyType, Integer device) { |
| | | Config notifyEnableConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "notifyEnable")); |
| | | if(notifyEnableConfig == null){ |
| | |
| | | continue; |
| | | } |
| | | NotifyDto notifyDto = (NotifyDto) object; |
| | | int id =notifyDto.getId().intValue(); |
| | | notifyDto.setId((Long.valueOf(id))); |
| | | |
| | | if (System.currentTimeMillis() - notifyDto.getLastRetryTime() < 1000 * notifyDto.getRetryTime()) { |
| | | continue; |