Commit c32a8d16 authored by Shen's avatar Shen

1. 调整部分接口信息返回内容的顺序

parent d4799cea
...@@ -19,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -19,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* 订单表 * 订单表
...@@ -131,7 +132,9 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe ...@@ -131,7 +132,9 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
list.addAll(list2); list.addAll(list2);
} }
// page.setTotal(list.size()); // page.setTotal(list.size());
return getPageData(getSubList(params, list), list.size(), PensionOrderDTO.class); List<PensionOrderDTO> sortList = list.stream().sorted(Comparator.comparing(PensionOrderDTO::getAppointmentTime)).collect(Collectors.toList());
Collections.reverse(sortList);
return getPageData(getSubList(params, sortList), sortList.size(), PensionOrderDTO.class);
} }
@Override @Override
...@@ -163,8 +166,9 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe ...@@ -163,8 +166,9 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
result.addAll(list); result.addAll(list);
} }
// page.setTotal(result.size()); // page.setTotal(result.size());
List<PensionOrderDTO> sortList = result.stream().sorted(Comparator.comparing(PensionOrderDTO::getAppointmentTime)).collect(Collectors.toList());
return getPageData(getSubList(params, result), result.size(), PensionOrderDTO.class); Collections.reverse(sortList);
return getPageData(getSubList(params, sortList), sortList.size(), PensionOrderDTO.class);
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment