|
|
@ -438,44 +438,53 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD |
|
|
|
boolean isAllPass = true; |
|
|
|
List<VoiceResultDTO> list = voiceResults.getData(); |
|
|
|
for (VoiceResultDTO item : list) { |
|
|
|
TopicDraftScanTaskDTO taskDTO = topicDraftScanTaskService.getScanByTask(item.getTaskId()); |
|
|
|
if (TopicConstant.REVIEW.equals(item.getSuggestion())) { |
|
|
|
//结果不确定
|
|
|
|
TopicDraftAttachmentDTO dto = new TopicDraftAttachmentDTO(); |
|
|
|
dto.setId(item.getDataId()); |
|
|
|
dto.setId(taskDTO.getTopicDraftAttachmentId()); |
|
|
|
dto.setStatus(TopicConstant.REVIEW); |
|
|
|
dto.setReason(item.getLabelDesc()); |
|
|
|
topicDraftAttachmentService.update(dto); |
|
|
|
|
|
|
|
TopicDraftScanTaskDTO taskDTO = new TopicDraftScanTaskDTO(); |
|
|
|
taskDTO.setTaskId(item.getTaskId()); |
|
|
|
taskDTO.setStatus(TopicConstant.REVIEW); |
|
|
|
topicDraftScanTaskService.updateByTask(taskDTO); |
|
|
|
topicDraftScanTaskService.update(taskDTO); |
|
|
|
|
|
|
|
TopicDraftEntity draftEntity = new TopicDraftEntity(); |
|
|
|
draftEntity.setId(topic.getId()); |
|
|
|
draftEntity.setDraftStatus(TopicConstant.REVIEW); |
|
|
|
draftEntity.setDraftReason("需要人工审核"); |
|
|
|
baseDao.updateById(draftEntity); |
|
|
|
|
|
|
|
isAllPass = false; |
|
|
|
} else if (TopicConstant.BLOCK.equals(item.getSuggestion())) { |
|
|
|
//结果违规
|
|
|
|
TopicDraftAttachmentDTO dto = new TopicDraftAttachmentDTO(); |
|
|
|
dto.setId(item.getDataId()); |
|
|
|
dto.setId(taskDTO.getTopicDraftAttachmentId()); |
|
|
|
dto.setStatus(TopicConstant.BLOCK); |
|
|
|
dto.setReason(item.getLabelDesc()); |
|
|
|
topicDraftAttachmentService.update(dto); |
|
|
|
|
|
|
|
TopicDraftScanTaskDTO taskDTO = new TopicDraftScanTaskDTO(); |
|
|
|
taskDTO.setTaskId(item.getTaskId()); |
|
|
|
taskDTO.setStatus(TopicConstant.BLOCK); |
|
|
|
topicDraftScanTaskService.updateByTask(taskDTO); |
|
|
|
topicDraftScanTaskService.update(taskDTO); |
|
|
|
|
|
|
|
TopicDraftEntity draftEntity = new TopicDraftEntity(); |
|
|
|
draftEntity.setId(topic.getId()); |
|
|
|
draftEntity.setDraftStatus(TopicConstant.BLOCK); |
|
|
|
draftEntity.setDraftReason(item.getLabelDesc()); |
|
|
|
baseDao.updateById(draftEntity); |
|
|
|
|
|
|
|
isAllPass = false; |
|
|
|
} else { |
|
|
|
//审核通过
|
|
|
|
TopicDraftAttachmentDTO dto = new TopicDraftAttachmentDTO(); |
|
|
|
dto.setId(item.getDataId()); |
|
|
|
dto.setId(taskDTO.getTopicDraftAttachmentId()); |
|
|
|
dto.setStatus(TopicConstant.AUTO_PASSED); |
|
|
|
dto.setReason(item.getLabelDesc()); |
|
|
|
topicDraftAttachmentService.update(dto); |
|
|
|
|
|
|
|
TopicDraftScanTaskDTO taskDTO = new TopicDraftScanTaskDTO(); |
|
|
|
taskDTO.setTaskId(item.getTaskId()); |
|
|
|
taskDTO.setStatus(TopicConstant.AUTO_PASSED); |
|
|
|
topicDraftScanTaskService.updateByTask(taskDTO); |
|
|
|
topicDraftScanTaskService.update(taskDTO); |
|
|
|
} |
|
|
|
//审核通过,发布话题
|
|
|
|
if(isAllPass) { |
|
|
|