fix: 定时任务补单

pull/17/head
tangqian 2023-06-20 10:01:56 +08:00
parent 022b9d2c8f
commit 7e49674bd4
1 changed files with 9 additions and 9 deletions

View File

@ -45,7 +45,7 @@ public class ReplenishmentTask {
/** /**
* 83 * 83
*/ */
// @Scheduled(cron = "0 0 8,15 * * ?") @Scheduled(cron = "0 0 8,15 * * ?")
@TenantIgnore @TenantIgnore
public void replenishmentTask() { public void replenishmentTask() {
/** /**
@ -74,7 +74,7 @@ public class ReplenishmentTask {
// 生成随机字符串 // 生成随机字符串
String nonceStr = generateNonceStr(); String nonceStr = generateNonceStr();
// 商户密钥 // 商户密钥
String key = properties.getMchKey(); String key = properties.getApiv3Key();
// 构建请求参数 // 构建请求参数
Map<String, String> params = new HashMap<>(); Map<String, String> params = new HashMap<>();
@ -93,12 +93,12 @@ public class ReplenishmentTask {
Map<String, String> map = parseResponse(response); Map<String, String> map = parseResponse(response);
if ("SUCCESS".equals(map.get("trade_state")) && "SUCCESS".equals(map.get("result_code"))) { if ("SUCCESS".equals(map.get("trade_state")) && "SUCCESS".equals(map.get("result_code"))) {
// 修改订单状态 // 修改订单状态
// orderDO.setPaid(1); orderDO.setPaid(1);
// orderDO.setIsReplenishment(1); orderDO.setIsReplenishment(1);
// orderDO.setReplenishmentName(map.toString()); orderDO.setReplenishmentName(map.toString());
// rechargeOrderMapper.updateById(orderDO); rechargeOrderMapper.updateById(orderDO);
// // 写入 充值档位记录表 // 写入 充值档位记录表
// storeOrderService.addPhone(orderDO, outTradeNo); storeOrderService.addPhone(orderDO, outTradeNo);
} }
} }
@ -274,7 +274,7 @@ public class ReplenishmentTask {
// Map<String, String> params = new HashMap<>(); // Map<String, String> params = new HashMap<>();
// params.put("appid", appId); // params.put("appid", appId);
// params.put("mch_id", mchId); // params.put("mch_id", mchId);
// params.put("out_trade_no", "MEMBER_16700496905020866571"); // params.put("out_trade_no", "MEMBER_1670049690502086657");
// params.put("nonce_str", nonceStr); // params.put("nonce_str", nonceStr);
// String sign = generateSign(params, key); // 生成签名 // String sign = generateSign(params, key); // 生成签名
// params.put("sign", sign); // params.put("sign", sign);