一、分页
//创建分页实体
Page page = new Page<>(request.getPageIndex(), request.getPerPage());
/创建查询条件实体:
LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.between(ExecutionBasicPO::getCreateTime, request.getActualLadingTimeStart(), request.getActualLadingTimeEnd());
//进行查询:
Page poPage = this.baseMapper.selectPage(page, lambdaQueryWrapper);
//查询数据
poPage.getRecords();
//页数
poPage.getPages();
//总的条数
poPage.getTotal();
二、更新
LambdaUpdateWrapper lambdaUpdateWrapper = new LambdaUpdateWrapper();
//设置更新的字段
lambdaUpdateWrapper.set(ExecutionBasicPO::getUpdateBy, "张三")
//设置更新的条件
.eq(ExecutionBasicPO::getId, 1);
//进行更新
this.update(lambdaUpdateWrapper);