Commit d9286e68 by 吕明尚

修改订单计算

parent ef425347
......@@ -2559,13 +2559,13 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
ExecutionTime executionTime = ExecutionTime.forCron(cron);
boolean match = executionTime.isMatch(ZonedDateTime.ofInstant(request.getPreStartDate().toInstant(), ZoneId.systemDefault()));
boolean match1 = executionTime.isMatch(ZonedDateTime.ofInstant(request.getPreEndDate().toInstant(), ZoneId.systemDefault()));
if (match && match1) {
if (match && match1 && priceResponse.getDiscount().compareTo(activity.getDiscountRatio()) == 0) {
if (consumerWallet.getBalance().compareTo(totalFee) >= 0) {
priceResponse.setBalance(totalFee);
priceResponse.setRemainingBalance(consumerWallet.getBalance().subtract(totalFee));
priceResponse.setTotalFeeNow(totalFee);
priceResponse.setMemberDiscount(totalFee);
priceResponse.setDiscount(BigDecimal.ZERO);
// priceResponse.setDiscount(BigDecimal.ZERO);
totalFee = new BigDecimal(0);
} else if (consumerWallet.getBalance().compareTo(totalFee) < 0) {
priceResponse.setTotalFeeNow(totalFee);
......@@ -2648,12 +2648,12 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
ExecutionTime executionTime = ExecutionTime.forCron(cron);
boolean match = executionTime.isMatch(ZonedDateTime.ofInstant(request.getPreStartDate().toInstant(), ZoneId.systemDefault()));
boolean match1 = executionTime.isMatch(ZonedDateTime.ofInstant(request.getPreEndDate().toInstant(), ZoneId.systemDefault()));
if (match && match1) {
if (match && match1 && priceResponse.getDiscount().compareTo(activity.getDiscountRatio()) == 0) {
if (consumerWallet.getBalance().compareTo(totalFee) >= 0) {
priceResponse.setTotalFeeNow(totalFee);
priceResponse.setMemberDiscount(totalFee);
priceResponse.setBalance(totalFee);
priceResponse.setDiscount(BigDecimal.ZERO);
// priceResponse.setDiscount(BigDecimal.ZERO);
priceResponse.setRemainingBalance(consumerWallet.getBalance().subtract(totalFee));
totalFee = new BigDecimal(0);
} else if (consumerWallet.getBalance().compareTo(totalFee) < 0) {
......
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