|
|
@ -389,7 +389,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
coverEntity.setCustomerId(tokenDto.getCustomerId()); |
|
|
|
coverEntity.setDraftId(fromDTO.getDraftId()); |
|
|
|
coverEntity.setImgUrl(coverImg); |
|
|
|
coverEntity.setAuditStatus(ModuleConstant.AUDIT_STATUS_PASS); |
|
|
|
coverEntity.setAuditStatus(""); |
|
|
|
coverEntity.setAuditReason(""); |
|
|
|
coverEntity.setDelFlag(NumConstant.ZERO_STR); |
|
|
|
return coverEntity; |
|
|
@ -456,7 +456,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
entity.setDraftId(fromDTO.getDraftId()); |
|
|
|
entity.setOrderNum(i + 1); |
|
|
|
//默认通过
|
|
|
|
entity.setAuditStatus(ModuleConstant.AUDIT_STATUS_PASS); |
|
|
|
entity.setAuditStatus(""); |
|
|
|
newContentList.add(entity); |
|
|
|
} |
|
|
|
|
|
|
@ -938,10 +938,16 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
//todo 执行审核
|
|
|
|
SyncScanResult imgSyncScanResult = ScanContentUtils.imgSyncScan(scanApiHost.concat(imgSyncScanMethod),imgScanParamDTO); |
|
|
|
SyncScanResult textSyncScanResult = ScanContentUtils.textSyncScan(scanApiHost.concat(textSyncScanMethod),textScanParamDTO); |
|
|
|
SyncScanResult imgSyncScanResult = null; |
|
|
|
SyncScanResult textSyncScanResult = null; |
|
|
|
try { |
|
|
|
imgSyncScanResult = ScanContentUtils.imgSyncScan(scanApiHost.concat(imgSyncScanMethod),imgScanParamDTO); |
|
|
|
textSyncScanResult = ScanContentUtils.textSyncScan(scanApiHost.concat(textSyncScanMethod),textScanParamDTO); |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("scanContent exception",e); |
|
|
|
this.sendMsg(draftEntity.getTitle(),String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draftEntity.getTitle()); |
|
|
|
this.updateDraftPublishStatus(draftId,DraftConstant.AUDITFAIL) |
|
|
|
} |
|
|
|
SyncScanResult result = new SyncScanResult(); |
|
|
|
if (imgSyncScanResult.isAllPass()){ |
|
|
|
result.setAllPass(imgSyncScanResult.isAllPass()); |
|
|
@ -981,6 +987,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("scanAllPassPublishArticle update db exception", e); |
|
|
|
this.sendMsg(draft.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draft.getTitle())); |
|
|
|
this.updateDraftPublishStatus(draftId,DraftConstant.AUDITFAIL) |
|
|
|
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg()); |
|
|
|
} |
|
|
|
|
|
|
@ -998,6 +1005,14 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
draftContentDao.updateAuditStatusById(id,ModuleConstant.AUDIT_STATUS_FAIL); |
|
|
|
} |
|
|
|
}); |
|
|
|
List<String> successDataIds = syncScanResult.getSuccessDataIds(); |
|
|
|
successDataIds.forEach(id->{ |
|
|
|
if (id.indexOf(ModuleConstant.SCAN_COVER_PREFIX)>=0){ |
|
|
|
draftCoverDao.updateAuditStatusById(id,ModuleConstant.AUDIT_STATUS_PASS); |
|
|
|
}else{ |
|
|
|
draftContentDao.updateAuditStatusById(id,ModuleConstant.AUDIT_STATUS_PASS); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
@ -1014,10 +1029,13 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
formDTO.setTitle(String.format(ModuleConstant.MSG_TITLE,title)); |
|
|
|
formDTO.setMessageContent(content); |
|
|
|
formDTO.setReadFlag(ReadFlagConstant.UN_READ); |
|
|
|
|
|
|
|
return epmetMessageOpenFeignClient.saveUserMessage(formDTO); |
|
|
|
} |
|
|
|
|
|
|
|
private void updateDraftPublishStatus(String draftId,String statusFlag){ |
|
|
|
draftDao.updateAuditStatusById(draftId,statusFlag); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 更新DB的标签使用次数 政府端 |
|
|
|
* @param draftId |
|
|
|