| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -217,19 +217,21 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public Result createTopic(TokenDto tokenDto, ResiTopicPublishFormDTO resiTopicPublishFormDTO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        String topicContent = resiTopicPublishFormDTO.getTopicContent(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<String> attachmentList = resiTopicPublishFormDTO.getAttachmentList(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //创建话题内容审核
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        TextTaskDTO taskDTO = new TextTaskDTO(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        taskDTO.setContent(topicContent); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        taskDTO.setDataId(UUID.randomUUID().toString().replace("-", "")); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        textScanParamDTO.getTasks().add(taskDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (!textSyncScanResult.success()){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (!textSyncScanResult.getData().isAllPass()) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                log.error(String.format(TopicConstant.CREATE_TOPIC,topicContent)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (StringUtils.isNotBlank(topicContent)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //创建话题内容审核
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            TextTaskDTO taskDTO = new TextTaskDTO(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            taskDTO.setContent(topicContent); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            taskDTO.setDataId(UUID.randomUUID().toString().replace("-", "")); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            textScanParamDTO.getTasks().add(taskDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (!textSyncScanResult.success()) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                if (!textSyncScanResult.getData().isAllPass()) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    log.error(String.format(TopicConstant.CREATE_TOPIC, topicContent)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //创建话题图片审核
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -1099,24 +1101,26 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //话题转议题审核:标题、建议
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        String issueTitle = topicTurnIssueFromDTO.getIssueTitle(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        String suggestion = topicTurnIssueFromDTO.getSuggestion(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        TextScanParamDTO textScan = new TextScanParamDTO(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //标题
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        TextTaskDTO taskTitle = new TextTaskDTO(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        taskTitle.setContent(issueTitle); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        taskTitle.setDataId(UUID.randomUUID().toString().replace("-", "")); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        textScan.getTasks().add(taskTitle); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //建议
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        TextTaskDTO taskSuggestion = new TextTaskDTO(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        taskSuggestion.setDataId(UUID.randomUUID().toString().replace("-", "")); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        taskSuggestion.setContent(suggestion); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        textScan.getTasks().add(taskSuggestion); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScan); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (!textSyncScanResult.success()){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (!textSyncScanResult.getData().isAllPass()) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                log.error(String.format(TopicConstant.SHIFT_ISSUE,issueTitle,suggestion)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (StringUtils.isNotBlank(issueTitle) || StringUtils.isNotBlank(suggestion)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            TextScanParamDTO textScan = new TextScanParamDTO(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //标题
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            TextTaskDTO taskTitle = new TextTaskDTO(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            taskTitle.setContent(issueTitle); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            taskTitle.setDataId(UUID.randomUUID().toString().replace("-", "")); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            textScan.getTasks().add(taskTitle); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //建议
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            TextTaskDTO taskSuggestion = new TextTaskDTO(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            taskSuggestion.setDataId(UUID.randomUUID().toString().replace("-", "")); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            taskSuggestion.setContent(suggestion); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            textScan.getTasks().add(taskSuggestion); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScan); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (!textSyncScanResult.success()) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                if (!textSyncScanResult.getData().isAllPass()) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    log.error(String.format(TopicConstant.SHIFT_ISSUE, issueTitle, suggestion)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //1.统一时间(群组服务 -> 议题服务)
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |