From 8ada6986f6a45c22783f5a55d030baf8778adb5b Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期三, 06 十一月 2024 18:38:54 +0800 Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/mx_charging_pile --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java | 2 +- ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/vo/AliPaymentReq.java | 4 ++++ ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TVipServiceImpl.java | 2 +- ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/ali/v2/AppletPayUtil.java | 1 + ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/model/PaymentReq.java | 4 ++++ ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/vo/AliPaymentResp.java | 5 ----- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java | 2 +- 7 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/model/PaymentReq.java b/ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/model/PaymentReq.java index 9d067aa..5cc7d7a 100644 --- a/ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/model/PaymentReq.java +++ b/ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/model/PaymentReq.java @@ -41,6 +41,10 @@ * 如果请求时传递了该参数,支付宝会在异步通知时将该参数原样返回。 */ private String passbackParams; + /** + * 支付回调通知 + */ + private String notifyUrl; /** * 初始化默认数据 diff --git a/ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/vo/AliPaymentReq.java b/ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/vo/AliPaymentReq.java index f2f0858..07c3b52 100644 --- a/ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/vo/AliPaymentReq.java +++ b/ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/vo/AliPaymentReq.java @@ -42,6 +42,10 @@ */ private String passbackParams; /** + * 支付回调通知 + */ + private String notifyUrl; + /** * 初始化默认数据 */ public AliPaymentReq() { diff --git a/ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/vo/AliPaymentResp.java b/ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/vo/AliPaymentResp.java index c11ef55..2d64eee 100644 --- a/ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/vo/AliPaymentResp.java +++ b/ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/vo/AliPaymentResp.java @@ -16,10 +16,5 @@ */ @ApiModelProperty("支付单号") private String tradeNo; - /** - * 回调通知地址 - */ - @ApiModelProperty("回调通知地址") - private String notifyUrl; private String orderId; } diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java index c8218c0..3b5ee31 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java @@ -528,9 +528,9 @@ req.setSubject("充电充值"); req.setBuyerOpenId(appUser.getAliOpenid()); req.setBody("充电充值"); + req.setNotifyUrl("/payment/callBack/ali/all"); AliPaymentResp data = aliPaymentClient.payment(req).getData(); if(null != data){ - data.setNotifyUrl(data.getNotifyUrl() + "/order/t-charging-order/chargingOrderALICallback"); return AjaxResult.success(data); } } diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java index a6d2e71..42be27c 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java @@ -373,9 +373,9 @@ req.setSubject("购买商品"); req.setBuyerOpenId(user.getAliOpenid()); req.setBody("购买商品"); + req.setNotifyUrl("/payment/callBack/ali/all"); AliPaymentResp data = aliPaymentClient.payment(req).getData(); if(null != data){ - data.setNotifyUrl(data.getNotifyUrl() + "/payment/callBack/ali/all"); data.setOrderId(shopOrder.getId().toString()); return AjaxResult.success(data); } diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TVipServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TVipServiceImpl.java index b1d5fe1..2981ba1 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TVipServiceImpl.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TVipServiceImpl.java @@ -132,9 +132,9 @@ req.setSubject("充电充值"); req.setBuyerOpenId(user.getAliOpenid()); req.setBody("充电充值"); + req.setNotifyUrl("/payment/callBack/ali/all"); AliPaymentResp data = aliPaymentClient.payment(req).getData(); if(null != data){ - data.setNotifyUrl(data.getNotifyUrl() + "/payment/callBack/ali/all"); return AjaxResult.success(data); } } diff --git a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/ali/v2/AppletPayUtil.java b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/ali/v2/AppletPayUtil.java index f589d48..1dd6852 100644 --- a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/ali/v2/AppletPayUtil.java +++ b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/ali/v2/AppletPayUtil.java @@ -60,6 +60,7 @@ //异步返回参数 model.setPassbackParams(pojo.getPassbackParams()); request.setBizModel(model); + request.setNotifyUrl(aliProperties.getNotifyUrl() + pojo.getNotifyUrl()); AlipayTradeCreateResponse response = alipayClient.execute(request); log.info("-----调起支付宝支付-----"); -- Gitblit v1.7.1