Ver código fonte

停车记录分页

guoshuai 4 semanas atrás
pai
commit
32eaeed316

+ 1 - 2
src/main/java/com/qmrb/system/service/impl/BarnRecordServiceImpl.java

@@ -99,7 +99,7 @@ public class BarnRecordServiceImpl extends ServiceImpl<BarnRecordMapper, BarnRec
         queryWrapper.ge(StrUtil.isNotBlank(queryParams.getIntimeBegin()), BarnRecord::getInTime, queryParams.getIntimeBegin()).le(StrUtil.isNotBlank(queryParams.getIntimeEnd()), BarnRecord::getInTime, queryParams.getIntimeEnd());
         queryWrapper.ge(StrUtil.isNotBlank(queryParams.getOutTimeBegin()), BarnRecord::getOutTime, queryParams.getOutTimeBegin()).le(StrUtil.isNotBlank(queryParams.getOutTimeEnd()), BarnRecord::getOutTime, queryParams.getOutTimeEnd());
 
-        queryWrapper.orderByDesc(BarnRecord::getCreateTime);
+        queryWrapper.orderByDesc(BarnRecord::getInTime);
         // 查询数据
         Page<BarnRecord> dictItemPage = this.page(new Page<>(pageNum, pageSize), queryWrapper
 
@@ -155,7 +155,6 @@ public class BarnRecordServiceImpl extends ServiceImpl<BarnRecordMapper, BarnRec
             
         }
         pageResult.setRecords(barnRecords);
-        pageResult.setTotal(barnRecords.size());
         return pageResult;
     }