|
|
@ -298,9 +298,9 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD |
|
|
|
} |
|
|
|
} |
|
|
|
List<VoiceTaskDTO> voiceDTOList = new ArrayList<>(); |
|
|
|
if(CollectionUtils.isNotEmpty(formDTO.getVideoList())){ |
|
|
|
if(CollectionUtils.isNotEmpty(formDTO.getVoiceList())){ |
|
|
|
int sort = 0; |
|
|
|
for(FileDTO file : formDTO.getVideoList()){ |
|
|
|
for(FileDTO file : formDTO.getVoiceList()){ |
|
|
|
TopicDraftAttachmentDTO attachment = new TopicDraftAttachmentDTO(); |
|
|
|
attachment.setCustomerId(formDTO.getCustomerId()); |
|
|
|
attachment.setAttachmentUrl(file.getUrl()); |
|
|
@ -309,6 +309,7 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD |
|
|
|
attachment.setAttachmentFormat(file.getUrl().substring(file.getUrl().lastIndexOf(".") + NumConstant.ONE).toLowerCase()); |
|
|
|
attachment.setSort(sort++); |
|
|
|
attachment.setAttachmentType("voice"); |
|
|
|
attachment.setDuration(file.getDuration()); |
|
|
|
attachment.setStatus(TopicConstant.AUDITING); |
|
|
|
topicDraftAttachmentService.save(attachment); |
|
|
|
|
|
|
@ -680,9 +681,9 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD |
|
|
|
throw new RenException(ModuleConstant.NO_PRIMARY_KEY_RETURNED); |
|
|
|
} |
|
|
|
if(CollectionUtils.isNotEmpty(formDTO.getImageList())){ |
|
|
|
ResiTopicAttachmentEntity attachment = new ResiTopicAttachmentEntity(); |
|
|
|
int sort = 0; |
|
|
|
for(String url : formDTO.getImageList()){ |
|
|
|
ResiTopicAttachmentEntity attachment = new ResiTopicAttachmentEntity(); |
|
|
|
attachment.setAttachmentUrl(url); |
|
|
|
attachment.setTopicId(topic.getId()); |
|
|
|
attachment.setCreatedBy(tokenDto.getUserId()); |
|
|
@ -694,14 +695,15 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD |
|
|
|
} |
|
|
|
|
|
|
|
if(CollectionUtils.isNotEmpty(formDTO.getVoiceList())){ |
|
|
|
ResiTopicAttachmentEntity attachment = new ResiTopicAttachmentEntity(); |
|
|
|
int sort = 0; |
|
|
|
for(FileDTO file : formDTO.getVoiceList()){ |
|
|
|
ResiTopicAttachmentEntity attachment = new ResiTopicAttachmentEntity(); |
|
|
|
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.setDuration(file.getDuration()); |
|
|
|
attachment.setAttachmentType("voice"); |
|
|
|
resiTopicAttachmentDao.insertOne(attachment); |
|
|
|
} |
|
|
|