记得上下班打卡 | git大法好,push需谨慎

Commit 939f1c68 authored by jiangxiulong's avatar jiangxiulong

银联超时支付也记录退款订单

parent a224e458
......@@ -636,11 +636,8 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_NFT_ORDER.getKey(),
SqlMapping.gets(sqls, sqlDataOrder));
if (orderVo.getPayType().equals("applepay")) {// 苹果支付不做处理
return "success";
} else {// 退款
nftOrderUtils.refundOrderSku(orderId, syncOrderParam.getPaymentId(), syncOrderParam.getPaymentType());
}
// 退款
nftOrderUtils.refundOrderSku(orderId, syncOrderParam.getPaymentId(), syncOrderParam.getPaymentType(), orderVo.getPayType());
} else {// 正常流程
orderVo.setPaymentType(syncOrderParam.getPaymentType());
orderVo.setPaymentId(syncOrderParam.getPaymentId());
......
......@@ -257,7 +257,7 @@ public class GoblinNftOrderUtils {
}
//超时支付自动退款
public Boolean refundOrderSku(String orderId, String paymentId, String paymentType) {
public Boolean refundOrderSku(String orderId, String paymentId, String paymentType, String payType) {
LocalDateTime now = LocalDateTime.now();
GoblinNftOrderVo nftOrder = getNftOrder(orderId);
BigDecimal refundPrice = nftOrder.getPriceActual();
......@@ -275,6 +275,7 @@ public class GoblinNftOrderUtils {
backOrderVo.setCreatedAt(now);
backOrderVo.setErrorReason("");
if (!payType.equals("applepay")) {// 苹果支付不做处理
// 调用退款 超时支付回调可能还未完成 所以redisVo没有此俩个参数
nftOrder.setPaymentId(paymentId);
nftOrder.setPaymentType(paymentType);
......@@ -288,6 +289,7 @@ public class GoblinNftOrderUtils {
backOrderVo.setErrorReason(message);
}
}
}
/**
* 退款表数据处理
......@@ -303,11 +305,8 @@ public class GoblinNftOrderUtils {
backOrderVo.getErrorReason(), now
)
);
if (success) {
return true;
} else {
return false;
}
}
private String initRefund(GoblinNftOrderVo orderVo, BigDecimal price, String refundCode) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment