Browse Source

话题语音

dev_shibei_match
zhaoqifeng 5 years ago
parent
commit
891a7b53db
  1. 10
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicDraftServiceImpl.java

10
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicDraftServiceImpl.java

@ -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);
}

Loading…
Cancel
Save