|
@@ -445,13 +445,20 @@ public class RegisterServiceImpl implements RegisterService {
|
|
|
return ResponseJson.error("请勾选同意协议", null);
|
|
|
}
|
|
|
// 是否填写升级资料
|
|
|
+ Integer confirmUserId = clubTemporary.getConfirmUserId();
|
|
|
+ UserLoginVo userLogin = null;
|
|
|
+ if (confirmUserId != null) {
|
|
|
+ userLogin = loginMapper.getLoginUserByUserId(confirmUserId);
|
|
|
+ }
|
|
|
String businessLicense = clubTemporary.getBusinessLicense();
|
|
|
String email = clubTemporary.getContractEmail();
|
|
|
if (StringUtils.isNotBlank(businessLicense)) {
|
|
|
- // 邮箱验证
|
|
|
- String emailCheck = commonService.emailValidate(email);
|
|
|
- if (emailCheck != null) {
|
|
|
- return ResponseJson.error(emailCheck, null);
|
|
|
+ if (confirmUserId == null || (userLogin != null && !userLogin.getEmail().equals(email))) {
|
|
|
+ // 邮箱验证
|
|
|
+ String emailCheck = commonService.emailValidate(email);
|
|
|
+ if (emailCheck != null) {
|
|
|
+ return ResponseJson.error(emailCheck, null);
|
|
|
+ }
|
|
|
}
|
|
|
// 机构名称检查
|
|
|
String nameCheck = ValidateUtil.validateClubName(clubTemporary.getName());
|
|
@@ -465,10 +472,12 @@ public class RegisterServiceImpl implements RegisterService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- // 手机号验证
|
|
|
- String result = commonService.mobileAndCodeValidate(mobile, null);
|
|
|
- if (result != null) {
|
|
|
- return ResponseJson.error(result, null);
|
|
|
+ if (confirmUserId == null || (userLogin != null && !userLogin.getBindMobile().equals(mobile))) {
|
|
|
+ // 手机号验证
|
|
|
+ String result = commonService.mobileAndCodeValidate(mobile, null);
|
|
|
+ if (result != null) {
|
|
|
+ return ResponseJson.error(result, null);
|
|
|
+ }
|
|
|
}
|
|
|
// 获取协销信息
|
|
|
Integer userId = clubTemporary.getUserId();
|
|
@@ -529,7 +538,6 @@ public class RegisterServiceImpl implements RegisterService {
|
|
|
user.setGuideFlag(0);
|
|
|
}
|
|
|
/* 保存数据库 user */
|
|
|
- Integer confirmUserId = clubTemporary.getConfirmUserId();
|
|
|
if (confirmUserId == null) {
|
|
|
int insertUserFlag = registerMapper.insertClubUser(user);
|
|
|
log.info("插入数据库User表,获得userId:" + user.getUserId());
|