fix: 定时任务补单

feature/mall_product
tangqian 2023-06-20 10:04:04 +08:00
parent 0f36f07dc3
commit 4aff4b3d03
1 changed files with 8 additions and 8 deletions

View File

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