|
@@ -147,7 +147,7 @@ public class PayApplicationServiceImpl extends ServiceImpl<PayApplicationMapper,
|
|
|
|
|
|
private void orderExpire(String orderId, String appId) {
|
|
|
//过期时间
|
|
|
- double expire = (double) DateUtil.localDateTimeToMilli(LocalDateTime.now().plusMinutes(5));
|
|
|
+ double expire = (double) DateUtil.localDateTimeToMilli(LocalDateTime.now().plusMinutes(2));
|
|
|
//参数
|
|
|
String param = orderId + "_" + appId;
|
|
|
//设置缓存
|
|
@@ -272,8 +272,8 @@ public class PayApplicationServiceImpl extends ServiceImpl<PayApplicationMapper,
|
|
|
//参数切割
|
|
|
String[] split = param.split("_");
|
|
|
//小程序appId
|
|
|
- String appId = split[0];
|
|
|
- String orderId = split[1];
|
|
|
+ String orderId = split[0];
|
|
|
+ String appId = split[1];
|
|
|
//查询商城小程序信息
|
|
|
PayApplication payApplication = super.getOne(new LambdaQueryWrapper<PayApplication>()
|
|
|
.eq(PayApplication::getAppId, appId));
|
|
@@ -292,15 +292,14 @@ public class PayApplicationServiceImpl extends ServiceImpl<PayApplicationMapper,
|
|
|
payParamMap.put("apiKey", payConfigMap.get("apiKey"));
|
|
|
//关闭订单
|
|
|
this.closeOrder(payParamMap);
|
|
|
- log.error("关闭订单成功, param : {}", param);
|
|
|
}
|
|
|
|
|
|
private void closeOrder(Map<String, String> paramMap) {
|
|
|
try {
|
|
|
Map<String, String> paramData = new HashMap<>(6);
|
|
|
- paramData.put("appid", paramMap.get("appId"));
|
|
|
- paramData.put("mch_id", paramMap.get("mchId"));
|
|
|
- paramData.put("out_trade_no", paramMap.get("orderId"));
|
|
|
+ paramData.put("appid", paramMap.get("appid"));
|
|
|
+ paramData.put("mch_id", paramMap.get("mch_id"));
|
|
|
+ paramData.put("out_trade_no", paramMap.get("out_trade_no"));
|
|
|
paramData.put("nonce_str", WxPayUtil.generateNonceStr());
|
|
|
paramData.put("sign_type", SIGN_TYPE);
|
|
|
//接口签名
|