From e14dfb4da789c8d1d5cf42448d2d1b8a8a63fa10 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 29 Jul 2021 14:20:54 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=86=85=E5=AE=B9=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=89=93=E5=8D=B0=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/notice/service/impl/NoticeServiceImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java index 1414d430ee..11f54353fd 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java @@ -18,6 +18,7 @@ package com.epmet.modules.notice.service.impl; import cn.hutool.core.collection.CollUtil; +import com.alibaba.fastjson.JSON; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.NumConstant; @@ -512,10 +513,11 @@ public class NoticeServiceImpl extends BaseServiceImpl textScanParamDTO.getTasks().add(taskDTO); Result textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); if (!textSyncScanResult.success()) { + logger.error("safetyCheck return failed,result:"+ JSON.toJSONString(textSyncScanResult)); throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); } else { if (!textSyncScanResult.getData().isAllPass()) { - logger.error(String.format(TopicConstant.CREATE_TOPIC, word)); + logger.warn(EpmetErrorCode.TEXT_SCAN_FAILED.getMsg().concat(String.format(TopicConstant.CREATE_TOPIC, word))); throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); } } @@ -541,4 +543,4 @@ public class NoticeServiceImpl extends BaseServiceImpl } } -} \ No newline at end of file +} From e7a4775f24555483f94fd1c1492d35a852aa479a Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 29 Jul 2021 14:27:20 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=86=85=E5=AE=B9=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=89=93=E5=8D=B0=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../notice/service/impl/NoticeServiceImpl.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java index 11f54353fd..b21c69a4ae 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java @@ -513,7 +513,7 @@ public class NoticeServiceImpl extends BaseServiceImpl textScanParamDTO.getTasks().add(taskDTO); Result textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); if (!textSyncScanResult.success()) { - logger.error("safetyCheck return failed,result:"+ JSON.toJSONString(textSyncScanResult)); + logger.error("safetyCheck textScan return failed,result:"+ JSON.toJSONString(textSyncScanResult)); throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); } else { if (!textSyncScanResult.getData().isAllPass()) { @@ -534,12 +534,14 @@ public class NoticeServiceImpl extends BaseServiceImpl }); Result imgScanResult = ScanContentUtils.imgSyncScan(scanApiUrl.concat(imgSyncScanMethod), imgScanParamDTO); if (!imgScanResult.success()) { + logger.error("safetyCheck imgScan return failed,result:"+ JSON.toJSONString(imgScanResult)); throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); - } else { - if (!imgScanResult.getData().isAllPass()) { - throw new RenException(EpmetErrorCode.IMG_SCAN_FAILED.getCode()); - } } + if (!imgScanResult.getData().isAllPass()) { + logger.warn(EpmetErrorCode.IMG_SCAN_FAILED.getMsg()); + throw new RenException(EpmetErrorCode.IMG_SCAN_FAILED.getCode()); + } + } }