update订单逻辑改造工厂模式

This commit is contained in:
2023-09-01 14:18:58 +08:00
parent 8336fdfa26
commit 1c0bd7ea19

View File

@@ -416,33 +416,5 @@ public class DelayMerchantOrderLogic extends AbstractOrderLogic {
refundAmt = new BigDecimal(response.getReverse_amt());
memberAdapayRecordService.updateRefundAmountFromFreezeAmount(paymentId, refundAmt);
}
// 获取延时分账模式 延时分账的使用撤销方法退款,实时分账的使用退款方法
// String expend = callbackRecord.getExpend();
// JSONObject expendJsonObject = JSON.parseObject(expend);
// String payMode = expendJsonObject.getString("payMode");
// if (StringUtils.equalsIgnoreCase(payMode, Constants.ADAPAY_PAY_MODE_DELAY)) {
// // 延迟分账未确认调撤销调撤销接口退款
// PaymentReverseOperation operation = new PaymentReverseOperation();
// operation.setPaymentId(paymentId);
// operation.setReverseAmt(refundAmount);
// operation.setMerchantKey(dto.getWechatAppId());
// operation.setMemberId(dto.getMemberId());
// operation.setScenarioType(ScenarioEnum.ORDER.getValue());
// operation.setOrderCode(dto.getOrderCode());
// PaymentReverseResponse response = adapayService.createPaymentReverseRequest(operation);
// if (response != null && response.isNotFailed()) {
// refundAmt = new BigDecimal(response.getReverse_amt());
// memberAdapayRecordService.updateRefundAmountFromFreezeAmount(paymentId, refundAmt);
// }
// } else {
// // // 实时分账的调退款接口
// RefundResponse refundRequest = adapayService.createRefundRequest(paymentId, refundAmount,
// dto.getWechatAppId(), dto.getMemberId(), ScenarioEnum.ORDER.getValue(), dto.getOrderCode());
// if (refundRequest != null && refundRequest.isNotFailed()) {
// refundAmt = new BigDecimal(refundRequest.getRefund_amt());
// memberAdapayRecordService.unfreezeAmountAndUpdateSpendAmount(paymentId, payAmt, refundAmt);
// }
// }
}
}