lidongdong
2022-11-23 89942b45cc826d6396a7a26a9673e1542d068947
flower_city/src/main/java/com/dg/core/controller/UserController.java
@@ -113,6 +113,7 @@
            map.put("userType", user.getUserType());
            map.put("departmentId", user.getDepartmentId());
            map.put("departmentName", user.getDepartmentName());
            map.put("moreDepartmentIds", user.getMoreDepartmentIds());
            return ResultData.success(map);
        }
@@ -148,6 +149,7 @@
            map.put("userType", user.getUserType());
            map.put("departmentId", user.getDepartmentId());
            map.put("departmentName", user.getDepartmentName());
            map.put("moreDepartmentIds", user.getMoreDepartmentIds());
            return ResultData.success(map);
        }
@@ -195,9 +197,9 @@
        Assert.notNull(pageNum, "pageNum can not be empty");
        Assert.notNull(pageSize, "pageSize can not be empty");
        Page<SysUser> pageParam = new Page<>(pageNum,pageSize);
        List<SysUser> list = IUserService.selectConfigList(pageParam,pageSize,"3",keyword,null,"1");
        List<SysUser> list = IUserService.selectConfigList(pageParam,pageSize,null,keyword,null,"1");
        int num=IUserService.selectNum("3",keyword,null,"1");
        int num=IUserService.selectNum(null,keyword,null,"1");
        return getDataTable(list,num);
    }
@@ -307,8 +309,6 @@
            return error("账户不能为空");
        }
        config.setUserType("3");
        config.setUpdateBy(sys.getUserId()+"");
        return toAjax(IUserService.updateConfig(config));
@@ -396,7 +396,7 @@
     *
     * @return 结果
     */
    @ApiOperation("获取登录人员信息")
    @ApiOperation(value = "获取登录人员信息,userType=1 为超级管理员  isDivisionHead=1 为部门领导",response = SysUser.class)
    @PostMapping("/getLoginInformation")
    @Authorization
    public ResultData getLoginInformation(@CurrentUser SysUser sysUse)
@@ -407,5 +407,15 @@
    @ApiOperation("切换部门接口")
    @GetMapping(value = "/switch/department")
    public ResultData switchDepartment(@RequestParam(value = "departmentId",required = false) String departmentId,
                                       @CurrentUser SysUser sysUse)
    {
        sysUse.setDepartmentId(departmentId);
        return toAjax(IUserService.updateConfig(sysUse));
    }
}