From 2ba431be9c12a79783e0f9ef249292b7fa95f2a1 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期一, 25 一月 2021 19:13:58 +0800
Subject: [PATCH] 拼多多备案调整

---
 utils/src/main/java/org/yeshi/utils/wx/WXPayUtil.java |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/utils/src/main/java/org/yeshi/utils/wx/WXPayUtil.java b/utils/src/main/java/org/yeshi/utils/wx/WXPayUtil.java
index 2f3168c..143f1d3 100644
--- a/utils/src/main/java/org/yeshi/utils/wx/WXPayUtil.java
+++ b/utils/src/main/java/org/yeshi/utils/wx/WXPayUtil.java
@@ -172,16 +172,16 @@
 		if (params == null)
 			throw new WXPlaceOrderParamsException(1, "璇蜂紶鍏ヤ笅鍗曞弬鏁�");
 
-		if (params.getInfo() == null)
+		if (params.getApp() == null)
 			throw new WXPlaceOrderParamsException(2, "璇蜂紶鍏ヤ笅鍗曞簲鐢ㄤ俊鎭�");
 
-		if (StringUtil.isNullOrEmpty(params.getInfo().getAppId()))
+		if (StringUtil.isNullOrEmpty(params.getApp().getAppId()))
 			throw new WXPlaceOrderParamsException(201, "璇蜂紶鍏ヤ笅鍗曞簲鐢ㄤ俊鎭�-appId");
-		if (StringUtil.isNullOrEmpty(params.getInfo().getAppSecret()))
+		if (StringUtil.isNullOrEmpty(params.getApp().getAppSecret()))
 			throw new WXPlaceOrderParamsException(202, "璇蜂紶鍏ヤ笅鍗曞簲鐢ㄤ俊鎭�-appSecret");
-		if (StringUtil.isNullOrEmpty(params.getInfo().getMchId()))
+		if (StringUtil.isNullOrEmpty(params.getApp().getMchId()))
 			throw new WXPlaceOrderParamsException(203, "璇蜂紶鍏ヤ笅鍗曞簲鐢ㄤ俊鎭�-mchId");
-		if (StringUtil.isNullOrEmpty(params.getInfo().getMchKey()))
+		if (StringUtil.isNullOrEmpty(params.getApp().getMchKey()))
 			throw new WXPlaceOrderParamsException(204, "璇蜂紶鍏ヤ笅鍗曞簲鐢ㄤ俊鎭�-mchKey");
 		if (StringUtil.isNullOrEmpty(params.getBody()))
 			throw new WXPlaceOrderParamsException(3, "璇蜂紶鍏ody");
@@ -205,8 +205,8 @@
 		// throw new WXPlaceOrderParamsException(9, "璇蜂紶鍏penId");
 
 		Map<String, String> map = new HashMap<String, String>();
-		map.put("appid", params.getInfo().getAppId());
-		map.put("mch_id", params.getInfo().getMchId());
+		map.put("appid", params.getApp().getAppId());
+		map.put("mch_id", params.getApp().getMchId());
 		map.put("nonce_str", StringUtil.getRandomCode(32));
 		map.put("body", params.getBody());
 		map.put("out_trade_no", params.getOrderNo());
@@ -216,7 +216,7 @@
 		map.put("trade_type", params.getTradeType());
 		if (!StringUtil.isNullOrEmpty(params.getOpenId()))
 			map.put("openid", params.getOpenId());
-		map.put("sign", WXUtil.getSignMD5(map, params.getInfo().getMchKey()));
+		map.put("sign", WXUtil.getSignMD5(map, params.getApp().getMchKey()));
 
 		String entity = WXUtil.loadWXMessage(map);
 

--
Gitblit v1.8.0