|
本帖最后由 Mzl 于 2022-2-24 09:55 编辑
# 版本号:jeecg boot 3.0
# 问题描述:在SysUserController 下:
appQueryByDepartId方法,其departId参数是可空的,当传一个空值进来,查询不出内容,添加一个空值判断。代码红色为添加的判断:
# 截图&代码:
/**
* 移动端查询部门用户信息
* @param departId
* @return
*/
@GetMapping("/appQueryByDepartId")
public Result<List<SysUser>> appQueryByDepartId(@RequestParam(name="departId", required = false) String departId) {
Result<List<SysUser>> result = new Result<List<SysUser>>();
List<String> list=new ArrayList<String> ();
if(StringUtils.isNotBlank(departId)){
list.add(departId);
}
List<SysUser> childrenUser = sysUserService.queryByDepIds(list,null);
result.setResult(childrenUser);
return result;
}
|
|
|