Browse Source

fix分润逻辑

周箭河 5 years ago
parent
commit
18e4de4d85

+ 4 - 4
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/YqPayUtil.java

@@ -15,7 +15,7 @@ public class YqPayUtil {
 
     public static Map<String, Object> getRequestMap(String notifyUrl, Map<String, Object> resultMap) throws Exception {
         Map<String, Object> rqMap = new LinkedHashMap<>();
-        rqMap.put("merNo", resultMap.get("sellerNo"));
+        rqMap.put("merNo",merNo);
         rqMap.put("version", version);
         rqMap.put("notifyUrl", notifyUrl);
         rqMap.put("timestamp", DateUtils.getDateTime());
@@ -40,7 +40,7 @@ public class YqPayUtil {
      * @return
      * @throws Exception
      */
-    public static Map<String, Object> getPayMap(BigDecimal amount, String orderNo, String notifyUrl, String returnUrl, String orderSubject, String orderBody,String merNo, String routingMerNo) throws Exception {
+    public static Map<String, Object> getPayMap(BigDecimal amount, String orderNo, String notifyUrl, String returnUrl, String orderSubject, String orderBody,String sellerNo, String routingMerNo) throws Exception {
         List<Map> tempRoutingList = new ArrayList();
         Map<String, Object> routingList = new HashMap<>();
         routingList.put("routingMerNo", routingMerNo);//分佣账户
@@ -48,7 +48,7 @@ public class YqPayUtil {
         tempRoutingList.add(routingList);
 
         Map<String, Object> contentMap = new LinkedHashMap<>();
-        contentMap.put("sellerNo", merNo); //收款商户号
+        contentMap.put("sellerNo", sellerNo); //收款商户号
         contentMap.put("payChannels", payChannels); //支付方式
         contentMap.put("orderBody", orderBody); //订单信息
         contentMap.put("payAmount", amount); //支付金额
@@ -57,7 +57,7 @@ public class YqPayUtil {
         contentMap.put("merMerOrderNo", orderNo); //商户订单号
         contentMap.put("orderSubject", orderSubject); //订单标题
         contentMap.put("returnUrl", returnUrl); //前台页面地址
-        if (routingMerNo != null && !routingMerNo.isEmpty() && !merNo.equals(routingMerNo)) {
+        if (routingMerNo != null && !routingMerNo.isEmpty() && !sellerNo.equals(routingMerNo)) {
             contentMap.put("tempRoutingList", JSON.toJSONString(tempRoutingList));//分账设置
         }
         Map<String, Object> payMap = getRequestMap(notifyUrl, contentMap);