|
|
@ -739,6 +739,9 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD |
|
|
|
ResiTopicEntity resiTopic = ConvertUtils.sourceToTarget(draft, ResiTopicEntity.class); |
|
|
|
resiTopic.setId(null); |
|
|
|
resiTopic.setStatus(TopicConstant.PUBLISHMENT); |
|
|
|
resiTopic.setCreatedTime(null); |
|
|
|
resiTopic.setUpdatedBy(draft.getCreatedBy()); |
|
|
|
resiTopic.setUpdatedTime(null); |
|
|
|
resiTopicDao.insert(resiTopic); |
|
|
|
entity = new TopicDraftEntity(); |
|
|
|
entity.setId(formDTO.getTopicDraftId()); |
|
|
@ -747,11 +750,11 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD |
|
|
|
//将草稿附件存入附件表
|
|
|
|
List<TopicDraftAttachmentDTO> attachmentList = topicDraftAttachmentService.getFileList(formDTO.getTopicDraftId(), null); |
|
|
|
List<ResiTopicAttachmentEntity> topicAttachments = ConvertUtils.sourceToTarget(attachmentList, ResiTopicAttachmentEntity.class); |
|
|
|
topicAttachments.forEach(item -> { |
|
|
|
item.setTopicId(resiTopic.getId()); |
|
|
|
}); |
|
|
|
topicAttachments.forEach(item -> { |
|
|
|
item.setId(null); |
|
|
|
item.setTopicId(resiTopic.getId()); |
|
|
|
item.setCreatedBy(draft.getCreatedBy()); |
|
|
|
item.setUpdatedBy(draft.getCreatedBy()); |
|
|
|
}); |
|
|
|
resiTopicAttachmentDao.insertBatch(topicAttachments); |
|
|
|
//将音频状态改为approved
|
|
|
|