Browse Source

运营端获取小程序草稿箱接口设置按草稿创建时间降序

dev_shibei_match
sunyuchao 4 years ago
parent
commit
2f4337fdba
  1. 9
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java

9
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java

@ -779,6 +779,15 @@ public class CodeServiceImpl implements CodeService {
dto.setCreateTime(DateUtils.formatTimestamp(temp.getCreateTime(), DateUtils.DATE_TIME_PATTERN));
resultList.add(dto);
});
//按时间降序
if (resultList.size() > NumConstant.ZERO) {
Collections.sort(resultList, new Comparator<TemplateDraftListResultDTO>() {
@Override
public int compare(TemplateDraftListResultDTO o1, TemplateDraftListResultDTO o2) {
return o2.getCreateTime().compareTo(o1.getCreateTime());
}
});
}
return resultList;
}

Loading…
Cancel
Save