From 7a7404d11a83bc7f9591dd3adc14d6466d06f61b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Fri, 26 Apr 2024 20:26:40 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=B3=A8=E5=86=8C=20=E5=88=9B=E5=BB=BA=E4=BA=BA?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=97=A0=E6=84=8F=E4=B9=89=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/dromara/system/dubbo/RemoteUserServiceImpl.java | 3 +-- .../org/dromara/system/service/impl/SysUserServiceImpl.java | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteUserServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteUserServiceImpl.java index 246417e0..ca88fc2c 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteUserServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteUserServiceImpl.java @@ -139,8 +139,7 @@ public class RemoteUserServiceImpl implements RemoteUserService { throw new ServiceException("当前系统没有开启注册功能"); } return userMapper.exists(new LambdaQueryWrapper() - .eq(SysUser::getUserName, sysUserBo.getUserName()) - .ne(ObjectUtil.isNotNull(sysUserBo.getUserId()), SysUser::getUserId, sysUserBo.getUserId())); + .eq(SysUser::getUserName, sysUserBo.getUserName())); }); if (exist) { throw new UserException("user.register.save.error", username); diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysUserServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysUserServiceImpl.java index 4930cbcc..7b96bcb5 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysUserServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysUserServiceImpl.java @@ -315,8 +315,8 @@ public class SysUserServiceImpl implements ISysUserService { */ @Override public boolean registerUser(SysUserBo user, String tenantId) { - user.setCreateBy(user.getUserId()); - user.setUpdateBy(user.getUserId()); + user.setCreateBy(0L); + user.setUpdateBy(0L); SysUser sysUser = MapstructUtils.convert(user, SysUser.class); sysUser.setTenantId(tenantId); return baseMapper.insert(sysUser) > 0;