测试环境短信问题处理 ,默认6个1发送
This commit is contained in:
parent
4bc5cb0f1b
commit
383dbb2d4e
@ -225,8 +225,7 @@ lili:
|
|||||||
#支付密码
|
#支付密码
|
||||||
WALLET_PASSWORD: SMS_205755301
|
WALLET_PASSWORD: SMS_205755301
|
||||||
system:
|
system:
|
||||||
isDemoSite: true
|
isTestModel: true
|
||||||
licences: 'temporary'
|
|
||||||
statistics:
|
statistics:
|
||||||
# 在线人数统计 X 小时。这里设置48,即统计过去48小时每小时在线人数
|
# 在线人数统计 X 小时。这里设置48,即统计过去48小时每小时在线人数
|
||||||
onlineMember: 48
|
onlineMember: 48
|
||||||
|
@ -11,6 +11,7 @@ import cn.lili.common.sms.SmsUtil;
|
|||||||
import cn.lili.common.utils.CommonUtil;
|
import cn.lili.common.utils.CommonUtil;
|
||||||
import cn.lili.common.verification.enums.VerificationEnums;
|
import cn.lili.common.verification.enums.VerificationEnums;
|
||||||
import cn.lili.config.properties.SmsTemplateSetting;
|
import cn.lili.config.properties.SmsTemplateSetting;
|
||||||
|
import cn.lili.config.properties.SystemSetting;
|
||||||
import cn.lili.modules.connect.util.Base64Utils;
|
import cn.lili.modules.connect.util.Base64Utils;
|
||||||
import cn.lili.modules.member.entity.dos.Member;
|
import cn.lili.modules.member.entity.dos.Member;
|
||||||
import cn.lili.modules.member.service.MemberService;
|
import cn.lili.modules.member.service.MemberService;
|
||||||
@ -55,6 +56,9 @@ public class SmsUtilAliImplService implements SmsUtil, AliSmsUtil {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SmsTemplateSetting smsTemplateSetting;
|
private SmsTemplateSetting smsTemplateSetting;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SystemSetting systemSetting;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendSmsCode(String mobile, VerificationEnums verificationEnums, String uuid) {
|
public void sendSmsCode(String mobile, VerificationEnums verificationEnums, String uuid) {
|
||||||
//获取短信配置
|
//获取短信配置
|
||||||
@ -115,11 +119,16 @@ public class SmsUtilAliImplService implements SmsUtil, AliSmsUtil {
|
|||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//如果是测试模式 默认验证码 6个1
|
||||||
|
if (systemSetting.getIsTestModel()) {
|
||||||
|
code = "111111";
|
||||||
|
} else {
|
||||||
|
//发送短信
|
||||||
|
this.sendSmsCode(smsSetting.getSignName(), mobile, params, templateCode);
|
||||||
|
}
|
||||||
//缓存中写入要验证的信息
|
//缓存中写入要验证的信息
|
||||||
cache.put(cacheKey(verificationEnums, mobile, uuid), code, 300L);
|
cache.put(cacheKey(verificationEnums, mobile, uuid), code, 300L);
|
||||||
//发送短信
|
|
||||||
this.sendSmsCode(smsSetting.getSignName(), mobile, params, templateCode);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -20,6 +20,12 @@ public class SystemSetting {
|
|||||||
*/
|
*/
|
||||||
private Boolean isDemoSite = false;
|
private Boolean isDemoSite = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 测试模式
|
||||||
|
* 验证码短信为6个1
|
||||||
|
*/
|
||||||
|
private Boolean isTestModel = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 授权信息
|
* 授权信息
|
||||||
*/
|
*/
|
||||||
|
@ -10,6 +10,7 @@ import cn.lili.common.utils.SnowFlake;
|
|||||||
import cn.lili.common.utils.StringUtils;
|
import cn.lili.common.utils.StringUtils;
|
||||||
import cn.lili.common.vo.ResultMessage;
|
import cn.lili.common.vo.ResultMessage;
|
||||||
import cn.lili.config.properties.ApiProperties;
|
import cn.lili.config.properties.ApiProperties;
|
||||||
|
import cn.lili.config.properties.DomainProperties;
|
||||||
import cn.lili.modules.payment.entity.RefundLog;
|
import cn.lili.modules.payment.entity.RefundLog;
|
||||||
import cn.lili.modules.payment.kit.CashierSupport;
|
import cn.lili.modules.payment.kit.CashierSupport;
|
||||||
import cn.lili.modules.payment.kit.Payment;
|
import cn.lili.modules.payment.kit.Payment;
|
||||||
@ -62,7 +63,9 @@ public class AliPayPlugin implements Payment {
|
|||||||
//API域名
|
//API域名
|
||||||
@Autowired
|
@Autowired
|
||||||
private ApiProperties apiProperties;
|
private ApiProperties apiProperties;
|
||||||
|
//域名配置
|
||||||
|
@Autowired
|
||||||
|
private DomainProperties domainProperties;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResultMessage<Object> h5pay(HttpServletRequest request, HttpServletResponse response, PayParam payParam) {
|
public ResultMessage<Object> h5pay(HttpServletRequest request, HttpServletResponse response, PayParam payParam) {
|
||||||
@ -78,11 +81,11 @@ public class AliPayPlugin implements Payment {
|
|||||||
//回传数据
|
//回传数据
|
||||||
payModel.setPassbackParams(URLEncoder.createAll().encode(JSONUtil.toJsonStr(payParam), StandardCharsets.UTF_8));
|
payModel.setPassbackParams(URLEncoder.createAll().encode(JSONUtil.toJsonStr(payParam), StandardCharsets.UTF_8));
|
||||||
//3分钟超时
|
//3分钟超时
|
||||||
// payModel.setTimeoutExpress("30m");
|
payModel.setTimeoutExpress("3m");
|
||||||
payModel.setOutTradeNo(outTradeNo);
|
payModel.setOutTradeNo(outTradeNo);
|
||||||
payModel.setProductCode("QUICK_WAP_PAY");
|
payModel.setProductCode("QUICK_WAP_PAY");
|
||||||
try {
|
try {
|
||||||
log.info("支付宝H5支付:{}", payModel);
|
log.info("支付宝H5支付:{}", JSONUtil.toJsonStr(payModel));
|
||||||
AliPayRequest.wapPay(response, payModel, callbackUrl(apiProperties.getBuyer(), PaymentMethodEnum.ALIPAY),
|
AliPayRequest.wapPay(response, payModel, callbackUrl(apiProperties.getBuyer(), PaymentMethodEnum.ALIPAY),
|
||||||
notifyUrl(apiProperties.getBuyer(), PaymentMethodEnum.ALIPAY));
|
notifyUrl(apiProperties.getBuyer(), PaymentMethodEnum.ALIPAY));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user