Bladeren bron

重置密码方法修改

gao.qiang 9 maanden geleden
bovenliggende
commit
c8bbdaef62
1 gewijzigde bestanden met toevoegingen van 2 en 1 verwijderingen
  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.getId());
         List<SysUserRole> sysUserRoles = sysUserRoleMapper.selectList(wrapper);
         for (SysUserRole sysUserRole : sysUserRoles) {
             String roleKey = roleService.getRoleKey(sysUserRole.getRoleId());