From d8b3392c78ef7275125b3c6d1f247d7256942f60 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期三, 12 六月 2024 10:26:19 +0800 Subject: [PATCH] 1、删除压力测试相关数据库表test*,相应删除pojo和mapper; 2、删除demo模块及相关数据库表demo*,相应删除pojo和mapper。 --- pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/wechatpay/PaymentCtrl.java | 42 ++++++++++++------------------------------ 1 files changed, 12 insertions(+), 30 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..48e0a35 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); @@ -204,7 +185,7 @@ * JSAPI涓嬪崟 * @param order 涓嬪崟璇锋眰瀵硅薄锛屽寘鍚渶瑕佷紶鍏ョ殑鍙傛暟 * @param bindingResult - * @return + * @return 棰勬敮浠樹氦鏄撲細璇濇爣璇嗭紙鏈夋晥鏈�2灏忔椂锛� */ @Operation(summary = "JSAPI涓嬪崟", description = "JSAPI涓嬪崟") @ApiResponses(value = { @@ -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,13 +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"); - //} - - return BaseResponseUtils.buildSuccess(prepayId) ; + JSONObject job_result = restTemplateUtil.post(PayInfo.orderUrl, body, headers); + if(job_result == null) { + return BaseResponseUtils.buildFail(SellResultCode.RECHARGE_ADD_FAIL.getMessage()); + } + return BaseResponseUtils.buildSuccess(job_result) ; } /** -- Gitblit v1.8.0