Browse Source

查询数据状态bug

wangys 5 years atrás
parent
commit
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) -> {