Browse Source

添加日志

master
jianjun 5 years ago
parent
commit
bc05301fc8
  1. 4
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java
  2. 10
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

4
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java

@ -225,6 +225,7 @@ public class ArticleController {
@Async
public void scanContent(TokenDto tokenDto,String draftId){
try {
SyncScanResult syncScanResult = articleService.scanContent(tokenDto, draftId);
if (syncScanResult == null) {
log.error("scanContent draftId:{} return result null", draftId);
@ -234,6 +235,9 @@ public class ArticleController {
} else {
articleService.updateAuditStatusFailById(draftId, syncScanResult);
}
} catch (Exception e) {
log.error("scanContent exception draftId:{} return result null", e);
}
}

10
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

@ -951,10 +951,17 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
SyncScanResult imgSyncScanResult = null;
SyncScanResult textSyncScanResult = null;
if(!CollectionUtils.isEmpty(imgScanParamDTO.getTasks())){
log.info("scanContent imgScanParamDTO:{}", JSON.toJSONString(imgScanParamDTO));
log.info("scanContent textScanParamDTO:{}", JSON.toJSONString(textScanParamDTO));
imgSyncScanResult = ScanContentUtils.imgSyncScan(scanApiHost.concat(imgSyncScanMethod), imgScanParamDTO);
log.info("scanContent imgSyncScanResult:{}", JSON.toJSONString(imgSyncScanResult));
}
if(!CollectionUtils.isEmpty(textScanParamDTO.getTasks())){
log.info("scanContent textScanParamDTO:{}", JSON.toJSONString(textScanParamDTO));
textSyncScanResult = ScanContentUtils.textSyncScan(scanApiHost.concat(textSyncScanMethod), textScanParamDTO);
log.info("scanContent textSyncScanResult:{}", JSON.toJSONString(textSyncScanResult));
}
result = new SyncScanResult();
if (imgSyncScanResult.isAllPass()) {
@ -972,6 +979,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
this.sendMsg(draftEntity.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draftEntity.getTitle()));
this.updateDraftPublishStatus(draftId, DraftConstant.AUDITFAIL);
}
log.error("scanContent result", JSON.toJSONString(result));
return result;
}
@Override

Loading…
Cancel
Save