| | |
| | | package com.zy.asrs.utils; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.SnowflakeIdWorker; |
| | | import com.zy.asrs.domain.NotifyDto; |
| | | import com.zy.asrs.domain.enums.NotifyMsgType; |
| | |
| | | |
| | | private boolean append(String notifyType, Integer device, String taskNo, String superTaskNo, NotifyMsgType msgType, String data) { |
| | | boolean notifyEnable = true; |
| | | Config notifyEnableConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "notifyEnable")); |
| | | Config notifyEnableConfig = configService.getOne(new QueryWrapper<Config>().eq("code", "notifyEnable")); |
| | | if (notifyEnableConfig != null) { |
| | | notifyEnable = notifyEnableConfig.getValue().equals("Y"); |
| | | } |
| | |
| | | dto.setSuperTaskNo(superTaskNo); |
| | | |
| | | //重试次数 |
| | | Config notifyFailTimesConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "notifyFailTimes")); |
| | | Config notifyFailTimesConfig = configService.getOne(new QueryWrapper<Config>().eq("code", "notifyFailTimes")); |
| | | if (notifyFailTimesConfig != null) { |
| | | dto.setFailTimes(Integer.parseInt(notifyFailTimesConfig.getValue())); |
| | | } |
| | | |
| | | //重试间隔 |
| | | Config notifyRetryTimeConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "notifyRetryTime")); |
| | | Config notifyRetryTimeConfig = configService.getOne(new QueryWrapper<Config>().eq("code", "notifyRetryTime")); |
| | | if (notifyRetryTimeConfig != null) { |
| | | dto.setRetryTime(Integer.parseInt(notifyRetryTimeConfig.getValue())); |
| | | } |