商家注册初始密码短信,商家入驻发送短信,优化
This commit is contained in:
parent
e507a3cfab
commit
0b1f7bd30e
@ -1953,7 +1953,7 @@ public class AccountUserBaseServiceImpl extends BaseServiceImpl<AccountUserBaseM
|
||||
// 如果是商家首次注册 SMS_481085172 发送短信通知用户,告知用户随机密码:您已成功注册!密码:${password},该密码可用于登录商家APP,登录后请尽快修改密码。
|
||||
Map<String, Object> smsArgs = new HashMap<>();
|
||||
smsArgs.put("password", user_password_src);
|
||||
sendSmsMessage(PhoneNumberUtils.cleanPhoneNumber(user_mobile), "SMS_481085172", smsArgs);
|
||||
sendSmsMessage(PhoneNumberUtils.cleanPhoneNumber(user_mobile), "SMS_496910525", smsArgs); // SMS_496910525
|
||||
}
|
||||
|
||||
//初次注册发送消息
|
||||
|
||||
@ -352,6 +352,8 @@ public class PhoneNumberUtils {
|
||||
System.out.println(cleanPhoneNumber("+3541234567")); // 期望输出: 1234567
|
||||
System.out.println(cleanPhoneNumber("+85298765432"));
|
||||
|
||||
System.out.println(PhoneNumberUtils.checkPhoneNumber("+8617777525395"));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -178,26 +178,44 @@ public class EsignPlatformInfoServiceImpl extends BaseServiceImpl<EsignPlatformI
|
||||
/**
|
||||
* 获取平台方手机号和营业执照号
|
||||
*
|
||||
* @return
|
||||
* @return Pair<String, String> 手机号和营业执照号的键值对,获取失败时返回null
|
||||
*/
|
||||
@Override
|
||||
public Pair<String, String> getEsignPlatformMobileAndLicenseNumber() {
|
||||
QueryWrapper<EsignPlatformInfo> queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("level", 0).select("telephone", "license_number", "legal_person_mobile");
|
||||
List<EsignPlatformInfo> esignPlatformInfos = list(queryWrapper);
|
||||
if (CollectionUtil.isEmpty(esignPlatformInfos)) {
|
||||
log.debug("[获取平台方信息] 开始获取平台方手机号和营业执照号");
|
||||
|
||||
try {
|
||||
QueryWrapper<EsignPlatformInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("level", 0)
|
||||
.eq("status", CommonConstant.Enable)
|
||||
.select("telephone", "license_number", "legal_person_mobile");
|
||||
|
||||
EsignPlatformInfo esignPlatformInfo = findOne(queryWrapper);
|
||||
if (esignPlatformInfo == null) {
|
||||
log.warn("[获取平台方信息] 未找到有效的平台方记录");
|
||||
return null;
|
||||
}
|
||||
|
||||
// 优先使用telephone字段,如验证失败则使用legal_person_mobile
|
||||
String mobile = esignPlatformInfo.getTelephone();
|
||||
if (!PhoneNumberUtils.checkPhoneNumber(mobile)
|
||||
&& StrUtil.isNotBlank(esignPlatformInfo.getLegal_person_mobile())
|
||||
&& PhoneNumberUtils.checkPhoneNumber(esignPlatformInfo.getLegal_person_mobile())) {
|
||||
log.debug("[获取平台方信息] 主手机号验证失败,使用法人手机号");
|
||||
mobile = esignPlatformInfo.getLegal_person_mobile();
|
||||
}
|
||||
|
||||
log.debug("[获取平台方信息] 成功获取平台方信息,手机号:{},营业执照号:{}",
|
||||
mobile, esignPlatformInfo.getLicense_number());
|
||||
return Pair.of(mobile, esignPlatformInfo.getLicense_number());
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("[获取平台方信息] 查询平台方信息时发生异常", e);
|
||||
return null;
|
||||
}
|
||||
|
||||
EsignPlatformInfo esignPlatformInfo = esignPlatformInfos.get(0);
|
||||
String mobile = esignPlatformInfo.getTelephone();
|
||||
if (!PhoneNumberUtils.checkPhoneNumber(mobile) && StrUtil.isNotBlank(esignPlatformInfo.getLegal_person_mobile())) {
|
||||
mobile = esignPlatformInfo.getLegal_person_mobile();
|
||||
}
|
||||
|
||||
return Pair.of(mobile, esignPlatformInfo.getLicense_number());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据入驻编号获取商户的二级代理
|
||||
*
|
||||
|
||||
@ -337,7 +337,7 @@ public class ShopMchEntryServiceImpl extends BaseServiceImpl<ShopMchEntryMapper,
|
||||
Pair<String, String> mobileAndLicenseNumber = esignPlatformInfoService.getEsignPlatformMobileAndLicenseNumber();
|
||||
if (mobileAndLicenseNumber != null) {
|
||||
Map<String, Object> tmplArgs = new HashMap<>(1);
|
||||
tmplArgs.put("name", record.getBiz_license_company()); // 商家公司名称
|
||||
tmplArgs.put("name", record.getStore_name()); // 商家店铺名
|
||||
shopMessageTemplateService.aliyunSmsSend(mobileAndLicenseNumber.getFirst(), "SMS_486545331", tmplArgs);
|
||||
}
|
||||
|
||||
@ -462,7 +462,7 @@ public class ShopMchEntryServiceImpl extends BaseServiceImpl<ShopMchEntryMapper,
|
||||
// 获取平台方的手机号码,发送短信通知
|
||||
Pair<String, String> mobileAndLicenseNumber = esignPlatformInfoService.getEsignPlatformMobileAndLicenseNumber();
|
||||
if (mobileAndLicenseNumber != null) {
|
||||
String mchName = StrUtil.isBlank(record.getBiz_license_company()) ? "重新修正" : record.getBiz_license_company();
|
||||
String mchName = StrUtil.isBlank(record.getStore_name()) ? "重新修正资料" : record.getStore_name();
|
||||
Map<String, Object> tmplArgs = new HashMap<>(1);
|
||||
tmplArgs.put("name", mchName); // 商家公司名称
|
||||
// 尊敬的管理员,商家 ${name},提交了入驻我们平台的申请,请及时对相关资质材料予以审核,以便推进后续流程。
|
||||
|
||||
Loading…
Reference in New Issue
Block a user