|
|
@@ -239,8 +239,8 @@ public class PromotionCalcServiceImpl implements IPromotionCalcService
|
|
|
BigDecimal baseForCoupon = afterPromotion.subtract(newCustomerReduce);
|
|
|
baseForCoupon = baseForCoupon.max(BigDecimal.ZERO);
|
|
|
|
|
|
- if (couponRule.getThreshold() != null
|
|
|
- && baseForCoupon.compareTo(couponRule.getThreshold()) >= 0)
|
|
|
+ if (couponRule.getThreshold() == null
|
|
|
+ || baseForCoupon.compareTo(couponRule.getThreshold()) >= 0)
|
|
|
{
|
|
|
if (batch.getCouponType() != null && batch.getCouponType() == 2
|
|
|
&& couponRule.getProductId() != null && "A".equals(optimalPath))
|
|
|
@@ -724,7 +724,7 @@ public class PromotionCalcServiceImpl implements IPromotionCalcService
|
|
|
BigDecimal subtotal = originalAmount.subtract(bestMatch.getReduceAmount())
|
|
|
.max(MIN_AMOUNT).setScale(0, RoundingMode.HALF_UP);
|
|
|
pathResult.put("subtotal", subtotal);
|
|
|
- pathResult.put("promotionReduce", bestMatch.getReduceAmount());
|
|
|
+ pathResult.put("promotionReduce", originalAmount.subtract(subtotal));
|
|
|
Map<String, Object> matchedRuleInfo = new LinkedHashMap<>();
|
|
|
matchedRuleInfo.put("id", bestMatch.getId());
|
|
|
matchedRuleInfo.put("activityId", bestMatch.getActivityId());
|