Browse Source

事件管理修改语音附件返参格式

feature/teamB_zz_wgh
sunyuchao 3 years ago
parent
commit
501379ad08
  1. 2
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java
  2. 10
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java

2
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java

@ -44,7 +44,7 @@ public class IcEventListResultDTO implements Serializable {
/** /**
* 音频[url集合] * 音频[url集合]
*/ */
private List<String> voiceList; private List<Attachment> voiceList;
/** /**
* 上报渠道 * 上报渠道
*/ */

10
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java

@ -135,12 +135,12 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
//每个事件对应的图片数据 //每个事件对应的图片数据
if(!CollectionUtils.isEmpty(dto.getAttachmentList())){ if(!CollectionUtils.isEmpty(dto.getAttachmentList())){
List<String> imageList = new ArrayList<>(); List<String> imageList = new ArrayList<>();
List<String> voiceList = new ArrayList<>(); List<IcEventListResultDTO.Attachment> voiceList = new ArrayList<>();
for(IcEventListResultDTO.Attachment file: dto.getAttachmentList()){ for(IcEventListResultDTO.Attachment file: dto.getAttachmentList()){
if ("image".equals(file.getType())) { if ("image".equals(file.getType())) {
imageList.add(file.getUrl()); imageList.add(file.getUrl());
} else if ("voice".equals(file.getType())) { } else if ("voice".equals(file.getType())) {
voiceList.add(file.getUrl()); voiceList.add(file);
} }
} }
dto.setImageList(imageList); dto.setImageList(imageList);
@ -993,7 +993,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
/** /**
* @Author sun * @Author sun
* @Description 事件管理-评价 * @Description 事件管理-详情
**/ **/
@Override @Override
public IcEventListResultDTO detail(IcEventListFormDTO formDTO) { public IcEventListResultDTO detail(IcEventListFormDTO formDTO) {
@ -1022,12 +1022,12 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
//每个事件对应的图片数据 //每个事件对应的图片数据
if(!CollectionUtils.isEmpty(resultDTO.getAttachmentList())){ if(!CollectionUtils.isEmpty(resultDTO.getAttachmentList())){
List<String> imageList = new ArrayList<>(); List<String> imageList = new ArrayList<>();
List<String> voiceList = new ArrayList<>(); List<IcEventListResultDTO.Attachment> voiceList = new ArrayList<>();
resultDTO.getAttachmentList().forEach(file -> { resultDTO.getAttachmentList().forEach(file -> {
if ("image".equals(file.getType())) { if ("image".equals(file.getType())) {
imageList.add(file.getUrl()); imageList.add(file.getUrl());
} else if ("voice".equals(file.getType())) { } else if ("voice".equals(file.getType())) {
voiceList.add(file.getUrl()); voiceList.add(file);
} }
}); });
resultDTO.setImageList(imageList); resultDTO.setImageList(imageList);

Loading…
Cancel
Save