|
@@ -639,13 +639,22 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
|
.map(TenantInfoDto::getPhone)
|
|
|
.map(sysUserFeignService::queryUserByMobile)
|
|
|
.orElse(null);
|
|
|
+ TenantInfo phone = this.getOne(new WrapperUtil<TenantInfo>().queryWrapper()
|
|
|
+ .eq("phone_", dto.getPhone()));
|
|
|
+ if (Objects.nonNull(phone)) {
|
|
|
+ throwPhoneBizEx(bucket);
|
|
|
+ }
|
|
|
if (Objects.nonNull(sysUser)) {
|
|
|
- bucket.delete();
|
|
|
- throw new BizException("该手机号已被注册!");
|
|
|
+ throwPhoneBizEx(bucket);
|
|
|
}
|
|
|
return bucket;
|
|
|
}
|
|
|
|
|
|
+ private void throwPhoneBizEx(RBucket<Object> bucket) {
|
|
|
+ bucket.delete();
|
|
|
+ throw new BizException("该手机号已被注册!");
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* set机构Id 并执行一个操作
|
|
|
*
|