|
@@ -49,20 +49,18 @@ public class MesLineService extends ServiceImpl<MesLineMapper, MesLine> implemen
|
|
* @param bo
|
|
* @param bo
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public IPage<MesLineVO> queryList(MesLineBO bo) {
|
|
|
|
- Long current = bo.getCurrent();// 当前页码
|
|
|
|
- Long size = bo.getSize();// 每页显示条数
|
|
|
|
- Long offset = (current - 1) * size;
|
|
|
|
|
|
+ public IPage<MesLineVO> queryList(MesLineBO bo,int pageNum,int pageSize) {
|
|
|
|
+ int offset = (pageNum - 1) * pageSize;
|
|
Map<String, Object> params = new HashMap<>();
|
|
Map<String, Object> params = new HashMap<>();
|
|
params.put("boy", bo);
|
|
params.put("boy", bo);
|
|
params.put("offset", offset);
|
|
params.put("offset", offset);
|
|
- params.put("pageSize", size);
|
|
|
|
|
|
+ params.put("pageSize", pageSize);
|
|
// 获取总记录数
|
|
// 获取总记录数
|
|
int total = mesLineMapper.countByParams(params);
|
|
int total = mesLineMapper.countByParams(params);
|
|
//开始分页查询
|
|
//开始分页查询
|
|
List<MesLineVO> records = mesLineMapper.queryListPage(params);
|
|
List<MesLineVO> records = mesLineMapper.queryListPage(params);
|
|
// 创建并返回 Page 对象
|
|
// 创建并返回 Page 对象
|
|
- return new Page<MesLineVO>(current, size, total).setRecords(records);
|
|
|
|
|
|
+ return new Page<MesLineVO>(pageNum, pageSize, total).setRecords(records);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|