智慧保安后台管理-外网项目备份
Administrator
2021-10-12 7f046650eea24ba1a43f09831407e4e37b8cb898
src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
@@ -106,9 +106,10 @@
         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.selectCountAccount(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()) {