lyhzzz hai 3 meses
pai
achega
eab6b73b52

+ 3 - 1
src/main/java/com/fdkankan/ucenter/mq/consumer/AutoOrderConsumer.java

@@ -69,7 +69,9 @@ public class AutoOrderConsumer {
             if(incrementAutoOrder.getSubscriptionId() == null){
                 autoOrderService.subOrder(order.getSubscriptionOrderSn(),order.getSubscriptionId());
             }
-
+            if(order.getPayType() == null || order.getPayType() == 5){
+                order.setPayType(2);
+            }
             switch (order.getEventType()){
                 case "PAYMENT.SALE.COMPLETED" :     //每日扣款
                     //Enum: "completed" "partially_refunded" "pending" "refunded" "denied"

+ 1 - 0
src/main/java/com/fdkankan/ucenter/pay/paypal/sdk/AutoPaypalVo.java

@@ -22,4 +22,5 @@ public class AutoPaypalVo {
     private String subscriptionId;
 
     private String subscriptionOrderSn;
+    private Integer payType;
 }

+ 1 - 1
src/main/java/com/fdkankan/ucenter/service/impl/IncrementAutoOrderServiceImpl.java

@@ -73,7 +73,7 @@ public class IncrementAutoOrderServiceImpl extends ServiceImpl<IIncrementAutoOrd
     public void paySuccess(IncrementAutoOrder incrementAutoOrder, AutoPaypalVo order) throws Exception {
         incrementOrderService.addNewOrderByOrder(incrementAutoOrder,order);
 
-        incrementOrder.handleOrder(order.getOrderSn(),order.getTradeNo(),order.getOrderSn(),2,null);
+        incrementOrder.handleOrder(order.getOrderSn(),order.getTradeNo(),order.getOrderSn(),order.getPayType(),null);
 
     }
 

+ 1 - 1
src/main/java/com/fdkankan/ucenter/service/impl/IncrementOrderServiceImpl.java

@@ -267,7 +267,7 @@ public class IncrementOrderServiceImpl extends ServiceImpl<IIncrementOrderMapper
         IncrementOrder incrementOrder = new IncrementOrder();
         incrementOrder.setOrderSn(order.getOrderSn());
         incrementOrder.setAmount(new BigDecimal(order.getAmount()));
-        incrementOrder.setPayType(2);
+        incrementOrder.setPayType(order.getPayType());
         incrementOrder.setPayStatus(-1);
         incrementOrder.setUserId(incrementAutoOrder.getUserId());
         incrementOrder.setCount(1);