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

Commit 939f1c68 authored by jiangxiulong's avatar jiangxiulong

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

parent a224e458
...@@ -636,11 +636,8 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService { ...@@ -636,11 +636,8 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_NFT_ORDER.getKey(), queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_NFT_ORDER.getKey(),
SqlMapping.gets(sqls, sqlDataOrder)); SqlMapping.gets(sqls, sqlDataOrder));
if (orderVo.getPayType().equals("applepay")) {// 苹果支付不做处理 // 退款
return "success"; nftOrderUtils.refundOrderSku(orderId, syncOrderParam.getPaymentId(), syncOrderParam.getPaymentType(), orderVo.getPayType());
} else {// 退款
nftOrderUtils.refundOrderSku(orderId, syncOrderParam.getPaymentId(), syncOrderParam.getPaymentType());
}
} else {// 正常流程 } else {// 正常流程
orderVo.setPaymentType(syncOrderParam.getPaymentType()); orderVo.setPaymentType(syncOrderParam.getPaymentType());
orderVo.setPaymentId(syncOrderParam.getPaymentId()); orderVo.setPaymentId(syncOrderParam.getPaymentId());
......
...@@ -257,7 +257,7 @@ public class GoblinNftOrderUtils { ...@@ -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(); LocalDateTime now = LocalDateTime.now();
GoblinNftOrderVo nftOrder = getNftOrder(orderId); GoblinNftOrderVo nftOrder = getNftOrder(orderId);
BigDecimal refundPrice = nftOrder.getPriceActual(); BigDecimal refundPrice = nftOrder.getPriceActual();
...@@ -275,6 +275,7 @@ public class GoblinNftOrderUtils { ...@@ -275,6 +275,7 @@ public class GoblinNftOrderUtils {
backOrderVo.setCreatedAt(now); backOrderVo.setCreatedAt(now);
backOrderVo.setErrorReason(""); backOrderVo.setErrorReason("");
if (!payType.equals("applepay")) {// 苹果支付不做处理
// 调用退款 超时支付回调可能还未完成 所以redisVo没有此俩个参数 // 调用退款 超时支付回调可能还未完成 所以redisVo没有此俩个参数
nftOrder.setPaymentId(paymentId); nftOrder.setPaymentId(paymentId);
nftOrder.setPaymentType(paymentType); nftOrder.setPaymentType(paymentType);
...@@ -288,6 +289,7 @@ public class GoblinNftOrderUtils { ...@@ -288,6 +289,7 @@ public class GoblinNftOrderUtils {
backOrderVo.setErrorReason(message); backOrderVo.setErrorReason(message);
} }
} }
}
/** /**
* 退款表数据处理 * 退款表数据处理
...@@ -303,11 +305,8 @@ public class GoblinNftOrderUtils { ...@@ -303,11 +305,8 @@ public class GoblinNftOrderUtils {
backOrderVo.getErrorReason(), now backOrderVo.getErrorReason(), now
) )
); );
if (success) {
return true; return true;
} else {
return false;
}
} }
private String initRefund(GoblinNftOrderVo orderVo, BigDecimal price, String refundCode) { 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