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

Loading…
Cancel
Save