|
@@ -1,6 +1,7 @@
|
|
|
package com.xy.service;
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
@@ -109,7 +110,12 @@ public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> i
|
|
|
}
|
|
|
UserInfo userInfo = getOne(lambdaQueryWrapper);
|
|
|
if (userInfo != null) {
|
|
|
- return R.fail("账号已存在");
|
|
|
+ if (ObjectUtil.equals(userInfo.getTel(), save.getTel())) {
|
|
|
+ return R.fail("手机号已存在!");
|
|
|
+ }
|
|
|
+ if (ObjectUtil.equals(userInfo.getMail(), save.getMail())) {
|
|
|
+ return R.fail("邮箱已存在!");
|
|
|
+ }
|
|
|
}
|
|
|
//添加权限用户
|
|
|
AddDto addDto = copy(AddDto.class, save)
|