diff --git a/framework/src/main/java/cn/lili/modules/order/cart/render/impl/FullDiscountRender.java b/framework/src/main/java/cn/lili/modules/order/cart/render/impl/FullDiscountRender.java index 24618c4b..270caba9 100644 --- a/framework/src/main/java/cn/lili/modules/order/cart/render/impl/FullDiscountRender.java +++ b/framework/src/main/java/cn/lili/modules/order/cart/render/impl/FullDiscountRender.java @@ -16,6 +16,7 @@ import cn.lili.modules.order.cart.render.util.PromotionPriceUtil; import cn.lili.modules.order.order.entity.dto.DiscountPriceItem; import cn.lili.modules.order.order.entity.dto.PriceDetailDTO; import cn.lili.modules.promotion.entity.dos.FullDiscount; +import cn.lili.modules.promotion.entity.enums.PromotionsScopeTypeEnum; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -70,6 +71,9 @@ public class FullDiscountRender implements CartRenderStep { cart.setFullDiscount(fullDiscountVO); Map skuPriceDetail = new HashMap<>(16); for (CartSkuVO cartSkuVO : cart.getSkuList()) { + if (PromotionsScopeTypeEnum.PORTION_GOODS.name().equals(fullDiscountVO.getScopeType()) && fullDiscountVO.getScopeId() != null && !fullDiscountVO.getScopeId().contains(cartSkuVO.getGoodsSku().getId())) { + continue; + } skuPriceDetail.put(cartSkuVO.getGoodsSku().getId(), cartSkuVO.getPriceDetailDTO().getGoodsPrice()); } if (!skuPriceDetail.isEmpty()) { diff --git a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/AbstractPromotionsServiceImpl.java b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/AbstractPromotionsServiceImpl.java index 3a16eb86..a92abfb5 100644 --- a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/AbstractPromotionsServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/AbstractPromotionsServiceImpl.java @@ -112,9 +112,9 @@ public abstract class AbstractPromotionsServiceImpl, T e List promotionsList = this.list(new QueryWrapper().in("id", ids)); for (T t : promotionsList) { if (startTime != null && endTime != null) { - this.checkPromotions(t); t.setStartTime(new Date(startTime)); t.setEndTime(new Date(endTime)); + this.checkPromotions(t); } else { t.setStartTime(null); t.setEndTime(null);