Browse Source

话题语音

master
zhaoqifeng 5 years ago
parent
commit
ec6eda6930
  1. 2
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/CreateTopicFormDTO.java
  2. 14
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicDraftServiceImpl.java

2
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/CreateTopicFormDTO.java

@ -62,7 +62,7 @@ public class CreateTopicFormDTO implements Serializable {
/**
* 图片附件
*/
private List<FileDTO> imageList;
private List<String> imageList;
/**
* 文件附件
*/

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

@ -279,18 +279,18 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD
if(CollectionUtils.isNotEmpty(formDTO.getImageList())){
TopicDraftAttachmentDTO attachment = new TopicDraftAttachmentDTO();
int sort = 0;
for(FileDTO file : formDTO.getImageList()){
attachment.setAttachmentUrl(file.getUrl());
for(String url : formDTO.getImageList()){
attachment.setAttachmentUrl(url);
attachment.setTopicDraftId(topic.getId());
attachment.setCreatedBy(tokenDto.getUserId());
attachment.setAttachmentFormat(file.getUrl().substring(file.getUrl().lastIndexOf(".") + NumConstant.ONE).toLowerCase());
attachment.setAttachmentFormat(url.substring(url.lastIndexOf(".") + NumConstant.ONE).toLowerCase());
attachment.setSort(sort++);
attachment.setAttachmentType("image");
topicDraftAttachmentService.save(attachment);
ImgTaskDTO task = new ImgTaskDTO();
task.setDataId(attachment.getId());
task.setUrl(file.getUrl());
task.setUrl(url);
imageDTOList.add(task);
}
}
@ -671,11 +671,11 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD
if(CollectionUtils.isNotEmpty(formDTO.getImageList())){
ResiTopicAttachmentEntity attachment = new ResiTopicAttachmentEntity();
int sort = 0;
for(FileDTO file : formDTO.getImageList()){
attachment.setAttachmentUrl(file.getUrl());
for(String url : formDTO.getImageList()){
attachment.setAttachmentUrl(url);
attachment.setTopicId(topic.getId());
attachment.setCreatedBy(tokenDto.getUserId());
attachment.setAttachmentFormat(file.getUrl().substring(file.getUrl().lastIndexOf(".") + NumConstant.ONE).toLowerCase());
attachment.setAttachmentFormat(url.substring(url.lastIndexOf(".") + NumConstant.ONE).toLowerCase());
attachment.setSort(sort++);
attachment.setAttachmentType("image");
resiTopicAttachmentDao.insertOne(attachment);

Loading…
Cancel
Save