充值模块bug修复 #8
@ -22,8 +22,10 @@ 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.dal.dataobject.order.PayOrderDO;
|
||||
import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO;
|
||||
import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargeDO;
|
||||
import cn.iocoder.yudao.module.pay.dal.mysql.order.PayOrderExtensionMapper;
|
||||
import cn.iocoder.yudao.module.pay.dal.mysql.order.PayOrderMapper;
|
||||
import cn.iocoder.yudao.module.pay.dal.mysql.wallet.PayWalletRechargeMapper;
|
||||
import cn.iocoder.yudao.module.pay.dal.redis.no.PayNoRedisDAO;
|
||||
import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyTypeEnum;
|
||||
import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum;
|
||||
@ -74,6 +76,8 @@ public class PayOrderServiceImpl implements PayOrderService {
|
||||
private PayChannelService channelService;
|
||||
@Resource
|
||||
private PayNotifyService notifyService;
|
||||
@Resource
|
||||
private PayWalletRechargeMapper walletRechargeMapper;
|
||||
|
||||
@Override
|
||||
public PayOrderDO getOrder(Long id) {
|
||||
@ -254,6 +258,13 @@ public class PayOrderServiceImpl implements PayOrderService {
|
||||
PayChannelDO channel = channelService.validPayChannel(channelId);
|
||||
// 更新支付订单为已支付
|
||||
TenantUtils.execute(channel.getTenantId(), () -> getSelf().notifyOrder(channel, notify));
|
||||
PayOrderExtensionDO payOrderExtensionDO = orderExtensionMapper.selectByNo(notify.getOutTradeNo());
|
||||
PayWalletRechargeDO walletRechargeDO = walletRechargeMapper.selectOne("pay_order_id", payOrderExtensionDO.getOrderId());
|
||||
if (walletRechargeDO != null){
|
||||
walletRechargeDO.setPayStatus(true);
|
||||
walletRechargeDO.setPayTime(LocalDateTime.now());
|
||||
walletRechargeMapper.updateById(walletRechargeDO);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user