From 9155df2aeab5b0d95c89dd928dbaefbfbaeae9d1 Mon Sep 17 00:00:00 2001 From: zjh <1084500556@qq.com> Date: 星期四, 05 九月 2024 17:10:35 +0800 Subject: [PATCH] zjh 2024-09-05 --- ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysUserController.java | 26 ++++++++++++++------------ 1 files changed, 14 insertions(+), 12 deletions(-) diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysUserController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysUserController.java index 6c1acc6..269d29a 100644 --- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysUserController.java +++ b/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)); -- Gitblit v1.8.0