public TableDataInfo list(TAllParam tAllParam) { startPage(); //List<TAllParam> list = tAllParamService.selectTAllParamList(tAllParam); List<TAllParam> list = tAllParamService.selectList(tAllParam); // new LambdaQueryWrapper<TAllParam>().like(StringUtils.isNotBlank(tAllParam.getMsc()),TAllParam::getMsc,StringUtils.isNotBlank(tAllParam.getMsc())?tAllParam.getMsc().toUpperCase():"") // .like(StringUtils.isNotBlank(tAllParam.getClxh()),TAllParam::getClxh,tAllParam.getClxh()) // .like(StringUtils.isNotBlank(tAllParam.getHbpl()),TAllParam::getHbpl,tAllParam.getHbpl()) // .like(StringUtils.isNotBlank(tAllParam.getVehRlzl()),TAllParam::getVehRlzl,tAllParam.getVehRlzl()) // .like(StringUtils.isNotBlank(tAllParam.getClyyxzcbh()),TAllParam::getClyyxzcbh,tAllParam.getClyyxzcbh()) // .like(StringUtils.isNotBlank(tAllParam.getVehZbzl()),TAllParam::getVehZbzl,tAllParam.getVehZbzl()) for (TAllParam param: list) { if (StringUtils.isNotBlank(param.getBlcVin())){ param.setBlc("是"); }else { param.setBlc("否"); } } // 如果查询条件中有blc字段,则按照该字段进行匹配查询 if (StringUtils.isNotBlank(tAllParam.getBlc())) { list = list.stream().filter(param -> tAllParam.getBlc().equals(param.getBlc())).collect(Collectors.toList()); } return getDataTable(list);这样根据查询‘保留车’得到的数据只是第一页的(带了分页的),如何查询出不带分页的
时间: 2024-03-17 19:43:05 浏览: 55
spring-boot List转Page的方法步骤
要查询不带分页的数据,可以将 `startPage()` 方法注释掉,这样就不会开启分页功能,查询出的数据就是全部数据,而不是只有第一页的数据。修改后的代码如下:
```
public TableDataInfo list(TAllParam tAllParam) {
//startPage(); // 注释掉该行代码
List<TAllParam> list = tAllParamService.selectList(tAllParam);
for (TAllParam param: list) {
if (StringUtils.isNotBlank(param.getBlc())) {
param.setBlc("是");
} else {
param.setBlc("否");
}
}
if (StringUtils.isNotBlank(tAllParam.getBlc())) {
list = list.stream().filter(param -> tAllParam.getBlc().equals(param.getBlc())).collect(Collectors.toList());
}
return getDataTable(list);
}
```
阅读全文