ZQN
2024-06-25 7987ac6bf58cd64f0ad2af915ed1a9749960f643
project-admin/src/main/java/com/project/admin/controller/system/SysProfileController.java
@@ -48,7 +48,7 @@
    @GetMapping
    public AjaxResult profile()
    {
        SysUser user = SecurityUtils.getLoginUser().getUser();
        SysUser user = userService.selectUserById(SecurityUtils.getLoginUser().getUserId());
        if ("02".equals(user.getUserType())){
            SysCompany company = companyService.getById(userService.getById(user.getUserId()).getDeptId());
            SysDept sysDept = new SysDept();
@@ -56,8 +56,10 @@
            user.setDept(sysDept);
        } else {
            SysDept sysDept = deptService.selectDeptById(userService.getById(user.getUserId()).getDeptId());
            sysDept.setDeptName(deptService.getDeptAllName(sysDept.getDeptId()));
            user.setDept(sysDept);
            if (sysDept!=null){
                sysDept.setDeptName(deptService.getDeptAllName(sysDept.getDeptId()));
                user.setDept(sysDept);
            }
        }
        // 角色集合