智慧保安后台管理-外网项目备份
Administrator
2021-10-12 7f046650eea24ba1a43f09831407e4e37b8cb898
src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
@@ -105,7 +105,8 @@
      if (Func.isNotEmpty(user.getPassword())) {
         user.setPassword(DigestUtil.encrypt(user.getPassword()));
      }
      Integer userCount = baseMapper.selectCount(Wrappers.<User>query().lambda().eq(User::getTenantId, tenantId).eq(User::getAccount, user.getAccount()));
//      Integer userCount = baseMapper.selectCount(Wrappers.<User>query().lambda().eq(User::getTenantId, tenantId).eq(User::getAccount, user.getAccount()));
      Integer userCount = baseMapper.selectCountAccount(user.getAccount());
      if (userCount > 0 && Func.isEmpty(user.getId())) {
         throw new ServiceException(StringUtil.format("当前用户 [{}] 已存在!", user.getAccount()));
      }