智慧保安后台管理-外网项目备份
Administrator
2021-09-27 345d17cf82e1bbc1fbfbeec10193c2bed59cd674
src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
@@ -105,10 +105,10 @@
      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()));
//      if (userCount > 0 && Func.isEmpty(user.getId())) {
//         throw new ServiceException(StringUtil.format("当前用户 [{}] 已存在!", user.getAccount()));
//      }
      Integer userCount = baseMapper.selectCount(Wrappers.<User>query().lambda().eq(User::getTenantId, tenantId).eq(User::getAccount, user.getAccount()));
      if (userCount > 0 && Func.isEmpty(user.getId())) {
         throw new ServiceException(StringUtil.format("当前用户 [{}] 已存在!", user.getAccount()));
      }
      boolean b = save(user) && submitUserDept(user);
      String rtime = null;
      if (null != user.getRtime()) {