充值模块调整

This commit is contained in:
慕下 2024-08-19 18:03:39 +08:00
parent b3850a58c5
commit e3c546bdb2
2 changed files with 4 additions and 2 deletions

View File

@ -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;
/**
* 应用编号

View File

@ -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 @芋艿支付超时时间