zhs 3 rokov pred
rodič
commit
ea2d74501b

+ 11 - 2
src/main/java/com/supplier/controller/WxPayAppController.java

@@ -211,7 +211,11 @@ public class WxPayAppController extends WxPayUtils {
                             .setTotalFee((float)Integer.parseInt((String)packageParams.get("total_fee")) / 100 + "")
                             .setPayType("微信支付");
                     //充值信息入库
-                    WxPay wxPayBuy = new WxPay().setCode(((String) packageParams.get("attach")).split(",")[2]).setUuid(uuid);
+                    WxPay wxPayBuy = new WxPay()
+                            .setCode(((String) packageParams.get("attach")).split(",")[2])
+                            .setUuid(((String) packageParams.get("attach")).split(",")[1])
+                            .setPayType("微信支付")
+                            .setTotalFee((float)Integer.parseInt((String)packageParams.get("total_fee")) / 100 + "");
                     wxPayService.buySupplierBalance(wxPayBuy);//充值记录
                     wxPayService.updateBuySupplier(buySupplier); //金额录入
                 } else if(((String) packageParams.get("attach")).indexOf("gysOfferNum") != -1){ //报价单次数购买
@@ -222,7 +226,12 @@ public class WxPayAppController extends WxPayUtils {
                             .setOfferNum(((String) packageParams.get("attach")).split(",")[3])
                             .setPayType("微信支付");
                     //购买次数信息入库
-                    BuyOfferNum buyOfferNumAdd = new BuyOfferNum().setUuid(uuid).setOfferNum(((String) packageParams.get("attach")).split(",")[3]).setCode(((String) packageParams.get("attach")).split(",")[2]);
+                    BuyOfferNum buyOfferNumAdd = new BuyOfferNum()
+                            .setUuid(((String) packageParams.get("attach")).split(",")[1])
+                            .setOfferNum(((String) packageParams.get("attach")).split(",")[3])
+                            .setCode(((String) packageParams.get("attach")).split(",")[2])
+                            .setPayType("微信支付")
+                            .setPayAmount((float)Integer.parseInt((String)packageParams.get("total_fee")) / 100 + "");
                     personalServce.addBuyOfferNum(buyOfferNumAdd); //充值记录
                     wxPayService.updateBuyOfferNum(buyOfferNum);//次数录入
                 } else { //报价单购买

+ 4 - 0
src/main/java/com/supplier/model/SupplierRoute.java

@@ -108,4 +108,8 @@ public class SupplierRoute implements Serializable {
      * 路线状态
      */
     private String stateType;
+    /**
+     * 特色
+     */
+    private String features;
 }

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

@@ -124,8 +124,8 @@
     </update>
     <!-- 添加购买次数记录 -->
     <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>
     <!-- 查询收支明细 -->
     <select id="balanceOfPayments" resultType="Map" parameterType="String">
@@ -145,7 +145,7 @@
     </select>
     <!-- 查询充值次数 -->
     <select id="topUpNum" resultType="Map" parameterType="String">
-        SELECT/
+        SELECT
             a.balance_of,a.code,b.topUp,c.offerNum
         FROM
             sys_supplier a

+ 5 - 2
src/main/resources/config/mapping/ReleaseMapper.xml

@@ -4,8 +4,8 @@
 <mapper namespace="com.supplier.mapper.ReleaseMapper">
     <!-- 供应商发布路线 -->
     <insert id="addReleaseVal" parameterType="SupplierRoute">
-        insert into bus_supplier_route(code,origin,destination,start_time,end_time,look_num,title_img,offer_name,price_all,people_num,uuid,jdrq,update_date,title_day_name,state_type,announcements)
-        values(#{code},#{origin},#{destination},#{startTime},#{endTime},0,#{titleImg},#{offerName},#{priceAll},#{peopleNum},#{uuid},CONVERT(VARCHAR(100), SYSDATETIME(), 20),CONVERT(VARCHAR(100), SYSDATETIME(), 20),#{titleDayName},'1',#{announcements})
+        insert into bus_supplier_route(code,origin,destination,start_time,end_time,look_num,title_img,offer_name,price_all,people_num,uuid,jdrq,update_date,title_day_name,state_type,announcements,features)
+        values(#{code},#{origin},#{destination},#{startTime},#{endTime},0,#{titleImg},#{offerName},#{priceAll},#{peopleNum},#{uuid},CONVERT(VARCHAR(100), SYSDATETIME(), 20),CONVERT(VARCHAR(100), SYSDATETIME(), 20),#{titleDayName},'1',#{announcements},#{features})
     </insert>
     <!-- 查询路线发布 -->
     <select id="getRelease" parameterType="SupplierRoute" resultType="SupplierRoute">
@@ -98,6 +98,9 @@
                 <if test="peopleNum != null and peopleNum != ''">
                     people_num = #{peopleNum},
                 </if>
+                <if test="features != null and features != ''">
+                    features = #{features},
+                </if>
                 update_date = SYSDATETIME(),
             </trim>
             where uuid = #{uuid}

+ 2 - 1
src/main/resources/config/mapping/WxPayMapper.xml

@@ -194,7 +194,8 @@
     </select>
     <!-- 供应商余额充值记录 -->
     <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>
     <!-- 供应商余额充值 -->
     <update id="updateBalance" parameterType="double">