From e3c546bdb23cefaf0c3fdb6ae0077bed8be90b29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=85=95=E4=B8=8B?= <484014559@qq.com> Date: Mon, 19 Aug 2024 18:03:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=85=E5=80=BC=E6=A8=A1=E5=9D=97=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/pay/dal/dataobject/order/PayOrderDO.java | 2 ++ .../pay/service/wallet/PayWalletRechargeServiceImpl.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderDO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderDO.java index a51b875..79262d0 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderDO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderDO.java @@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO; import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO; import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; @@ -29,6 +30,7 @@ public class PayOrderDO extends BaseDO { /** * 订单编号,数据库自增 */ + @TableId private Long id; /** * 应用编号 diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeServiceImpl.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeServiceImpl.java index 2de531c..ba479b2 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeServiceImpl.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeServiceImpl.java @@ -47,7 +47,7 @@ public class PayWalletRechargeServiceImpl implements PayWalletRechargeService { /** * TODO 芋艿:放到 payconfig */ - private static final Long WALLET_PAY_APP_ID = 8L; + private static final Long WALLET_PAY_APP_ID = 1L; private static final String WALLET_RECHARGE_ORDER_SUBJECT = "钱包余额充值"; @@ -84,7 +84,7 @@ public class PayWalletRechargeServiceImpl implements PayWalletRechargeService { // 2.1 创建支付单 Long payOrderId = payOrderService.createOrder(new PayOrderCreateReqDTO() .setAppId(WALLET_PAY_APP_ID).setUserIp(userIp) - .setMerchantOrderId(recharge.getId().toString()) // 业务的订单编号 + .setMerchantOrderId(""+recharge.getId()) // 业务的订单编号 .setSubject(WALLET_RECHARGE_ORDER_SUBJECT).setBody("") .setPrice(recharge.getPayPrice()) .setExpireTime(addTime(Duration.ofHours(2L)))); // TODO @芋艿:支付超时时间