|
@@ -1,6 +1,7 @@
|
|
package com.caimei365.user.service.impl;
|
|
package com.caimei365.user.service.impl;
|
|
|
|
|
|
import com.caimei365.user.components.CommonService;
|
|
import com.caimei365.user.components.CommonService;
|
|
|
|
+import com.caimei365.user.components.RedisService;
|
|
import com.caimei365.user.components.WeChatService;
|
|
import com.caimei365.user.components.WeChatService;
|
|
import com.caimei365.user.mapper.BaseMapper;
|
|
import com.caimei365.user.mapper.BaseMapper;
|
|
import com.caimei365.user.mapper.LoginMapper;
|
|
import com.caimei365.user.mapper.LoginMapper;
|
|
@@ -13,7 +14,6 @@ import com.caimei365.user.model.po.ShopPo;
|
|
import com.caimei365.user.model.po.UserPo;
|
|
import com.caimei365.user.model.po.UserPo;
|
|
import com.caimei365.user.model.vo.ServiceProviderVo;
|
|
import com.caimei365.user.model.vo.ServiceProviderVo;
|
|
import com.caimei365.user.service.RegisterService;
|
|
import com.caimei365.user.service.RegisterService;
|
|
-import com.caimei365.user.components.RedisService;
|
|
|
|
import com.caimei365.user.utils.AliyunSmsUtil;
|
|
import com.caimei365.user.utils.AliyunSmsUtil;
|
|
import com.caimei365.user.utils.Md5Util;
|
|
import com.caimei365.user.utils.Md5Util;
|
|
import com.caimei365.user.utils.ValidateUtil;
|
|
import com.caimei365.user.utils.ValidateUtil;
|
|
@@ -36,7 +36,7 @@ import java.util.Map;
|
|
*/
|
|
*/
|
|
@Slf4j
|
|
@Slf4j
|
|
@Service
|
|
@Service
|
|
-public class RegisterServiceImpl implements RegisterService{
|
|
|
|
|
|
+public class RegisterServiceImpl implements RegisterService {
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
private RedisService redisService;
|
|
private RedisService redisService;
|
|
@@ -69,16 +69,16 @@ public class RegisterServiceImpl implements RegisterService{
|
|
* 普通机构入驻(注册)
|
|
* 普通机构入驻(注册)
|
|
*
|
|
*
|
|
* @param clubRegisterDto ClubRegisterDto{
|
|
* @param clubRegisterDto ClubRegisterDto{
|
|
- * source 注册来源: 0网站 1小程序
|
|
|
|
- * userName 用户名
|
|
|
|
- * bindMobile 企业绑定手机号
|
|
|
|
- * password 密码
|
|
|
|
- * unionId 微信unionId
|
|
|
|
- * nickName 微信昵称
|
|
|
|
- * avatarUrl 微信头像(旧:headimgurl)
|
|
|
|
- * passWordConfirm 用户确认密码
|
|
|
|
- * smsCode 短信验证码(旧:activationCode)
|
|
|
|
- * isAgreed 是否同意勾选同意协议,1是,其他否
|
|
|
|
|
|
+ * source 注册来源: 0网站 1小程序
|
|
|
|
+ * userName 用户名
|
|
|
|
+ * bindMobile 企业绑定手机号
|
|
|
|
+ * password 密码
|
|
|
|
+ * unionId 微信unionId
|
|
|
|
+ * nickName 微信昵称
|
|
|
|
+ * avatarUrl 微信头像(旧:headimgurl)
|
|
|
|
+ * passWordConfirm 用户确认密码
|
|
|
|
+ * smsCode 短信验证码(旧:activationCode)
|
|
|
|
+ * isAgreed 是否同意勾选同意协议,1是,其他否
|
|
* }
|
|
* }
|
|
* @param headers HttpHeaders
|
|
* @param headers HttpHeaders
|
|
* @return ClubPo
|
|
* @return ClubPo
|
|
@@ -113,10 +113,14 @@ public class RegisterServiceImpl implements RegisterService{
|
|
}
|
|
}
|
|
// 手机号与验证码校验
|
|
// 手机号与验证码校验
|
|
String result = commonService.mobileAndCodeValidate(clubRegisterDto.getBindMobile(), clubRegisterDto.getSmsCode());
|
|
String result = commonService.mobileAndCodeValidate(clubRegisterDto.getBindMobile(), clubRegisterDto.getSmsCode());
|
|
- if (result != null) {return ResponseJson.error(result);}
|
|
|
|
|
|
+ if (result != null) {
|
|
|
|
+ return ResponseJson.error(result);
|
|
|
|
+ }
|
|
// 密码校验
|
|
// 密码校验
|
|
String passResult = ValidateUtil.validatePassWord(clubRegisterDto.getPassword());
|
|
String passResult = ValidateUtil.validatePassWord(clubRegisterDto.getPassword());
|
|
- if (passResult != null) {return ResponseJson.error(passResult);}
|
|
|
|
|
|
+ if (passResult != null) {
|
|
|
|
+ return ResponseJson.error(passResult);
|
|
|
|
+ }
|
|
/*
|
|
/*
|
|
组装用户数据 user
|
|
组装用户数据 user
|
|
*/
|
|
*/
|
|
@@ -162,7 +166,7 @@ public class RegisterServiceImpl implements RegisterService{
|
|
保存数据库 user
|
|
保存数据库 user
|
|
*/
|
|
*/
|
|
int insertFlag = registerMapper.insertClubUser(user);
|
|
int insertFlag = registerMapper.insertClubUser(user);
|
|
- log.info("插入数据库User表,获得userId:"+user.getUserId());
|
|
|
|
|
|
+ log.info("插入数据库User表,获得userId:" + user.getUserId());
|
|
if (insertFlag < 1) {
|
|
if (insertFlag < 1) {
|
|
throw new RuntimeException("插入数据库异常user:" + user.toString());
|
|
throw new RuntimeException("插入数据库异常user:" + user.toString());
|
|
}
|
|
}
|
|
@@ -188,7 +192,7 @@ public class RegisterServiceImpl implements RegisterService{
|
|
保存数据库 club
|
|
保存数据库 club
|
|
*/
|
|
*/
|
|
int insertClubFlag = registerMapper.insertClub(club);
|
|
int insertClubFlag = registerMapper.insertClub(club);
|
|
- log.info("插入数据库club表,获得clubId:"+club.getClubId());
|
|
|
|
|
|
+ log.info("插入数据库club表,获得clubId:" + club.getClubId());
|
|
if (insertClubFlag < 1) {
|
|
if (insertClubFlag < 1) {
|
|
throw new RuntimeException("插入数据库异常club:" + club.toString());
|
|
throw new RuntimeException("插入数据库异常club:" + club.toString());
|
|
}
|
|
}
|
|
@@ -196,10 +200,10 @@ public class RegisterServiceImpl implements RegisterService{
|
|
user.setClubId(club.getClubId());
|
|
user.setClubId(club.getClubId());
|
|
registerMapper.updateUserClubId(user.getUserId(), club.getClubId());
|
|
registerMapper.updateUserClubId(user.getUserId(), club.getClubId());
|
|
// 注册成功短信
|
|
// 注册成功短信
|
|
- boolean smsFlag = AliyunSmsUtil.sendSms(clubRegisterDto.getBindMobile(), 7, "{name:"+ clubRegisterDto.getBindMobile() +",password:"+ clubRegisterDto.getPassword() +"}");
|
|
|
|
|
|
+ boolean smsFlag = AliyunSmsUtil.sendSms(clubRegisterDto.getBindMobile(), 7, "{name:" + clubRegisterDto.getBindMobile() + ",password:" + clubRegisterDto.getPassword() + "}");
|
|
if (!smsFlag) {
|
|
if (!smsFlag) {
|
|
// 短信发送失败重试一次
|
|
// 短信发送失败重试一次
|
|
- AliyunSmsUtil.sendSms(clubRegisterDto.getBindMobile(), 7, "{name:"+ clubRegisterDto.getBindMobile() +",password:"+ clubRegisterDto.getPassword() +"}");
|
|
|
|
|
|
+ AliyunSmsUtil.sendSms(clubRegisterDto.getBindMobile(), 7, "{name:" + clubRegisterDto.getBindMobile() + ",password:" + clubRegisterDto.getPassword() + "}");
|
|
}
|
|
}
|
|
/*
|
|
/*
|
|
绑定微信,成为机构运营人员
|
|
绑定微信,成为机构运营人员
|
|
@@ -242,7 +246,7 @@ public class RegisterServiceImpl implements RegisterService{
|
|
保存数据库 operation
|
|
保存数据库 operation
|
|
*/
|
|
*/
|
|
int insertOperationFlag = registerMapper.insertOperation(operation);
|
|
int insertOperationFlag = registerMapper.insertOperation(operation);
|
|
- log.info("插入数据库cm_mall_operation_user表,获得id:"+operation.getId());
|
|
|
|
|
|
+ log.info("插入数据库cm_mall_operation_user表,获得id:" + operation.getId());
|
|
if (insertOperationFlag < 1) {
|
|
if (insertOperationFlag < 1) {
|
|
log.info(operation.getUserId() + " 插入数据库异常operation:" + operation.toString());
|
|
log.info(operation.getUserId() + " 插入数据库异常operation:" + operation.toString());
|
|
}
|
|
}
|
|
@@ -256,29 +260,29 @@ public class RegisterServiceImpl implements RegisterService{
|
|
* 普通机构升级会员机构
|
|
* 普通机构升级会员机构
|
|
*
|
|
*
|
|
* @param upgradeDto ClubUpgradeDto:{
|
|
* @param upgradeDto ClubUpgradeDto:{
|
|
- * clubId 机构ID
|
|
|
|
- * userId 用户ID
|
|
|
|
- * name 机构名称
|
|
|
|
- * shortName 机构简称
|
|
|
|
- * contractEmail 邮箱(contractEmail1)
|
|
|
|
- * contractPhone 固定电话
|
|
|
|
- * linkMan 联系人(linkMan1)
|
|
|
|
- * provinceId 省Id
|
|
|
|
- * cityId 市Id
|
|
|
|
- * townId 县区Id
|
|
|
|
- * address 地址
|
|
|
|
- * shopPhoto 门头照(headpic)
|
|
|
|
- * businessLicense 营业执照(businessLicenseImage)
|
|
|
|
- * socialCreditCode 统一社会信用代码(socialCreditCode)
|
|
|
|
- * firstClubType 一级分类:医美=1和生美=2
|
|
|
|
- * secondClubType 医美的二级分类:诊所=1、门诊=2、医院=3。 生美没有二级分类
|
|
|
|
- * department 医美分类下的门诊和医院则需要填写科室
|
|
|
|
- * medicalPracticeLicense 医美分类必须上传医疗执业许可证(medicalPracticeLicenseImg)
|
|
|
|
- * mainProduct 主打项目(mainpro)
|
|
|
|
- * fax 传真
|
|
|
|
- * profile 公司简介
|
|
|
|
- * }
|
|
|
|
- * @param headers HttpHeaders
|
|
|
|
|
|
+ * clubId 机构ID
|
|
|
|
+ * userId 用户ID
|
|
|
|
+ * name 机构名称
|
|
|
|
+ * shortName 机构简称
|
|
|
|
+ * contractEmail 邮箱(contractEmail1)
|
|
|
|
+ * contractPhone 固定电话
|
|
|
|
+ * linkMan 联系人(linkMan1)
|
|
|
|
+ * provinceId 省Id
|
|
|
|
+ * cityId 市Id
|
|
|
|
+ * townId 县区Id
|
|
|
|
+ * address 地址
|
|
|
|
+ * shopPhoto 门头照(headpic)
|
|
|
|
+ * businessLicense 营业执照(businessLicenseImage)
|
|
|
|
+ * socialCreditCode 统一社会信用代码(socialCreditCode)
|
|
|
|
+ * firstClubType 一级分类:医美=1和生美=2
|
|
|
|
+ * secondClubType 医美的二级分类:诊所=1、门诊=2、医院=3。 生美没有二级分类
|
|
|
|
+ * department 医美分类下的门诊和医院则需要填写科室
|
|
|
|
+ * medicalPracticeLicense 医美分类必须上传医疗执业许可证(medicalPracticeLicenseImg)
|
|
|
|
+ * mainProduct 主打项目(mainpro)
|
|
|
|
+ * fax 传真
|
|
|
|
+ * profile 公司简介
|
|
|
|
+ * }
|
|
|
|
+ * @param headers HttpHeaders
|
|
* @return ClubPo
|
|
* @return ClubPo
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
@@ -309,7 +313,7 @@ public class RegisterServiceImpl implements RegisterService{
|
|
if (null == upgradeDto.getFirstClubType()) {
|
|
if (null == upgradeDto.getFirstClubType()) {
|
|
return ResponseJson.error("参数异常:一级分类不能为空!");
|
|
return ResponseJson.error("参数异常:一级分类不能为空!");
|
|
}
|
|
}
|
|
- if (upgradeDto.getFirstClubType() == 1){
|
|
|
|
|
|
+ if (upgradeDto.getFirstClubType() == 1) {
|
|
// 医美分类
|
|
// 医美分类
|
|
if (upgradeDto.getSecondClubType() == null || StringUtils.isBlank(upgradeDto.getMedicalPracticeLicense())) {
|
|
if (upgradeDto.getSecondClubType() == null || StringUtils.isBlank(upgradeDto.getMedicalPracticeLicense())) {
|
|
return ResponseJson.error("医美分类下参数异常,医美的二级分类为空或医疗执业许可证为空");
|
|
return ResponseJson.error("医美分类下参数异常,医美的二级分类为空或医疗执业许可证为空");
|
|
@@ -320,9 +324,13 @@ public class RegisterServiceImpl implements RegisterService{
|
|
return ResponseJson.error("该邮箱已被使用");
|
|
return ResponseJson.error("该邮箱已被使用");
|
|
}
|
|
}
|
|
String nameCheck = ValidateUtil.validateClubName(upgradeDto.getName());
|
|
String nameCheck = ValidateUtil.validateClubName(upgradeDto.getName());
|
|
- if (nameCheck != null) {return ResponseJson.error(nameCheck);}
|
|
|
|
|
|
+ if (nameCheck != null) {
|
|
|
|
+ return ResponseJson.error(nameCheck);
|
|
|
|
+ }
|
|
String socialCodeResult = ValidateUtil.validateSocialCreditCode(upgradeDto.getSocialCreditCode());
|
|
String socialCodeResult = ValidateUtil.validateSocialCreditCode(upgradeDto.getSocialCreditCode());
|
|
- if (socialCodeResult != null) {return ResponseJson.error(socialCodeResult);}
|
|
|
|
|
|
+ if (socialCodeResult != null) {
|
|
|
|
+ return ResponseJson.error(socialCodeResult);
|
|
|
|
+ }
|
|
// 更新用户数据 user
|
|
// 更新用户数据 user
|
|
UserPo user = new UserPo();
|
|
UserPo user = new UserPo();
|
|
user.setUserId(upgradeDto.getUserId());
|
|
user.setUserId(upgradeDto.getUserId());
|
|
@@ -367,7 +375,7 @@ public class RegisterServiceImpl implements RegisterService{
|
|
club.setSocialCreditCode(upgradeDto.getSocialCreditCode());
|
|
club.setSocialCreditCode(upgradeDto.getSocialCreditCode());
|
|
// 分类: 1医美, 2生美
|
|
// 分类: 1医美, 2生美
|
|
club.setFirstClubType(upgradeDto.getFirstClubType());
|
|
club.setFirstClubType(upgradeDto.getFirstClubType());
|
|
- if (upgradeDto.getFirstClubType() == 1){
|
|
|
|
|
|
+ if (upgradeDto.getFirstClubType() == 1) {
|
|
// 医美二级分类: 1诊所、2门诊、3医院
|
|
// 医美二级分类: 1诊所、2门诊、3医院
|
|
club.setSecondClubType(upgradeDto.getSecondClubType());
|
|
club.setSecondClubType(upgradeDto.getSecondClubType());
|
|
// 门诊和医院则需要填写科室
|
|
// 门诊和医院则需要填写科室
|
|
@@ -419,7 +427,7 @@ public class RegisterServiceImpl implements RegisterService{
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
- public ResponseJson clubOnline(ClubOnlineDto onlineDto, HttpHeaders headers) {
|
|
|
|
|
|
+ public ResponseJson<Integer> clubOnline(ClubOnlineDto onlineDto, HttpHeaders headers) {
|
|
Integer isAgreed = onlineDto.getIsAgreed();
|
|
Integer isAgreed = onlineDto.getIsAgreed();
|
|
// 打印IP
|
|
// 打印IP
|
|
String ip = headers.getFirst("X-CLIENT-IP");
|
|
String ip = headers.getFirst("X-CLIENT-IP");
|
|
@@ -428,16 +436,16 @@ public class RegisterServiceImpl implements RegisterService{
|
|
String mobile = onlineDto.getBindMobile();
|
|
String mobile = onlineDto.getBindMobile();
|
|
// 参数校验
|
|
// 参数校验
|
|
if (null == onlineDto.getUserId()) {
|
|
if (null == onlineDto.getUserId()) {
|
|
- return ResponseJson.error("参数异常:用户Id不能为空!");
|
|
|
|
|
|
+ return ResponseJson.error("参数异常:用户Id不能为空!", null);
|
|
}
|
|
}
|
|
if (StringUtils.isBlank(mobile)) {
|
|
if (StringUtils.isBlank(mobile)) {
|
|
- return ResponseJson.error("参数异常:企业绑定手机号不能为空!");
|
|
|
|
|
|
+ return ResponseJson.error("参数异常:企业绑定手机号不能为空!", null);
|
|
}
|
|
}
|
|
if (StringUtils.isBlank(onlineDto.getLinkMan())) {
|
|
if (StringUtils.isBlank(onlineDto.getLinkMan())) {
|
|
- return ResponseJson.error("参数异常:联系人不能为空!");
|
|
|
|
|
|
+ return ResponseJson.error("参数异常:联系人不能为空!", null);
|
|
}
|
|
}
|
|
if (null == isAgreed || 1 != isAgreed) {
|
|
if (null == isAgreed || 1 != isAgreed) {
|
|
- return ResponseJson.error("请勾选同意协议");
|
|
|
|
|
|
+ return ResponseJson.error("请勾选同意协议", null);
|
|
}
|
|
}
|
|
// 是否填写升级资料
|
|
// 是否填写升级资料
|
|
String businessLicense = onlineDto.getBusinessLicense();
|
|
String businessLicense = onlineDto.getBusinessLicense();
|
|
@@ -445,20 +453,26 @@ public class RegisterServiceImpl implements RegisterService{
|
|
if (StringUtils.isNotBlank(businessLicense)) {
|
|
if (StringUtils.isNotBlank(businessLicense)) {
|
|
// 邮箱验证
|
|
// 邮箱验证
|
|
String emailCheck = commonService.emailValidate(email);
|
|
String emailCheck = commonService.emailValidate(email);
|
|
- if (emailCheck != null) {return ResponseJson.error(emailCheck);}
|
|
|
|
|
|
+ if (emailCheck != null) {
|
|
|
|
+ return ResponseJson.error(emailCheck, null);
|
|
|
|
+ }
|
|
// 机构名称检查
|
|
// 机构名称检查
|
|
String nameCheck = ValidateUtil.validateClubName(onlineDto.getName());
|
|
String nameCheck = ValidateUtil.validateClubName(onlineDto.getName());
|
|
- if (nameCheck != null) {return ResponseJson.error(nameCheck);}
|
|
|
|
- if (onlineDto.getFirstClubType() == 1){
|
|
|
|
|
|
+ if (nameCheck != null) {
|
|
|
|
+ return ResponseJson.error(nameCheck, null);
|
|
|
|
+ }
|
|
|
|
+ if (onlineDto.getFirstClubType() == 1) {
|
|
// 医美分类
|
|
// 医美分类
|
|
if (onlineDto.getSecondClubType() == null || StringUtils.isBlank(onlineDto.getMedicalPracticeLicense())) {
|
|
if (onlineDto.getSecondClubType() == null || StringUtils.isBlank(onlineDto.getMedicalPracticeLicense())) {
|
|
- return ResponseJson.error("医美分类下参数异常,医美的二级分类为空或医疗执业许可证为空");
|
|
|
|
|
|
+ return ResponseJson.error("医美分类下参数异常,医美的二级分类为空或医疗执业许可证为空", null);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 手机号验证
|
|
// 手机号验证
|
|
String result = commonService.mobileAndCodeValidate(mobile, null);
|
|
String result = commonService.mobileAndCodeValidate(mobile, null);
|
|
- if (result != null) {return ResponseJson.error(result);}
|
|
|
|
|
|
+ if (result != null) {
|
|
|
|
+ return ResponseJson.error(result, null);
|
|
|
|
+ }
|
|
// 获取协销信息
|
|
// 获取协销信息
|
|
Integer userId = onlineDto.getUserId();
|
|
Integer userId = onlineDto.getUserId();
|
|
ServiceProviderVo serviceProvider = loginMapper.getServiceProviderByUserId(userId);
|
|
ServiceProviderVo serviceProvider = loginMapper.getServiceProviderByUserId(userId);
|
|
@@ -518,7 +532,7 @@ public class RegisterServiceImpl implements RegisterService{
|
|
}
|
|
}
|
|
/* 保存数据库 user */
|
|
/* 保存数据库 user */
|
|
int insertUserFlag = registerMapper.insertClubUser(user);
|
|
int insertUserFlag = registerMapper.insertClubUser(user);
|
|
- log.info("插入数据库User表,获得userId:"+user.getUserId());
|
|
|
|
|
|
+ log.info("插入数据库User表,获得userId:" + user.getUserId());
|
|
if (insertUserFlag < 1) {
|
|
if (insertUserFlag < 1) {
|
|
throw new RuntimeException("插入数据库异常user:" + user.toString());
|
|
throw new RuntimeException("插入数据库异常user:" + user.toString());
|
|
}
|
|
}
|
|
@@ -562,7 +576,7 @@ public class RegisterServiceImpl implements RegisterService{
|
|
club.setSocialCreditCode(onlineDto.getSocialCreditCode());
|
|
club.setSocialCreditCode(onlineDto.getSocialCreditCode());
|
|
// 分类: 1医美, 2生美
|
|
// 分类: 1医美, 2生美
|
|
club.setFirstClubType(onlineDto.getFirstClubType());
|
|
club.setFirstClubType(onlineDto.getFirstClubType());
|
|
- if (onlineDto.getFirstClubType() == 1){
|
|
|
|
|
|
+ if (onlineDto.getFirstClubType() == 1) {
|
|
// 医美二级分类: 1诊所、2门诊、3医院
|
|
// 医美二级分类: 1诊所、2门诊、3医院
|
|
club.setSecondClubType(onlineDto.getSecondClubType());
|
|
club.setSecondClubType(onlineDto.getSecondClubType());
|
|
// 门诊和医院则需要填写科室
|
|
// 门诊和医院则需要填写科室
|
|
@@ -575,7 +589,7 @@ public class RegisterServiceImpl implements RegisterService{
|
|
/*
|
|
/*
|
|
保存数据库(会员机构) club
|
|
保存数据库(会员机构) club
|
|
*/
|
|
*/
|
|
- insertClubFlag = registerMapper.insertUpgradeClub(club);
|
|
|
|
|
|
+ insertClubFlag = registerMapper.insertUpgradeClub(club);
|
|
} else {
|
|
} else {
|
|
// 机构名称
|
|
// 机构名称
|
|
club.setName(onlineDto.getLinkMan());
|
|
club.setName(onlineDto.getLinkMan());
|
|
@@ -588,7 +602,7 @@ public class RegisterServiceImpl implements RegisterService{
|
|
*/
|
|
*/
|
|
insertClubFlag = registerMapper.insertClub(club);
|
|
insertClubFlag = registerMapper.insertClub(club);
|
|
}
|
|
}
|
|
- log.info("插入数据库club表,获得clubId:"+club.getClubId());
|
|
|
|
|
|
+ log.info("插入数据库club表,获得clubId:" + club.getClubId());
|
|
if (insertClubFlag < 1) {
|
|
if (insertClubFlag < 1) {
|
|
throw new RuntimeException("插入数据库异常club:" + club.toString());
|
|
throw new RuntimeException("插入数据库异常club:" + club.toString());
|
|
}
|
|
}
|
|
@@ -610,16 +624,16 @@ public class RegisterServiceImpl implements RegisterService{
|
|
logTxt = String.format(logTxt, "普通机构", mobile, initPassword);
|
|
logTxt = String.format(logTxt, "普通机构", mobile, initPassword);
|
|
}
|
|
}
|
|
// 发送短信
|
|
// 发送短信
|
|
- boolean smsFlag = AliyunSmsUtil.sendSms(mobile, smsType, "{name:"+ mobile +",password:"+ initPassword +"}");
|
|
|
|
|
|
+ boolean smsFlag = AliyunSmsUtil.sendSms(mobile, smsType, "{name:" + mobile + ",password:" + initPassword + "}");
|
|
if (!smsFlag) {
|
|
if (!smsFlag) {
|
|
// 短信发送失败重试一次
|
|
// 短信发送失败重试一次
|
|
- AliyunSmsUtil.sendSms(mobile, smsType, "{name:"+ mobile +",password:"+ initPassword +"}");
|
|
|
|
|
|
+ AliyunSmsUtil.sendSms(mobile, smsType, "{name:" + mobile + ",password:" + initPassword + "}");
|
|
}
|
|
}
|
|
// 打印短信内容
|
|
// 打印短信内容
|
|
log.info(logTxt);
|
|
log.info(logTxt);
|
|
|
|
|
|
// 返回状态
|
|
// 返回状态
|
|
- return ResponseJson.success();
|
|
|
|
|
|
+ return ResponseJson.success(user.getUserId());
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -642,7 +656,7 @@ public class RegisterServiceImpl implements RegisterService{
|
|
* firstShopType 医疗=1和非医疗=2
|
|
* firstShopType 医疗=1和非医疗=2
|
|
* secondShopType 医疗的二级分类 一类器械=1、二类器械 =2、三类器械=3、其他=4 /// 1和非医疗没有二级分类
|
|
* secondShopType 医疗的二级分类 一类器械=1、二类器械 =2、三类器械=3、其他=4 /// 1和非医疗没有二级分类
|
|
* mainProduct 主打项目(mainpro)
|
|
* mainProduct 主打项目(mainpro)
|
|
- * }
|
|
|
|
|
|
+ * }
|
|
* @param passWordConfirm 用户确认密码
|
|
* @param passWordConfirm 用户确认密码
|
|
* @param smsCode 短信验证码(旧:activationCode)
|
|
* @param smsCode 短信验证码(旧:activationCode)
|
|
* @param isAgreed 是否同意勾选同意协议,1是,其他否
|
|
* @param isAgreed 是否同意勾选同意协议,1是,其他否
|
|
@@ -674,7 +688,9 @@ public class RegisterServiceImpl implements RegisterService{
|
|
}
|
|
}
|
|
// 手机号与验证码校验
|
|
// 手机号与验证码校验
|
|
String result = commonService.mobileAndCodeValidate(shopRegisterDto.getBindMobile(), smsCode);
|
|
String result = commonService.mobileAndCodeValidate(shopRegisterDto.getBindMobile(), smsCode);
|
|
- if (result != null) {return ResponseJson.error(result, null);}
|
|
|
|
|
|
+ if (result != null) {
|
|
|
|
+ return ResponseJson.error(result, null);
|
|
|
|
+ }
|
|
// 小程序第一步校验完成
|
|
// 小程序第一步校验完成
|
|
if (1 == whichStep) {
|
|
if (1 == whichStep) {
|
|
return ResponseJson.success(null);
|
|
return ResponseJson.success(null);
|
|
@@ -799,8 +815,8 @@ public class RegisterServiceImpl implements RegisterService{
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * @param shop ShopApplyDto
|
|
|
|
- * @param headers HttpHeaders
|
|
|
|
|
|
+ * @param shop ShopApplyDto
|
|
|
|
+ * @param headers HttpHeaders
|
|
* @return ShopPo
|
|
* @return ShopPo
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|