zhs 3 vuotta sitten
vanhempi
commit
2e91d5094c

+ 11 - 2
src/main/java/com/travel/controller/ZfbPayController.java

@@ -268,7 +268,11 @@ public class ZfbPayController extends ZfbPayUtils {
                                 .setTotalFee(params.get("total_amount"))
                                 .setPayType("支付宝支付");
                         //充值信息入库
-                        ZFBPay wxPayBala = new ZFBPay().setCode((params.get("body")).split(",")[2]).setUuid(uuid).setTotalFee(params.get("total_amount"));
+                        ZFBPay wxPayBala = new ZFBPay()
+                                .setCode((params.get("body")).split(",")[2])
+                                .setUuid(uuid)
+                                .setTotalFee(params.get("total_amount"))
+                                .setPayType("支付宝支付");
                         zfbPayService.buySupplierBalance(wxPayBala); //充值记录录入
                         zfbPayService.updateBuySupplier(buySupplier); //充值
                     } else if((params.get("body")).indexOf("gysOfferNum") != -1){ //报价单次数购买
@@ -279,7 +283,12 @@ public class ZfbPayController extends ZfbPayUtils {
                                 .setOfferNum((params.get("body")).split(",")[3])
                                 .setPayType("支付宝支付");
                         //购买次数信息入库
-                        BuyOfferNum buyOfferNumAdd = new BuyOfferNum().setUuid(uuid).setOfferNum((params.get("body")).split(",")[3]).setCode((params.get("body")).split(",")[2]);
+                        BuyOfferNum buyOfferNumAdd = new BuyOfferNum()
+                                .setUuid(uuid)
+                                .setOfferNum((params.get("body")).split(",")[3])
+                                .setCode((params.get("body")).split(",")[2])
+                                .setPayType("支付宝支付")
+                                .setPayAmount(params.get("total_amount"));
                         zfbPayService.addBuyOfferNum(buyOfferNumAdd); //充值记录录入
                         zfbPayService.updateBuyOfferNum(buyOfferNum);//购买次数
                     } else { //报价单购买

+ 3 - 3
src/main/resources/config/mapping/ZFBPayMapper.xml

@@ -112,12 +112,12 @@
     </select>
     <!-- 添加购买次数记录 -->
     <insert id="addBuyOfferNum" parameterType="BuyOfferNum">
-        insert into bus_buy_offer_num(uuid,jdrq,pay_amount,offer_num,code)
-        values(#{uuid},CONVERT(VARCHAR(100), SYSDATETIME(), 20),#{payAmount},#{offerNum},#{code})
+        insert into bus_buy_offer_num(uuid,jdrq,pay_amount,offer_num,code,pay_amount,pay_type)
+        values(#{uuid},CONVERT(VARCHAR(100), SYSDATETIME(), 20),#{payAmount},#{offerNum},#{code},{payAmount},{payType})
     </insert>
     <!-- 供应商余额充值记录 -->
     <insert id="buySupplierBalance" parameterType="WxPay">
-        insert into bus_top_up_record(uuid,code,jdrq,total_fee) values(#{uuid},#{code},CONVERT(VARCHAR(100), SYSDATETIME(), 20),#{totalFee})
+        insert into bus_top_up_record(uuid,code,jdrq,total_fee,pay_type) values(#{uuid},#{code},CONVERT(VARCHAR(100), SYSDATETIME(), 20),#{totalFee},#{payType})
     </insert>
     <!-- 查询个人信息 -->
     <select id="getPresonalMessage" parameterType="String" resultType="Supplier">