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 3917fe94..b3287f38 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 @@ -140,10 +140,10 @@ public class RemoteUserServiceImpl implements RemoteUserService { public Boolean registerUserInfo(RemoteUserBo remoteUserBo) throws UserException, ServiceException { SysUserBo sysUserBo = MapstructUtils.convert(remoteUserBo, SysUserBo.class); String username = sysUserBo.getUserName(); - if (!("true".equals(configService.selectConfigByKey("sys.account.registerUser")))) { - throw new ServiceException("当前系统没有开启注册功能"); - } boolean exist = TenantHelper.dynamic(remoteUserBo.getTenantId(), () -> { + if (!("true".equals(configService.selectConfigByKey("sys.account.registerUser")))) { + throw new ServiceException("当前系统没有开启注册功能"); + } return userMapper.exists(new LambdaQueryWrapper() .eq(SysUser::getUserName, sysUserBo.getUserName()) .ne(ObjectUtil.isNotNull(sysUserBo.getUserId()), SysUser::getUserId, sysUserBo.getUserId()));