|
|
@ -570,6 +570,7 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD |
|
|
|
result.setReleaseTime(new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE).format(entity.getCreatedTime())); |
|
|
|
result.setTopicContent(entity.getTopicContent()); |
|
|
|
result.setReleaseAddress(entity.getAddress()); |
|
|
|
result.setReason(entity.getDraftReason()); |
|
|
|
if (TopicConstant.AUDITING.equals(entity.getDraftStatus()) || TopicConstant.REVIEW.equals(entity.getDraftStatus())) { |
|
|
|
result.setStatus(TopicConstant.AUDITING); |
|
|
|
} else if (TopicConstant.BLOCK.equals(entity.getDraftStatus()) || TopicConstant.REJECTED.equals(entity.getDraftStatus())) { |
|
|
@ -581,7 +582,13 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD |
|
|
|
result.setImageList(imageUrls); |
|
|
|
|
|
|
|
//3.查询话题音频附件
|
|
|
|
List<String> voiceUrls = topicDraftAttachmentService.getFileList(formDTO.getTopicDraftId(), TopicConstant.VOICE).stream().map(TopicDraftAttachmentDTO::getAttachmentUrl).collect(Collectors.toList()); |
|
|
|
List<FileDTO> voiceUrls = |
|
|
|
topicDraftAttachmentService.getFileList(formDTO.getTopicDraftId(), TopicConstant.VOICE).stream().map(item ->{ |
|
|
|
FileDTO fileDTO = new FileDTO(); |
|
|
|
fileDTO.setUrl(item.getAttachmentUrl()); |
|
|
|
fileDTO.setDuration(item.getDuration()); |
|
|
|
return fileDTO; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
result.setVoiceList(voiceUrls); |
|
|
|
|
|
|
|
//3.拿取用户信息
|
|
|
@ -629,7 +636,7 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD |
|
|
|
if (TopicConstant.APPROVED.equals(formDTO.getAuditType())) { |
|
|
|
TopicDraftEntity draft = baseDao.selectById(formDTO.getTopicDraftId()); |
|
|
|
//将草稿存入话题表
|
|
|
|
ResiTopicEntity resiTopic = ConvertUtils.sourceToTarget(entity, ResiTopicEntity.class); |
|
|
|
ResiTopicEntity resiTopic = ConvertUtils.sourceToTarget(draft, ResiTopicEntity.class); |
|
|
|
resiTopic.setId(null); |
|
|
|
resiTopic.setStatus(TopicConstant.PUBLISHMENT); |
|
|
|
resiTopicDao.insert(resiTopic); |
|
|
@ -654,7 +661,9 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD |
|
|
|
breviary.append("\""); |
|
|
|
breviary.append(draft.getTopicContent().length() > NumConstant.TEN ? (draft.getTopicContent().substring(NumConstant.TEN) + "…") : draft.getTopicContent()); |
|
|
|
breviary.append("\""); |
|
|
|
}else breviary.append("语音话题"); |
|
|
|
}else { |
|
|
|
breviary.append("语音话题"); |
|
|
|
} |
|
|
|
sendMqMsg(draft.getCreatedBy(), draft.getCustomerId(),draft.getCreatedTime(),resiGroupRedis.get(draft.getGroupId()).getGroupName(),breviary.toString()); |
|
|
|
} |
|
|
|
//记录操作记录
|
|
|
|