We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PaymentApplicationService中支付订单的逻辑如下,先把订单状态改为支付,再去扣减钱包的钱 这个接口是由"/restful/pay"触发,也就是第三方支付支付成功的前提下才会执行如下逻辑 那么有如下两个问题: 1、第三方支付成功了,为什么还要有这个钱包的概念。 2、如下代码的执行顺序是把订单改为支付成功,再去扣减钱包的余额,但是此时余额不足的情况下,订单状态依然是支付成功的。 public void accomplishPayment(Integer accountId, String payId) { // 订单从冻结状态变为派送状态,扣减库存 double price = paymentService.accomplish(payId); // 扣减货款 walletService.decrease(accountId, price); // 支付成功的清除缓存 settlementCache.evict(payId); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
PaymentApplicationService中支付订单的逻辑如下,先把订单状态改为支付,再去扣减钱包的钱
这个接口是由"/restful/pay"触发,也就是第三方支付支付成功的前提下才会执行如下逻辑
那么有如下两个问题:
1、第三方支付成功了,为什么还要有这个钱包的概念。
2、如下代码的执行顺序是把订单改为支付成功,再去扣减钱包的余额,但是此时余额不足的情况下,订单状态依然是支付成功的。
public void accomplishPayment(Integer accountId, String payId) {
// 订单从冻结状态变为派送状态,扣减库存
double price = paymentService.accomplish(payId);
// 扣减货款
walletService.decrease(accountId, price);
// 支付成功的清除缓存
settlementCache.evict(payId);
}
The text was updated successfully, but these errors were encountered: