From 5381dce6a843c08c1a6f525add5f65d36a9a8556 Mon Sep 17 00:00:00 2001 From: hu177768073 <177768073@qq.com> Date: Wed, 11 Sep 2024 11:38:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/bweb/controller/TestController.java | 19 +++++++++++++++++++ .../order/controller/OrderPayController.java | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/bweb/src/main/java/com/bweb/controller/TestController.java b/bweb/src/main/java/com/bweb/controller/TestController.java index b9f5238..639d012 100644 --- a/bweb/src/main/java/com/bweb/controller/TestController.java +++ b/bweb/src/main/java/com/bweb/controller/TestController.java @@ -18,6 +18,8 @@ import com.hfkj.service.goods.GoodsUserAddressService; import com.hfkj.service.hlt.HltCanteenService; import com.hfkj.service.hlt.HuiLianTongUnionCardService; import com.hfkj.service.order.BsOrderChildService; +import com.hfkj.service.pay.huift.TradeService; +import com.hfkj.service.pay.huift.config.HuiftConfig; import com.hfkj.sysenum.order.OrderLogisticsStatusEnum; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -60,6 +62,23 @@ public class TestController { @Resource private GoodsUserAddressService addressService; + @Resource + private TradeService huiftTradeService; + @RequestMapping(value="/thirdPayResult",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询V家园订单交易状态") + public ResponseData thirdPayResult(@RequestParam(value = "preOrderNo" , required = true) String preOrderNo, + @RequestParam(value = "shopCode" , required = true) String shopCode, + @RequestParam(value = "signSecret" , required = true) String signSecret) { + try { + + return ResponseMsgUtil.success(huiftTradeService.thirdPayResult(preOrderNo,shopCode,signSecret)); + + } catch (Exception e) { + log.error("error!",e); + return ResponseMsgUtil.exception(e); + } + } @RequestMapping(value="/canteenConsume",method = RequestMethod.GET) @ResponseBody diff --git a/order/src/main/java/com/order/controller/OrderPayController.java b/order/src/main/java/com/order/controller/OrderPayController.java index 17957a1..208b579 100644 --- a/order/src/main/java/com/order/controller/OrderPayController.java +++ b/order/src/main/java/com/order/controller/OrderPayController.java @@ -207,8 +207,8 @@ public class OrderPayController { // 请求支付渠道 JSONObject thirdPreOrder = huiftTradeService.thirdPreOrder(order , shopCode , signSecret); for (OrderChildModel orderChild : order.getOrderChildList()) { - orderChild.setSettleAccount(HuiftConfig.shopcode); - orderChild.setSettleAccountKey(HuiftConfig.signSecret); + orderChild.setSettleAccount(shopCode); + orderChild.setSettleAccountKey(signSecret); orderChildService.editData(orderChild); }