| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import jodd.util.StringUtil; |
| | | import org.apache.commons.lang3.ArrayUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | } |
| | | |
| | | @GetMapping("/userListByDeptId") |
| | | public AjaxResult userListByDeptId(@RequestParam("deptId") String deptId){ |
| | | List<Long> deptIds = deptService.getDeptTreeById(deptId); |
| | | public AjaxResult userListByDeptId(@RequestParam(required = false) String deptId){ |
| | | |
| | | LambdaQueryWrapper<SysUser> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.in(SysUser::getDeptId,deptIds); |
| | | if(StringUtil.isNotBlank(deptId)){ |
| | | List<Long> deptIds = deptService.getDeptTreeById(deptId); |
| | | wrapper.in(SysUser::getDeptId,deptIds); |
| | | } |
| | | return AjaxResult.success(userService.list(wrapper)); |
| | | } |
| | | |