From f4e4ef40c1f23799e008b80dae2c381c4f446513 Mon Sep 17 00:00:00 2001 From: yang <2119157836@qq.com> Date: Sat, 8 Feb 2025 18:01:07 +0800 Subject: [PATCH] =?UTF-8?q?feat(payment):=20=E8=B0=83=E6=95=B4=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mcwl/pay/service/impl/AliPayServiceImpl.java | 6 ++++++ .../com/mcwl/pay/service/impl/OrderTradeServiceImpl.java | 1 + 2 files changed, 7 insertions(+) diff --git a/mcwl-pay/src/main/java/com/mcwl/pay/service/impl/AliPayServiceImpl.java b/mcwl-pay/src/main/java/com/mcwl/pay/service/impl/AliPayServiceImpl.java index 9680758..1b051e5 100644 --- a/mcwl-pay/src/main/java/com/mcwl/pay/service/impl/AliPayServiceImpl.java +++ b/mcwl-pay/src/main/java/com/mcwl/pay/service/impl/AliPayServiceImpl.java @@ -35,6 +35,7 @@ import com.mcwl.pay.domain.OrderTrade; import com.mcwl.pay.domain.OrderTradeDto; import com.mcwl.pay.domain.vo.PayVo; import com.mcwl.pay.service.AliPayService; +import com.mcwl.pay.service.OrderTradeService; import com.mcwl.system.domain.SysUserPayAccount; import com.mcwl.system.domain.SysUserPayAccountLog; import com.mcwl.system.service.ISysUserPayAccountLogService; @@ -78,6 +79,9 @@ public class AliPayServiceImpl implements AliPayService { @Autowired private ISysUserPayAccountLogService sysUserPayAccountLogService; + @Autowired + private OrderTradeService orderTradeService; + public AliPayServiceImpl(Config config) { Factory.setOptions(config); @@ -156,6 +160,8 @@ public class AliPayServiceImpl implements AliPayService { tradeEntity.setUserName(SecurityUtils.getUsername()); tradeEntity.setProductName(memberLevel.getMemberName()); + orderTradeService.save(tradeEntity); + //调用支付宝的接口 AlipayTradePrecreateResponse payResponse = Factory.Payment.FaceToFace() // 设置过期时 diff --git a/mcwl-pay/src/main/java/com/mcwl/pay/service/impl/OrderTradeServiceImpl.java b/mcwl-pay/src/main/java/com/mcwl/pay/service/impl/OrderTradeServiceImpl.java index 5957d7b..705bf91 100644 --- a/mcwl-pay/src/main/java/com/mcwl/pay/service/impl/OrderTradeServiceImpl.java +++ b/mcwl-pay/src/main/java/com/mcwl/pay/service/impl/OrderTradeServiceImpl.java @@ -225,6 +225,7 @@ public class OrderTradeServiceImpl extends ServiceImpl