Browse Source

数据查询排序

wangys 5 years ago
parent
commit
8fad1a20b6

+ 2 - 2
efunbox-base/efunbox-base-api/src/main/java/cn/efunbox/manage/base/service/impl/ManageServiceImpl.java

@@ -61,10 +61,10 @@ public class ManageServiceImpl implements ManageService {
 
     @Override
     public ApiResult list(ManageVO manageVO) {
-        Pageable pageable = new PageRequest(manageVO.getPageNo() - 1, manageVO.getPageSize(), SortHelper.sortMap2Sort(new LinkedHashMap<String, BaseOrderEnum>(){{put("status", BaseOrderEnum.ASC);put("gmtModified", BaseOrderEnum.DESC);}}));
+        Pageable pageable = new PageRequest(manageVO.getPageNo() - 1, manageVO.getPageSize(), SortHelper.sortMap2Sort(new LinkedHashMap<String, BaseOrderEnum>(){{put("status", BaseOrderEnum.ASC);put("happenTime", BaseOrderEnum.DESC);}}));
 //        manageVO.setStatus(BaseStatusEnum.NORMAL);
         if(!manageVO.getIsEntry()){
-            pageable = new PageRequest(manageVO.getPageNo() - 1,manageVO.getPageSize(), SortHelper.sortMap2Sort(new LinkedHashMap<String, BaseOrderEnum>(){{put("status", BaseOrderEnum.ASC);put("happenTime", BaseOrderEnum.DESC);}}));
+            //pageable = new PageRequest(manageVO.getPageNo() - 1,manageVO.getPageSize(), SortHelper.sortMap2Sort(new LinkedHashMap<String, BaseOrderEnum>(){{put("status", BaseOrderEnum.ASC);put("happenTime", BaseOrderEnum.DESC);}}));
             manageVO.setStatus(BaseStatusEnum.NORMAL);
         }
         Specification specification = (Specification<Manage>) (root, criteriaQuery, criteriaBuilder) -> {