|
@@ -160,7 +160,7 @@ public class PromotionFactoryBase extends ServiceImpl<PromotionMapper, Promotion
|
|
|
//优惠价格
|
|
|
goods.set("priceOnsale", promotionGoods.get("priceOnsale"));
|
|
|
goods.set("promotion", promotion);
|
|
|
- goods.set("msg", goods.getString("msg") + "促销活动:特价;");
|
|
|
+ goods.set("msg", goods.getString("msg") + "促销活动【" + promotion.getId() + "】【" + promotion.getName() + "】:特价;");
|
|
|
//优惠活动
|
|
|
List<Object> promotionList1 = goods.getList("promotionList");
|
|
|
promotionList1.add(promotion);
|
|
@@ -207,7 +207,7 @@ public class PromotionFactoryBase extends ServiceImpl<PromotionMapper, Promotion
|
|
|
goods.set("priceOnsale", price);
|
|
|
goods.set("amount", scalar.multiply(goods.getBigDecimal("amount")).setScale(0, RoundingMode.CEILING).intValue());
|
|
|
goods.set("promotionType2", true);
|
|
|
- goods.set("msg", "促销活动:" + priceJson.getStr("scalar").replace("0.", "") + "折;");
|
|
|
+ goods.set("msg", "促销活动【" + promotion.getId() + "】【" + promotion.getName() + "】:" + priceJson.getStr("scalar").replace("0.", "") + "折;");
|
|
|
}
|
|
|
if (Objects.equals(promotion.getType(), PromotionTypeEnum.T_1.getCode())) {
|
|
|
//计算满减金额
|
|
@@ -268,7 +268,8 @@ public class PromotionFactoryBase extends ServiceImpl<PromotionMapper, Promotion
|
|
|
Integer priceOnsale = promotionPriceOnsale.subtract(new BigDecimal(goodsYh).divide(num, 2, BigDecimal.ROUND_HALF_UP)).intValue();
|
|
|
goods.set("priceOnsale", priceOnsale);
|
|
|
goods.set("amount", goods.getInt("amount") - goodsYh);
|
|
|
- goods.set("msg", goods.getString("msg") + "满减活动减:" + (goodsYh * 0.01) + "元;");
|
|
|
+ String goodsYhStr = new BigDecimal(goodsYh).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP) + "元;";
|
|
|
+ goods.set("msg", goods.getString("msg") + "满减活动【" + promotion.getId() + "】【" + promotion.getName() + "】减:" + goodsYhStr);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -278,4 +279,5 @@ public class PromotionFactoryBase extends ServiceImpl<PromotionMapper, Promotion
|
|
|
param.put("goodsList", goodsList);
|
|
|
return param;
|
|
|
}
|
|
|
+
|
|
|
}
|