瀏覽代碼

修改新增用户判断用户邮箱是否存在 因多用户导致的bug

王苗苗 6 月之前
父節點
當前提交
8a9b5011a6
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      slibra-system/src/main/java/com/slibra/system/service/impl/SysUserServiceImpl.java

+ 3 - 3
slibra-system/src/main/java/com/slibra/system/service/impl/SysUserServiceImpl.java

@@ -190,7 +190,7 @@ public class SysUserServiceImpl implements ISysUserService
     {
         Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId();
 //        SysUser info = userMapper.checkPhoneUnique(user.getPhonenumber());
-        SysUser info = userMapper.checkEmailUnique(user.getEmail(), user.getType());
+        SysUser info = userMapper.checkPhoneUnique(user.getEmail(), user.getType());
         if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue())
         {
             return UserConstants.NOT_UNIQUE;
@@ -207,12 +207,12 @@ public class SysUserServiceImpl implements ISysUserService
     @Override
     public boolean checkEmailUnique(SysUser user)
     {
-        Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId();
+        /*Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId();
         SysUser info = userMapper.checkEmailUnique(user.getEmail(), user.getType());
         if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue())
         {
             return UserConstants.NOT_UNIQUE;
-        }
+        }*/
         return UserConstants.UNIQUE;
     }