|
@@ -15,6 +15,7 @@ import com.caimei365.user.model.vo.ServiceProviderVo;
|
|
|
import com.caimei365.user.service.RegisterService;
|
|
|
import com.caimei365.user.components.RedisService;
|
|
|
import com.caimei365.user.utils.AliyunSmsUtil;
|
|
|
+import com.caimei365.user.utils.CodeUtil;
|
|
|
import com.caimei365.user.utils.Md5Util;
|
|
|
import com.caimei365.user.utils.ValidateUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -196,10 +197,10 @@ public class RegisterServiceImpl implements RegisterService{
|
|
|
user.setClubId(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(), 10, "{name:"+ clubRegisterDto.getBindMobile() +"}");
|
|
|
if (!smsFlag) {
|
|
|
// 短信发送失败重试一次
|
|
|
- AliyunSmsUtil.sendSms(clubRegisterDto.getBindMobile(), 7, "{name:"+ clubRegisterDto.getBindMobile() +",password:"+ clubRegisterDto.getPassword() +"}");
|
|
|
+ AliyunSmsUtil.sendSms(clubRegisterDto.getBindMobile(), 10, "{name:"+ clubRegisterDto.getBindMobile() +"}");
|
|
|
}
|
|
|
/*
|
|
|
绑定微信,成为机构运营人员
|
|
@@ -495,7 +496,7 @@ public class RegisterServiceImpl implements RegisterService{
|
|
|
// 设置机构上线
|
|
|
user.setClubStatus(90);
|
|
|
// 默认密码
|
|
|
- String initPassword = "caimei123";
|
|
|
+ String initPassword = CodeUtil.generateCodeInt(8);
|
|
|
user.setPassword(Md5Util.md5(initPassword));
|
|
|
// 同意协议
|
|
|
user.setAgreeFlag(isAgreed);
|
|
@@ -613,10 +614,10 @@ public class RegisterServiceImpl implements RegisterService{
|
|
|
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) {
|
|
|
// 短信发送失败重试一次
|
|
|
- AliyunSmsUtil.sendSms(mobile, smsType, "{\"name\":\""+ mobile +"\", \"password:\":\""+ initPassword +"\"}");
|
|
|
+ AliyunSmsUtil.sendSms(mobile, smsType, "{name:"+ mobile +",password:"+ initPassword +"}");
|
|
|
}
|
|
|
// 打印短信内容
|
|
|
log.info(logTxt);
|