zhaowenxuan
10 天以前 2a9583fd376451ca77a0400af7f3a02d1b80e7f5
ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysUserController.java
@@ -20,6 +20,7 @@
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;
@@ -324,6 +325,16 @@
        return ajax;
    }
    @GetMapping("/userListByDeptId")
    public AjaxResult userListByDeptId(@RequestParam(required = false) String deptId){
        LambdaQueryWrapper<SysUser> wrapper = new LambdaQueryWrapper<>();
        if(StringUtil.isNotBlank(deptId)){
            List<Long> deptIds = deptService.getDeptTreeById(deptId);
            wrapper.in(SysUser::getDeptId,deptIds);
        }
        return AjaxResult.success(userService.list(wrapper));
    }
    /**
     * 用户授权角色
     */