Commit 53f4d7e5 by xiaoer.li@freemud.com

Merge remote-tracking branch 'remotes/origin/feature/促销算价基于最新master的分支' into qa

parents 95c20c0c 48b9f95b
......@@ -121,7 +121,7 @@ public class FullSharingService {
Long md = mDiscount.get(com.getGoodsId());
if (md != null) {
com.setAmount(com.getAmount() + md);
cart.setAmount(cart.getAmount() + md);
cart.setAmount(cart.getAmount() + com.getAmount());
}
}
}
......@@ -312,14 +312,15 @@ public class FullSharingService {
* 抽取满减的折扣金额 按货对应
* 小料和可选搭配
*/
public HashMap<String, Long> drawnFullDiscount(List<CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.SmallMaterial> materialDiscount,List<Integer> typeEnums,int type) {
public HashMap<String, Long> drawnFullDiscount(List<CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.SmallMaterial> materialDiscount, List<Integer> typeEnums, Integer type) {
HashMap<String, Long> hashMap = new HashMap<>();
if (CollectionUtils.isEmpty(materialDiscount)) return hashMap;
for (CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.SmallMaterial smallMaterial : materialDiscount) {
if (CollectionUtils.isEmpty(smallMaterial.getDiscounts())) continue;
if (CollectionUtils.isEmpty(smallMaterial.getDiscounts()) && !type.equals(smallMaterial.getType()))
continue;
for (CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.GoodsDiscount discount : smallMaterial.getDiscounts()) {
if (typeEnums.contains(discount.getType())) {
hashMap.put(discount.getGoodsId(),discount.getDiscount());
hashMap.put(discount.getGoodsId(), discount.getDiscount());
}
}
}
......
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