1
0
فهرست منبع

Merge branch 'master' of zx/cuspay into master

project 7 سال پیش
والد
کامیت
e78d7de860

+ 11 - 0
src/main/java/com/emato/cuspay/dto/merch/MerchNoti.java

@@ -3,6 +3,7 @@ package com.emato.cuspay.dto.merch;
 import java.io.Serializable;
 import java.util.Date;
 
+
 public class MerchNoti implements Serializable {
     private String notiSn;
 
@@ -58,6 +59,8 @@ public class MerchNoti implements Serializable {
 
     private Date tstm;
 
+    private String merchErpOrderSn;
+
     private static final long serialVersionUID = 1L;
 
     public MerchNoti() {
@@ -272,6 +275,14 @@ public class MerchNoti implements Serializable {
         this.modTime = modTime == null ? null : modTime.trim();
     }
 
+    public String getMerchErpOrderSn() {
+        return merchErpOrderSn;
+    }
+
+    public void setMerchErpOrderSn(String merchErpOrderSn) {
+        this.merchErpOrderSn = merchErpOrderSn;
+    }
+
     public Date getTstm() {
         return tstm;
     }

+ 18 - 1
src/main/java/com/emato/cuspay/notify/CusMerchantNotice.java

@@ -7,6 +7,7 @@ import com.emato.cuspay.support.msg.resp.ResponseMessage;
 import com.emato.cuspay.support.msg.resp.ResponseStatus;
 import com.emato.cuspay.util.OkHttpUtils;
 import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
 import com.google.gson.Gson;
 import okhttp3.Request;
 import okhttp3.RequestBody;
@@ -18,6 +19,7 @@ import org.springframework.stereotype.Component;
 
 import java.io.IOException;
 import java.util.List;
+import java.util.Map;
 
 
 /**
@@ -107,9 +109,24 @@ public class CusMerchantNotice implements MerchantNotice{
     }
 
     private String createJsonByNoti(MerchNoti noti) {
+        Map<String, String> request = Maps.newHashMap();
+        request.put("merchErpOrderSn",noti.getMerchErpOrderSn());
+        request.put("merchSn", noti.getMerchSn());
+        request.put("allPaySn",noti.getAllPaySn());
+        request.put("allPayNo",noti.getAllPayNo());
+        request.put("allMerchId",noti.getAllMerchId());
+        request.put("allSubOrderNo",noti.getAllSubOrderNo());
+        request.put("buyerPayerCheck",noti.getBuyerPayerCheck());
+        request.put("payChnlFlag",noti.getPayChnlFlag());
+        request.put("code",noti.getCode());
+        request.put("msg",noti.getMsg());
+        request.put("cusDeclStatus", noti.getCusDeclStatus());
+        request.put("thirdPartyMerchCode",noti.getThirdPartyMerchCode());
+        request.put("thirdPartyMerchName()",noti.getThirdPartyMerchName());
+
         ResponseMessage responseMessage = new ResponseMessage.Builder()
                     .setCode(ResponseStatus.SUCCESS.getItem())
-                    .setData(noti).build();
+                    .setData(request).build();
         return new Gson().toJson(responseMessage);
     }
 }

+ 1 - 1
src/main/java/com/emato/cuspay/wx/common/MerchNotiBuilder.java

@@ -34,7 +34,7 @@ public class MerchNotiBuilder {
     }
 
     public MerchNotiBuilder wxCbPay(WxCbPayDoc wxCbPay) {
-        this.merchNoti.setAllPaySn(wxCbPay.getMerchErpOrderSn());
+        this.merchNoti.setMerchErpOrderSn(wxCbPay.getMerchErpOrderSn());
         this.merchNoti.setMerchSn(wxCbPay.getMerchSn());
         this.merchNoti.setMerchName(wxCbPay.getMerchName());
         this.merchNoti.setPlatSn(wxCbPay.getPlatSn());

+ 16 - 1
src/main/resources/mybatis/mapper/MerchNotiMapper.xml

@@ -6,6 +6,7 @@
     <result column="all_pay_sn" property="allPaySn" jdbcType="VARCHAR" />
     <result column="merch_sn" property="merchSn" jdbcType="VARCHAR" />
     <result column="merch_name" property="merchName" jdbcType="VARCHAR" />
+    <result column="merch_erp_order_sn" property="merchErpOrderSn" jdbcType="VARCHAR" />
     <result column="plat_sn" property="platSn" jdbcType="VARCHAR" />
     <result column="plat_name" property="platName" jdbcType="VARCHAR" />
     <result column="third_party_merch_code" property="thirdPartyMerchCode" jdbcType="VARCHAR" />
@@ -31,7 +32,7 @@
     <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
   </resultMap>
   <sql id="Base_Column_List" >
-    noti_sn, all_pay_sn, merch_sn, merch_name, plat_sn, plat_name, third_party_merch_code, 
+    noti_sn, all_pay_sn, merch_sn, merch_name, merch_erp_order_sn,plat_sn, plat_name, third_party_merch_code,
     third_party_merch_name, all_merch_id, all_order_no, all_pay_no, all_sub_order_no, 
     pay_chnl_flag, buyer_payer_check, noti_count, is_stoped, cus_decl_status, noti_statue, 
     code, msg, notify_url, remark, creater_sn, create_time, moder_sn, mod_time, tstm
@@ -62,6 +63,9 @@
       <if test="merchName != null" >
         merch_name,
       </if>
+      <if test="merchErpOrderSn != null">
+        merch_erp_order_sn,
+      </if>
       <if test="platSn != null" >
         plat_sn,
       </if>
@@ -145,6 +149,9 @@
       <if test="merchName != null" >
         #{merchName,jdbcType=VARCHAR},
       </if>
+      <if test="merchErpOrderSn != null">
+        #{merchErpOrderSn, jdbcType=VARCHAR}
+      </if>
       <if test="platSn != null" >
         #{platSn,jdbcType=VARCHAR},
       </if>
@@ -228,6 +235,9 @@
       <if test="merchName != null" >
         merch_name = #{merchName,jdbcType=VARCHAR},
       </if>
+      <if test="merchErpOrderSn != null">
+        merch_erp_order_sn = #{merchErpOrderSn, jdbcType=VARCHAR},
+      </if>
       <if test="platSn != null" >
         plat_sn = #{platSn,jdbcType=VARCHAR},
       </if>
@@ -314,6 +324,7 @@
         all_pay_sn,
         merch_sn,
         merch_name,
+        merch_erp_order_sn,
         plat_sn,
         plat_name,
         third_party_merch_code,
@@ -344,6 +355,7 @@
           #{item.allPaySn,jdbcType=VARCHAR},
           #{item.merchSn,jdbcType=VARCHAR},
           #{item.merchName,jdbcType=VARCHAR},
+          #{item.merchErpOrderSn, jdbcType=VARCHAR},
           #{item.platSn,jdbcType=VARCHAR},
           #{item.platName,jdbcType=VARCHAR},
           #{item.thirdPartyMerchCode,jdbcType=VARCHAR},
@@ -382,6 +394,9 @@
         <if test="item.merchName != null" >
           merch_name = #{item.merchName,jdbcType=VARCHAR},
         </if>
+        <if test="item.merchErpOrderSn != null">
+          merch_erp_order_sn = #{item.merchErpOrderSn,jdbcType=VARCHAR},
+        </if>
         <if test="item.platSn != null" >
           plat_sn = #{item.platSn,jdbcType=VARCHAR},
         </if>