瀏覽代碼

重置密码修改

gao.qiang 7 月之前
父節點
當前提交
388dc53d0a
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      hazard-admin/src/main/java/com/ozs/web/controller/system/SysUserController.java

+ 2 - 1
hazard-admin/src/main/java/com/ozs/web/controller/system/SysUserController.java

@@ -359,8 +359,9 @@ public class SysUserController extends BaseController {
     @GetMapping("/resetPwd/{id}")
     public AjaxResult resetPwd(@PathVariable(value = "id") Long id) {
         boolean stop=false;
+        LoginUser loginUser = getLoginUser();
         LambdaQueryWrapper<SysUserRole> wrapper=new LambdaQueryWrapper<>();
-        wrapper.eq(SysUserRole::getUserId,id);
+        wrapper.eq(SysUserRole::getUserId,loginUser.getUserId());
         List<SysUserRole> sysUserRoles = sysUserRoleMapper.selectList(wrapper);
         for (SysUserRole sysUserRole : sysUserRoles) {
             String roleKey = roleService.getRoleKey(sysUserRole.getRoleId());