|
|
@ -279,18 +279,18 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD |
|
|
|
if(CollectionUtils.isNotEmpty(formDTO.getImageList())){ |
|
|
|
TopicDraftAttachmentDTO attachment = new TopicDraftAttachmentDTO(); |
|
|
|
int sort = 0; |
|
|
|
for(String url : formDTO.getImageList()){ |
|
|
|
attachment.setAttachmentUrl(url); |
|
|
|
for(FileDTO file : formDTO.getImageList()){ |
|
|
|
attachment.setAttachmentUrl(file.getUrl()); |
|
|
|
attachment.setTopicDraftId(topic.getId()); |
|
|
|
attachment.setCreatedBy(tokenDto.getUserId()); |
|
|
|
attachment.setAttachmentFormat(url.substring(url.lastIndexOf(".") + NumConstant.ONE).toLowerCase()); |
|
|
|
attachment.setAttachmentFormat(file.getUrl().substring(file.getUrl().lastIndexOf(".") + NumConstant.ONE).toLowerCase()); |
|
|
|
attachment.setSort(sort++); |
|
|
|
attachment.setAttachmentType("image"); |
|
|
|
topicDraftAttachmentService.save(attachment); |
|
|
|
|
|
|
|
ImgTaskDTO task = new ImgTaskDTO(); |
|
|
|
task.setDataId(attachment.getId()); |
|
|
|
task.setUrl(url); |
|
|
|
task.setUrl(file.getUrl()); |
|
|
|
imageDTOList.add(task); |
|
|
|
} |
|
|
|
} |
|
|
@ -298,18 +298,18 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD |
|
|
|
if(CollectionUtils.isNotEmpty(formDTO.getVideoList())){ |
|
|
|
TopicDraftAttachmentDTO attachment = new TopicDraftAttachmentDTO(); |
|
|
|
int sort = 0; |
|
|
|
for(String url : formDTO.getVideoList()){ |
|
|
|
attachment.setAttachmentUrl(url); |
|
|
|
for(FileDTO file : formDTO.getVideoList()){ |
|
|
|
attachment.setAttachmentUrl(file.getUrl()); |
|
|
|
attachment.setTopicDraftId(topic.getId()); |
|
|
|
attachment.setCreatedBy(tokenDto.getUserId()); |
|
|
|
attachment.setAttachmentFormat(url.substring(url.lastIndexOf(".") + NumConstant.ONE).toLowerCase()); |
|
|
|
attachment.setAttachmentFormat(file.getUrl().substring(file.getUrl().lastIndexOf(".") + NumConstant.ONE).toLowerCase()); |
|
|
|
attachment.setSort(sort++); |
|
|
|
attachment.setAttachmentType("voice"); |
|
|
|
topicDraftAttachmentService.save(attachment); |
|
|
|
|
|
|
|
VoiceTaskDTO task = new VoiceTaskDTO(); |
|
|
|
task.setDataId(attachment.getId()); |
|
|
|
task.setUrl(url); |
|
|
|
task.setUrl(file.getUrl()); |
|
|
|
voiceDTOList.add(task); |
|
|
|
} |
|
|
|
} |
|
|
@ -671,17 +671,31 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD |
|
|
|
if(CollectionUtils.isNotEmpty(formDTO.getImageList())){ |
|
|
|
ResiTopicAttachmentEntity attachment = new ResiTopicAttachmentEntity(); |
|
|
|
int sort = 0; |
|
|
|
for(String url : formDTO.getImageList()){ |
|
|
|
attachment.setAttachmentUrl(url); |
|
|
|
for(FileDTO file : formDTO.getImageList()){ |
|
|
|
attachment.setAttachmentUrl(file.getUrl()); |
|
|
|
attachment.setTopicId(topic.getId()); |
|
|
|
attachment.setCreatedBy(tokenDto.getUserId()); |
|
|
|
attachment.setAttachmentFormat(url.substring(url.lastIndexOf(".") + NumConstant.ONE).toLowerCase()); |
|
|
|
attachment.setAttachmentFormat(file.getUrl().substring(file.getUrl().lastIndexOf(".") + NumConstant.ONE).toLowerCase()); |
|
|
|
attachment.setSort(sort++); |
|
|
|
attachment.setAttachmentType("image"); |
|
|
|
resiTopicAttachmentDao.insertOne(attachment); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(CollectionUtils.isNotEmpty(formDTO.getVoiceList())){ |
|
|
|
ResiTopicAttachmentEntity attachment = new ResiTopicAttachmentEntity(); |
|
|
|
int sort = 0; |
|
|
|
for(FileDTO file : formDTO.getVoiceList()){ |
|
|
|
attachment.setAttachmentUrl(file.getUrl()); |
|
|
|
attachment.setTopicId(topic.getId()); |
|
|
|
attachment.setCreatedBy(tokenDto.getUserId()); |
|
|
|
attachment.setAttachmentFormat(file.getUrl().substring(file.getUrl().lastIndexOf(".") + NumConstant.ONE).toLowerCase()); |
|
|
|
attachment.setSort(sort++); |
|
|
|
attachment.setAttachmentType("voice"); |
|
|
|
resiTopicAttachmentDao.insertOne(attachment); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//3.话题操作记录
|
|
|
|
ResiTopicOperationEntity operation = new ResiTopicOperationEntity(); |
|
|
|
operation.setTopicId(topic.getId()); |
|
|
|