Commit 7eddb268 by 吕明尚

修改使用优惠券和钱包的计算

parent 31c4f90f
...@@ -1963,6 +1963,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -1963,6 +1963,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
priceResponse.setDuration(new BigDecimal(0)); priceResponse.setDuration(new BigDecimal(0));
priceResponse.setRemainingDuration(new BigDecimal(0)); priceResponse.setRemainingDuration(new BigDecimal(0));
if (priceResponse.getPayFee().compareTo(new BigDecimal(0)) > 0) { if (priceResponse.getPayFee().compareTo(new BigDecimal(0)) > 0) {
if (ObjectUtil.isNotEmpty(consumerWallet)) {
if (consumerWallet.getBalance().compareTo(priceResponse.getPayFee()) >= 0) { if (consumerWallet.getBalance().compareTo(priceResponse.getPayFee()) >= 0) {
priceResponse.setBalance(priceResponse.getPayFee()); priceResponse.setBalance(priceResponse.getPayFee());
priceResponse.setRemainingBalance(consumerWallet.getBalance().subtract(priceResponse.getPayFee())); priceResponse.setRemainingBalance(consumerWallet.getBalance().subtract(priceResponse.getPayFee()));
...@@ -1971,8 +1972,9 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -1971,8 +1972,9 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
priceResponse.setBalance(consumerWallet.getBalance()); priceResponse.setBalance(consumerWallet.getBalance());
totalFee = priceResponse.getPayFee().subtract(consumerWallet.getBalance()); totalFee = priceResponse.getPayFee().subtract(consumerWallet.getBalance());
} }
priceResponse.setPayFee(totalFee); priceResponse.setPayFee(totalFee);
}
if (ObjectUtil.isNotEmpty(consumerMember)) { if (ObjectUtil.isNotEmpty(consumerMember)) {
MemberConfig memberConfig = memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>().eq(MemberConfig::getId, consumerMember.getMemberConfigId())); MemberConfig memberConfig = memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>().eq(MemberConfig::getId, consumerMember.getMemberConfigId()));
//总金额乘以折扣比例除以100 //总金额乘以折扣比例除以100
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment