!285 fix & improve

Merge pull request !285 from OceansDeep/pg
This commit is contained in:
OceansDeep 2023-05-10 06:53:45 +00:00 committed by Gitee
commit 5e950b9766
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -203,9 +203,12 @@ public class PromotionPriceUtil {
return false;
}).collect(Collectors.toList());
if (!unEnoughSku.isEmpty()) {
if (unEnoughSku.size() == skuVOList.size()) {
return;
}
for (CartSkuVO cartSkuVO : skuVOList) {
if (unEnoughSku.isEmpty()) {
return;
break;
}
if (skuPromotionDetail.containsKey(cartSkuVO.getGoodsSku().getId()) && unEnoughSku.stream().noneMatch(k -> k.getGoodsSku().getId().equals(cartSkuVO.getGoodsSku().getId()))) {
// 商品金额占比