老师,我说的是这种
BeanValidator.check(pageQuery);
List<SysUser> users = userMapper.getPageByDeptId(deptId, pageQuery);
PageResult<SysUser> pageResult = null;
if (CollectionUtils.isNotEmpty(users)) {
pageResult = PageResult.<SysUser>builder().data(users).total(users.size()).build();
} else {
pageResult = PageResult.<SysUser>builder().build();
}
return pageResult;