浏览代码

查询数据状态bug

wangys 5 年之前
父节点
当前提交
c50cb0b3fa

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

@@ -48,11 +48,11 @@ 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("happenTime", BaseOrderEnum.DESC);}}));
+        Pageable pageable = new PageRequest(manageVO.getPageNo() - 1, manageVO.getPageSize(), SortHelper.sortMap2Sort(new LinkedHashMap<String, BaseOrderEnum>(){{put("gmtModified", BaseOrderEnum.DESC);}}));
 //        manageVO.setStatus(BaseStatusEnum.NORMAL);
-        if(manageVO.getIsEntry()){
+        if(!manageVO.getIsEntry()){
+            pageable = new PageRequest(manageVO.getPageNo() - 1,manageVO.getPageSize(), SortHelper.sortMap2Sort(new LinkedHashMap<String, BaseOrderEnum>(){{put("happenTime", BaseOrderEnum.DESC);}}));
             manageVO.setStatus(BaseStatusEnum.NORMAL);
-            pageable = new PageRequest(manageVO.getPageNo() - 1, manageVO.getPageSize(), SortHelper.sortMap2Sort(new LinkedHashMap<String, BaseOrderEnum>(){{put("gmtModified", BaseOrderEnum.DESC);}}));
         }
         Specification specification = (Specification<Manage>) (root, criteriaQuery, criteriaBuilder) -> {