Przeglądaj źródła

日志记录调整

hanzhiwei 2 lat temu
rodzic
commit
c8dc8d4aee

+ 4 - 3
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/event/RedisExpiredPhotographListener.java

@@ -171,7 +171,7 @@ public class RedisExpiredPhotographListener extends KeyExpirationEventMessageLis
                 WarningConfig warningConfig = warningConfigService.getOne(new LambdaQueryWrapper<WarningConfig>().eq(WarningConfig::getWarningType, 1));
                 Integer anomalyCount = warningConfig.getAnomalyCount();
                 String lastKey = key.substring(0,key.lastIndexOf("~")) +"~"+ (anomalyCount - 1);
-                log.info("lastKey = {}",lastKey);
+                log.info("lastKey = {},大于0则修改日志删除状态!",lastKey);
                 if (!redisService.hasKey(lastKey)) {
                     log.info("进入最后一次循环!");
                     //如果没有这个key了 则统计异常率
@@ -188,7 +188,7 @@ public class RedisExpiredPhotographListener extends KeyExpirationEventMessageLis
                             warningNoticeLogDto.setWarningType(1);
                             warningNoticeLogDto.setWarningContent("未穿戴实验服");
                             warningNoticeLogDto.setWarningTime(LocalDateTime.now());
-                            warningNoticeLogDto.setWarningWay(warningConfig.getIllegalRemoval());
+                            warningNoticeLogDto.setWarningWay("1,2,3");
                             //查询到实验室负责人id 安全责任人id
                             List<CheckSubjectDto> subjectInfoList = labSubjectService.findSubjectInfoList(String.valueOf(warningNoticeLog.getSubId()));
                             if (subjectInfoList.size() > 0) {
@@ -211,7 +211,8 @@ public class RedisExpiredPhotographListener extends KeyExpirationEventMessageLis
                     }
 
                     //是否通知
-                    long count1 = warningNoticeLogService.count(new LambdaQueryWrapper<WarningNoticeLog>().eq(WarningNoticeLog::getSubId, warningNoticeLog.getSubId()));
+                    long count1 = warningNoticeLogService.count(new LambdaQueryWrapper<WarningNoticeLog>().eq(WarningNoticeLog::getSubId, warningNoticeLog.getSubId())
+                                                                .eq(WarningNoticeLog::getWarningType,1).eq(WarningNoticeLog::getIsDeleted,Boolean.FALSE));
                     ResultData urlScheme = remoteMessageService.getUrlScheme(warningNoticeLog.getId());
                     if(urlScheme.getCode() != HttpStatus.SUCCESS){
                         log.error("获取urlScheme失败!");