|
@ -197,19 +197,15 @@ public class TopicServiceImpl extends BaseServiceImpl<TopicDao, TopicEntity> imp |
|
|
textList.add(formDto.getTopicContent()); |
|
|
textList.add(formDto.getTopicContent()); |
|
|
CheckResultDTO contentResult = CheckDataUtils.checkContent(textList); |
|
|
CheckResultDTO contentResult = CheckDataUtils.checkContent(textList); |
|
|
CheckResultDTO imgResult = CheckDataUtils.checkImgs(formDto.getImages()); |
|
|
CheckResultDTO imgResult = CheckDataUtils.checkImgs(formDto.getImages()); |
|
|
if (contentResult != null && imgResult != null |
|
|
if((contentResult != null && !contentResult.getAllPass()) || (imgResult != null && !imgResult.getAllPass())){ |
|
|
&& 200 == contentResult.getDetails().get(0).getCode() |
|
|
|
|
|
&& 200 == imgResult.getDetails().get(0).getCode()) { |
|
|
|
|
|
if (!contentResult.getAllPass() || !imgResult.getAllPass()) { |
|
|
|
|
|
//组装要保存的信息
|
|
|
//组装要保存的信息
|
|
|
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(), |
|
|
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(), |
|
|
formDto.getNickname(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.GROUP_TOPIC.getCode(), textList, |
|
|
formDto.getNickname(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.GROUP_TOPIC.getCode(), textList, |
|
|
formDto.getImages(), null,contentResult, imgResult,null); |
|
|
formDto.getImages(), null,contentResult, imgResult,null); |
|
|
contentSecurityFeign.insertViolationsRecord(record); |
|
|
contentSecurityFeign.insertViolationsRecord(record); |
|
|
return new Result().error(CheckDataUtils.violations_message); |
|
|
return new Result().error(CheckDataUtils.violations_message); |
|
|
} |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
logger.error("解析审核结果异常contentResult:" + contentResult + "---imgResult:" + imgResult); |
|
|
logger.info("未进入违规信息记录contentResult:" + contentResult + "---imgResult:" + imgResult); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
TopicEntity entity = ConvertUtils.sourceToTarget(formDto, TopicEntity.class); |
|
|
TopicEntity entity = ConvertUtils.sourceToTarget(formDto, TopicEntity.class); |
|
@ -236,9 +232,7 @@ public class TopicServiceImpl extends BaseServiceImpl<TopicDao, TopicEntity> imp |
|
|
groupTopicUserReadService.insertBatch(readEntities); |
|
|
groupTopicUserReadService.insertBatch(readEntities); |
|
|
|
|
|
|
|
|
//保存待审核记录
|
|
|
//保存待审核记录
|
|
|
if (contentResult != null && imgResult != null |
|
|
if (contentResult != null || imgResult != null) { |
|
|
&& 200 == contentResult.getDetails().get(0).getCode() |
|
|
|
|
|
&& 200 == imgResult.getDetails().get(0).getCode()) { |
|
|
|
|
|
CheckResultMessageDTO twoTypes = CheckDataUtils.checkTwoTypes(contentResult, imgResult); |
|
|
CheckResultMessageDTO twoTypes = CheckDataUtils.checkTwoTypes(contentResult, imgResult); |
|
|
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) { |
|
|
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) { |
|
|
//组装要保存的信息
|
|
|
//组装要保存的信息
|
|
|