|
|
@ -1598,7 +1598,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou |
|
|
|
textScanParamDTO.getTasks().add(taskDTO); |
|
|
|
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); |
|
|
|
if (!textSyncScanResult.success()) { |
|
|
|
logger.error("调用内容审核服务审核文本发生错误:{}", textSyncScanResult.getInternalMsg()); |
|
|
|
logger.warn("调用内容审核服务审核文本发生错误:{}", textSyncScanResult.getInternalMsg()); |
|
|
|
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); |
|
|
|
} else { |
|
|
|
if (!textSyncScanResult.getData().isAllPass()) { |
|
|
@ -1607,19 +1607,21 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou |
|
|
|
} |
|
|
|
|
|
|
|
// 图片内容审核
|
|
|
|
ImgScanParamDTO imgScanParamDTO = new ImgScanParamDTO(); |
|
|
|
ImgTaskDTO task = new ImgTaskDTO(); |
|
|
|
task.setDataId(UUID.randomUUID().toString().replace("-", "")); |
|
|
|
task.setUrl(groupHeadPhoto); |
|
|
|
imgScanParamDTO.getTasks().add(task); |
|
|
|
|
|
|
|
Result<SyncScanResult> imgScanResult = ScanContentUtils.imgSyncScan(scanApiUrl.concat(imgSyncScanMethod), imgScanParamDTO); |
|
|
|
if (!imgScanResult.success()){ |
|
|
|
logger.error("调用内容审核服务审核图片发生错误:{}", textSyncScanResult.getInternalMsg()); |
|
|
|
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); |
|
|
|
} else { |
|
|
|
if (!textSyncScanResult.getData().isAllPass()) { |
|
|
|
throw new RenException(EpmetErrorCode.IMG_SCAN_FAILED.getCode(), EpmetErrorCode.IMG_SCAN_FAILED.getMsg()); |
|
|
|
if(StringUtils.isNotBlank(groupHeadPhoto)){ |
|
|
|
ImgScanParamDTO imgScanParamDTO = new ImgScanParamDTO(); |
|
|
|
ImgTaskDTO task = new ImgTaskDTO(); |
|
|
|
task.setDataId(UUID.randomUUID().toString().replace("-", "")); |
|
|
|
task.setUrl(groupHeadPhoto); |
|
|
|
imgScanParamDTO.getTasks().add(task); |
|
|
|
|
|
|
|
Result<SyncScanResult> imgScanResult = ScanContentUtils.imgSyncScan(scanApiUrl.concat(imgSyncScanMethod), imgScanParamDTO); |
|
|
|
if (!imgScanResult.success()){ |
|
|
|
logger.warn("调用内容审核服务审核图片发生错误:{}", textSyncScanResult.getInternalMsg()); |
|
|
|
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); |
|
|
|
} else { |
|
|
|
if (!imgScanResult.getData().isAllPass()) { |
|
|
|
throw new RenException(EpmetErrorCode.IMG_SCAN_FAILED.getCode(), EpmetErrorCode.IMG_SCAN_FAILED.getMsg()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|