| | |
| | | if(Objects.nonNull(warningConfig)){ |
| | | List<Integer> ruleIdList = impl.processWarnFront(warningConfig); |
| | | |
| | | Boolean falg = false; |
| | | Boolean falg = true; |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ruleIdList)){ |
| | | for (Integer ruleId:ruleIdList) { |
| | | WarningRule warningRule = warningRuleMapper.selectById(ruleId); |
| | |
| | | ); |
| | | warningPush.setMemberNames(StringUtils.join(memberList.stream().map(i -> i.getName()).collect(Collectors.toList()), ",") |
| | | ); |
| | | // todo 暂时关闭 钉钉通知 |
| | | // Boolean noticeFlag = dingTalk.workInfoOANotice(Long.valueOf(systemDictDataBiz.queryByCode(Constants.DD_TALK,Constants.AGENT_ID).getCode()), |
| | | // StringUtils.join(memberList.stream().filter(i->StringUtils.isNotBlank(i.getDdId())).map(i->i.getDdId()).collect(Collectors.toList()),","), |
| | | // dingTalk.getAlarmNoticeMsg(warningPush.getRegion(),DateUtil.getCurrDateTime(),content)); |
| | | // warningPush.setStatus(noticeFlag?Constants.ONE:Constants.TWO); |
| | | |
| | | if(Constants.equalsInteger(warningRule.getMemberNotice(),Constants.ONE)){ |
| | | // Boolean noticeFlag = dingTalk.workInfoOANotice(Long.valueOf(systemDictDataBiz.queryByCode(Constants.DD_TALK,Constants.AGENT_ID).getCode()), |
| | | // StringUtils.join(memberList.stream().filter(i->StringUtils.isNotBlank(i.getDdId())).map(i->i.getDdId()).collect(Collectors.toList()),","), |
| | | // dingTalk.getAlarmNoticeMsg(warningPush.getRegion(),DateUtil.getCurrDateTime(),warningConfig.getInfo())); |
| | | // warningPush.setStatus(noticeFlag?Constants.ONE:Constants.TWO); |
| | | } |
| | | impl.sendDeviceNotice(warningRule); |
| | | warningPushMapper.insert(warningPush); |
| | | falg = true; |
| | | |
| | | }catch (Exception e){ |
| | | falg = false; |
| | | warningEvent.setStatus(Constants.TWO); |
| | | warningEventMapper.updateById(warningEvent); |
| | | } |
| | | } |
| | | } |
| | | if(falg){ |
| | | if(!falg){ |
| | | warningEvent.setStatus(Constants.ONE); |
| | | warningEventMapper.updateById(warningEvent); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | } |