lige
2024-01-24 5e1c1a6cbdb2ea0d40e076a00f954490166f7ce8
ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysUserController.java
@@ -85,7 +85,7 @@
    /**
     * 获取用户列表
     */
    @PreAuthorize("@ss.hasPermi('system:user:list')")
//    @PreAuthorize("@ss.hasPermi('system:user:list')")
    @GetMapping("/list")
    @ApiOperation("获取用户")
    public TableDataInfo list(@ApiParam(value = "用户对象") SysUser user) {
@@ -98,6 +98,7 @@
                    DictHosp dictHosp = hospService.getById(sysDept.getHospId());
                    if (null != dictHosp) {
                        sysUser.setHospName(dictHosp.getHospAreaName());
                        sysUser.setHospId(dictHosp.getHospAreaId());
                    }
                }
                LambdaQueryWrapper<DictUserInfo> wq = new LambdaQueryWrapper<>();
@@ -134,7 +135,7 @@
    }
    @Log(title = "用户管理", businessType = BusinessType.EXPORT)
    @PreAuthorize("@ss.hasPermi('system:user:export')")
//    @PreAuthorize("@ss.hasPermi('system:user:export')")
    @PostMapping("/export")
    public void export(HttpServletResponse response, SysUser user) {
        List<SysUser> list = userService.selectUserList(user);
@@ -143,7 +144,7 @@
    }
    @Log(title = "用户管理", businessType = BusinessType.IMPORT)
    @PreAuthorize("@ss.hasPermi('system:user:import')")
//    @PreAuthorize("@ss.hasPermi('system:user:import')")
    @PostMapping("/importData")
    public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
        ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
@@ -162,7 +163,7 @@
    /**
     * 根据用户id获取详细信息
     */
    @PreAuthorize("@ss.hasPermi('system:user:query')")
//    @PreAuthorize("@ss.hasPermi('system:user:query')")
    @GetMapping("/{userId}")
    @ApiOperation("根据用户id获取详细信息")
    public AjaxResult getInfo(@PathVariable(value = "userId") @ApiParam(value = "用户id") @RequestParam Long userId) {
@@ -187,7 +188,7 @@
    /**
     * 新增用户
     */
    @PreAuthorize("@ss.hasPermi('system:user:add')")
//    @PreAuthorize("@ss.hasPermi('system:user:add')")
    @Log(title = "用户管理", businessType = BusinessType.INSERT)
    @PostMapping
    @ApiOperation(value = "新增用户")
@@ -216,7 +217,7 @@
    /**
     * 修改用户
     */
    @PreAuthorize("@ss.hasPermi('system:user:edit')")
//    @PreAuthorize("@ss.hasPermi('system:user:edit')")
    @Log(title = "用户管理", businessType = BusinessType.UPDATE)
    @PutMapping
    @ApiOperation(value = "修改用户")
@@ -261,7 +262,7 @@
    /**
     * 删除用户
     */
    @PreAuthorize("@ss.hasPermi('system:user:remove')")
//    @PreAuthorize("@ss.hasPermi('system:user:remove')")
    @Log(title = "用户管理", businessType = BusinessType.DELETE)
    @DeleteMapping("/{userIds}")
    @ApiOperation("删除用户")
@@ -283,12 +284,13 @@
    /**
     * 重置密码
     */
    @PreAuthorize("@ss.hasPermi('system:user:resetPwd')")
//    @PreAuthorize("@ss.hasPermi('system:user:resetPwd')")
    @Log(title = "用户管理", businessType = BusinessType.UPDATE)
    @PutMapping("/resetPwd")
    public AjaxResult resetPwd(@RequestBody SysUser user) {
        userService.checkUserAllowed(user);
        userService.checkUserDataScope(user.getUserId());
        System.out.println(user.getPassword());
        user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
        user.setUpdateBy(getUsername());
        return toAjax(userService.resetPwd(user));
@@ -297,7 +299,7 @@
    /**
     * 状态修改
     */
    @PreAuthorize("@ss.hasPermi('system:user:edit')")
//    @PreAuthorize("@ss.hasPermi('system:user:edit')")
    @Log(title = "用户管理", businessType = BusinessType.UPDATE)
    @PutMapping("/changeStatus")
    public AjaxResult changeStatus(@RequestBody SysUser user) {
@@ -310,7 +312,7 @@
    /**
     * 根据用户编号获取授权角色
     */
    @PreAuthorize("@ss.hasPermi('system:user:query')")
//    @PreAuthorize("@ss.hasPermi('system:user:query')")
    @GetMapping("/authRole/{userId}")
    @ApiOperation(value = "根据用户编号获取授权角色")
    public AjaxResult authRole(@PathVariable("userId") Long userId) {
@@ -325,7 +327,7 @@
    /**
     * 用户授权角色
     */
    @PreAuthorize("@ss.hasPermi('system:user:edit')")
//    @PreAuthorize("@ss.hasPermi('system:user:edit')")
    @Log(title = "用户管理", businessType = BusinessType.GRANT)
    @PutMapping("/authRole")
    @ApiOperation(value = "用户授权角色")
@@ -338,7 +340,7 @@
    /**
     * 获取部门树列表
     */
    @PreAuthorize("@ss.hasPermi('system:user:list')")
//    @PreAuthorize("@ss.hasPermi('system:user:list')")
    @GetMapping("/deptTree")
    public AjaxResult deptTree(SysDept dept) {
        return success(deptService.selectDeptTreeList(dept));