Merge pull request '充值模块bug修复' (#8) from zzw-one into master
All checks were successful
continuous-integration/drone Build is passing
All checks were successful
continuous-integration/drone Build is passing
Reviewed-on: #8
This commit is contained in:
commit
e1f3053cc3
@ -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.channel.PayChannelDO;
|
||||||
import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO;
|
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.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.PayOrderExtensionMapper;
|
||||||
import cn.iocoder.yudao.module.pay.dal.mysql.order.PayOrderMapper;
|
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.dal.redis.no.PayNoRedisDAO;
|
||||||
import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyTypeEnum;
|
import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyTypeEnum;
|
||||||
import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum;
|
import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum;
|
||||||
@ -74,6 +76,8 @@ public class PayOrderServiceImpl implements PayOrderService {
|
|||||||
private PayChannelService channelService;
|
private PayChannelService channelService;
|
||||||
@Resource
|
@Resource
|
||||||
private PayNotifyService notifyService;
|
private PayNotifyService notifyService;
|
||||||
|
@Resource
|
||||||
|
private PayWalletRechargeMapper walletRechargeMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PayOrderDO getOrder(Long id) {
|
public PayOrderDO getOrder(Long id) {
|
||||||
@ -254,6 +258,13 @@ public class PayOrderServiceImpl implements PayOrderService {
|
|||||||
PayChannelDO channel = channelService.validPayChannel(channelId);
|
PayChannelDO channel = channelService.validPayChannel(channelId);
|
||||||
// 更新支付订单为已支付
|
// 更新支付订单为已支付
|
||||||
TenantUtils.execute(channel.getTenantId(), () -> getSelf().notifyOrder(channel, notify));
|
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