Browse Source

优化用户导入更新时需获取用户编号问题

RuoYi 2 năm trước cách đây
mục cha
commit
f5b865a2e1

+ 3 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java

@@ -508,8 +508,9 @@ public class SysUserServiceImpl implements ISysUserService
                 else if (isUpdateSupport)
                 {
                     BeanValidators.validateWithException(validator, user);
-                    checkUserAllowed(user);
-                    checkUserDataScope(user.getUserId());
+                    checkUserAllowed(u);
+                    checkUserDataScope(u.getUserId());
+                    user.setUserId(u.getUserId());
                     user.setUpdateBy(operName);
                     this.updateUser(user);
                     successNum++;