lyhzzz 4 months ago
parent
commit
cb692d68fe

+ 4 - 4
src/main/java/com/fdkankan/pay/entity/StripePrice.java

@@ -41,11 +41,11 @@ public class StripePrice implements Serializable {
     @TableField("product_id")
     private String productId;
 
-    @TableField("recurring")
-    private Integer recurring;
+    @TableField("auto_pay")
+    private Integer autoPay;
 
-    @TableField("interval")
-    private String interval;
+    @TableField("recurring_param")
+    private String recurringParam;
 
     @TableField("rec_status")
     @TableLogic(value = "A",delval = "I")

+ 4 - 4
src/main/java/com/fdkankan/pay/service/impl/StripePriceServiceImpl.java

@@ -33,9 +33,9 @@ public class StripePriceServiceImpl extends ServiceImpl<IStripePriceMapper, Stri
             wrapper.eq(StripePrice::getUnitAmount,orderMoney);
             wrapper.eq(StripePrice::getCurrency,currency);
             wrapper.eq(StripePrice::getProductId,productId);
-            wrapper.eq(StripePrice::getRecurring,autoPay);
+            wrapper.eq(StripePrice::getAutoPay,autoPay);
             if(autoPay == 1){
-                wrapper.eq(StripePrice::getInterval,interval);
+                wrapper.eq(StripePrice::getRecurringParam,interval);
             }
             StripePrice one = this.getOne(wrapper);
             if(one == null){
@@ -67,8 +67,8 @@ public class StripePriceServiceImpl extends ServiceImpl<IStripePriceMapper, Stri
         stripePrice.setUnitAmount(orderMoney);
         stripePrice.setCurrency(currency);
         stripePrice.setProductId(productId);
-        stripePrice.setRecurring(autoPay);
-        stripePrice.setInterval(interval);
+        stripePrice.setAutoPay(autoPay);
+        stripePrice.setRecurringParam(interval);
         this.save(stripePrice);
 
     }