|
@@ -438,6 +438,12 @@ public class BindTaskServiceImpl implements BindTaskService {
|
|
|
if (StrUtil.isEmpty(userBindDetail.getPhone())) {
|
|
if (StrUtil.isEmpty(userBindDetail.getPhone())) {
|
|
|
throw BusinessRuntimeException.getInstance("您未绑定手机号,无法更换");
|
|
throw BusinessRuntimeException.getInstance("您未绑定手机号,无法更换");
|
|
|
}
|
|
}
|
|
|
|
|
+ User toBIndPhone = userMapper.selectOne(Wrappers.lambdaQuery(User.class)
|
|
|
|
|
+ .eq(User::getLoginPhone, account)
|
|
|
|
|
+ .last("limit 1"));
|
|
|
|
|
+ if (toBIndPhone != null) {
|
|
|
|
|
+ throw BusinessRuntimeException.getInstance("您要换绑的手机号已经注册");
|
|
|
|
|
+ }
|
|
|
String phone = userBindDetail.getPhone();
|
|
String phone = userBindDetail.getPhone();
|
|
|
phoneUser = userMapper.selectOne(Wrappers.lambdaQuery(User.class)
|
|
phoneUser = userMapper.selectOne(Wrappers.lambdaQuery(User.class)
|
|
|
.eq(User::getLoginPhone, phone).last("limit 1"));
|
|
.eq(User::getLoginPhone, phone).last("limit 1"));
|
|
@@ -494,6 +500,12 @@ public class BindTaskServiceImpl implements BindTaskService {
|
|
|
if (StrUtil.isEmpty(userBindDetail.getEmail())) {
|
|
if (StrUtil.isEmpty(userBindDetail.getEmail())) {
|
|
|
throw BusinessRuntimeException.getInstance("您未绑定邮箱,无法更换");
|
|
throw BusinessRuntimeException.getInstance("您未绑定邮箱,无法更换");
|
|
|
}
|
|
}
|
|
|
|
|
+ User toBIndEmail = userMapper.selectOne(Wrappers.lambdaQuery(User.class)
|
|
|
|
|
+ .eq(User::getEmail, account)
|
|
|
|
|
+ .last("limit 1"));
|
|
|
|
|
+ if (toBIndEmail != null) {
|
|
|
|
|
+ throw BusinessRuntimeException.getInstance("您要换绑的邮箱已经注册");
|
|
|
|
|
+ }
|
|
|
email = userBindDetail.getEmail();
|
|
email = userBindDetail.getEmail();
|
|
|
emailUser = userMapper.selectOne(Wrappers.lambdaQuery(User.class)
|
|
emailUser = userMapper.selectOne(Wrappers.lambdaQuery(User.class)
|
|
|
.eq(User::getEmail, email).last("limit 1"));
|
|
.eq(User::getEmail, email).last("limit 1"));
|