From 400af57e240a4c0d74c81ffc8b3417226b51345a Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期四, 06 六月 2024 08:19:13 +0800
Subject: [PATCH] 2024-06-06 朱宝民 生产环境版本

---
 pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/wechatpay/PaymentCtrl.java |   38 +++++++++++---------------------------
 1 files changed, 11 insertions(+), 27 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/wechatpay/PaymentCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/wechatpay/PaymentCtrl.java
index 4aad549..020fad2 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/wechatpay/PaymentCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/wechatpay/PaymentCtrl.java
@@ -5,10 +5,7 @@
 import com.dy.common.webUtil.BaseResponse;
 import com.dy.common.webUtil.BaseResponseUtils;
 import com.dy.common.webUtil.ResultCodeMsg;
-import com.dy.pipIrrGlobal.pojoSe.SeVcRefund;
-import com.dy.pipIrrGlobal.pojoSe.SeVcRefundItem;
-import com.dy.pipIrrGlobal.pojoSe.SeVirtualCard;
-import com.dy.pipIrrGlobal.pojoSe.SeWebchatLogonState;
+import com.dy.pipIrrGlobal.pojoSe.*;
 import com.dy.pipIrrGlobal.voSe.VoClient;
 import com.dy.pipIrrSell.client.ClientSv;
 import com.dy.pipIrrSell.result.SellResultCode;
@@ -123,22 +120,6 @@
         String openid = job.getString("openid");
         String sessionKey = job.getString("session_key");
 
-        // 妫�楠岀櫥褰曟��
-        //JSONObject checkSessionKey = payHelper.checkSessionKey(appid, secret, openid, sessionKey);
-        //if(checkSessionKey != null) {
-        //    Integer errcode = checkSessionKey.getInteger("errcode");
-        //    String errmsg = checkSessionKey.getString("errmsg");
-        //}
-
-        // 閲嶇疆鐧诲綍鎬�
-        //JSONObject resetUserSessionKey = payHelper.resetUserSessionKey(appid, secret, openid, sessionKey);
-        //if(resetUserSessionKey != null) {
-        //    Integer errcode = checkSessionKey.getInteger("errcode");
-        //    String errmsg = checkSessionKey.getString("errmsg");
-        //    String openid_New = checkSessionKey.getString("openid");
-        //    String sessionKey_New = checkSessionKey.getString("session_key");
-        //}
-
         // 娣诲姞鐧诲綍鎬佽褰�
         SeWebchatLogonState po = new SeWebchatLogonState();
         po.setOpenId(openid);
@@ -223,12 +204,15 @@
             return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
         }
         // 鎺ユ敹鍙傛暟锛氱櫥褰曟�両D銆佸啘鎴稩D銆佽櫄鎷熷崱ID銆佸厖鍊奸噾棰�
-        String sessionId = order.getSessionId();
+        Long sessionId = order.getSessionId();
         Long virtualId = order.getVirtualId();
         Integer rechargeAmount = order.getRechargeAmount();
 
         String prepayId = "";
-        SeWebchatLogonState po = paymentSv.selectOne(Long.parseLong(sessionId));
+        //SeWebchatLogonState po = paymentSv.selectOne(Long.parseLong(sessionId));
+        //String openid = po.getOpenId();
+
+        SeOpenId po = paymentSv.selectOne(sessionId);
         String openid = po.getOpenId();
 
         SeVirtualCard seVirtualCard = virtualCardSv.selectVirtuCardById(virtualId);
@@ -286,11 +270,11 @@
         headers.put("Content-Type", "application/json");
 
         // 鏆傛椂娉ㄩ噴鎺夛紝璁よ瘉閫氳繃鍚庡啀鏀惧紑
-        //JSONObject job_result = restTemplateUtil.post(PayInfo.orderUrl, body, headers);
-        //if(job_result != null) {
-        //    System.out.println(job_result.toString());
-        //    prepayId = job_result.getString("prepay_id");
-        //}
+        JSONObject job_result = restTemplateUtil.post(PayInfo.orderUrl, body, headers);
+        if(job_result != null) {
+            System.out.println(job_result.toString());
+            prepayId = job_result.getString("prepay_id");
+        }
 
         return BaseResponseUtils.buildSuccess(prepayId) ;
     }

--
Gitblit v1.8.0