Compare commits

..

No commits in common. "364d174bd9349bf81091c8cea54a324fbfc9f830" and "c1d73ec5447831d2c106089d06705b00f6af4d20" have entirely different histories.

2 changed files with 1 additions and 19 deletions

View File

@ -33,7 +33,6 @@ import cn.iocoder.yudao.module.pay.framework.pay.config.PayProperties;
import cn.iocoder.yudao.module.pay.service.app.PayAppService;
import cn.iocoder.yudao.module.pay.service.channel.PayChannelService;
import cn.iocoder.yudao.module.pay.service.notify.PayNotifyService;
import cn.iocoder.yudao.module.pay.service.wallet.PayWalletService;
import com.google.common.annotations.VisibleForTesting;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@ -50,7 +49,6 @@ import java.util.Objects;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString;
import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.*;
import static cn.iocoder.yudao.module.pay.enums.wallet.PayWalletBizTypeEnum.RECHARGE;
/**
* 支付订单 Service 实现类
@ -80,8 +78,6 @@ public class PayOrderServiceImpl implements PayOrderService {
private PayNotifyService notifyService;
@Resource
private PayWalletRechargeMapper walletRechargeMapper;
@Resource
private PayWalletService payWalletService;
@Override
public PayOrderDO getOrder(Long id) {
@ -268,7 +264,6 @@ public class PayOrderServiceImpl implements PayOrderService {
walletRechargeDO.setPayStatus(true);
walletRechargeDO.setPayTime(LocalDateTime.now());
walletRechargeMapper.updateById(walletRechargeDO);
payWalletService.addWalletBalance(walletRechargeDO.getWalletId(),walletRechargeDO.getPayOrderId().toString(),RECHARGE,walletRechargeDO.getTotalPrice());
}
}

View File

@ -18,7 +18,6 @@ import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum;
import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum;
import cn.iocoder.yudao.module.pay.service.order.PayOrderService;
import cn.iocoder.yudao.module.pay.service.refund.PayRefundService;
import cn.iocoder.yudao.module.pay.service.wallet.bo.WalletTransactionCreateReqBO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -35,7 +34,6 @@ import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString
import static cn.iocoder.yudao.module.pay.convert.wallet.PayWalletRechargeConvert.INSTANCE;
import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.*;
import static cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum.*;
import static cn.iocoder.yudao.module.pay.enums.wallet.PayWalletBizTypeEnum.RECHARGE;
/**
* 钱包充值 Service 实现类
@ -63,8 +61,6 @@ public class PayWalletRechargeServiceImpl implements PayWalletRechargeService {
private PayRefundService payRefundService;
@Resource
private PayWalletRechargePackageService payWalletRechargePackageService;
@Resource
private PayWalletTransactionService payWalletTransactionService;
@Override
@Transactional(rollbackFor = Exception.class)
@ -95,15 +91,6 @@ public class PayWalletRechargeServiceImpl implements PayWalletRechargeService {
// 2.2 更新钱包充值记录中支付订单
walletRechargeMapper.updateById(new PayWalletRechargeDO().setId(recharge.getId()).setPayOrderId(payOrderId));
recharge.setPayOrderId(payOrderId);
// WalletTransactionCreateReqBO reqBO = new WalletTransactionCreateReqBO();
// reqBO.setBalance(wallet.getBalance()+recharge.getTotalPrice());
// reqBO.setBizId(recharge.getPayOrderId().toString());
// reqBO.setBizType(1);
// reqBO.setPrice(recharge.getTotalPrice());
// reqBO.setTitle("充值");
// reqBO.setWalletId(recharge.getWalletId());
// payWalletTransactionService.createWalletTransaction(reqBO);
// payWalletService.addWalletBalance(recharge.getWalletId(),recharge.getPayOrderId().toString(),RECHARGE,recharge.getTotalPrice());
return recharge;
}
@ -138,7 +125,7 @@ public class PayWalletRechargeServiceImpl implements PayWalletRechargeService {
// TODO @jason这样的话未来提现会不会把充值的也提现走哈类似先充 100 110然后提现 110
// TODO 需要钱包中加个可提现余额
payWalletService.addWalletBalance(walletRecharge.getWalletId(), String.valueOf(id),
RECHARGE, walletRecharge.getTotalPrice());
PayWalletBizTypeEnum.RECHARGE, walletRecharge.getTotalPrice());
}
@Override