...
|
...
|
@@ -103,12 +103,6 @@ public class PromotionPriceService { |
|
|
//3、循环skn的促销列表,计算促销价格
|
|
|
for (PromotionIndexBO promotionIndexBO : sortedPromotionIndexBos) {
|
|
|
|
|
|
//不是这三种类型之一的直接跳过
|
|
|
Map<String, String> promotionTag = promotionTagMap.get(promotionIndexBO.getId());
|
|
|
if (!"Discount".equals(promotionTag.get("type")) && !"Cashreduce".equals(promotionTag.get("type")) && !"Degressdiscount".equals(promotionTag.get("type"))) {
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
//和上一个满足的促销互斥的话直接跳过
|
|
|
boolean isPromotionReject = this.isPromotionReject(lastPromotionRejectParam, promotionIndexBO.getId().toString());
|
|
|
if (isPromotionReject) {
|
...
|
...
|
@@ -127,17 +121,20 @@ public class PromotionPriceService { |
|
|
if (actionParamJson == null) {
|
|
|
continue;
|
|
|
}
|
|
|
isPromotionPriceActive = true;
|
|
|
lastPromotionRejectParam = promotionIndexBO.getRejectParam();
|
|
|
Map<String, String> promotionTag = promotionTagMap.get(promotionIndexBO.getId());
|
|
|
if ("Discount".equals(promotionTag.get("type"))) {
|
|
|
isPromotionPriceActive = true;
|
|
|
Double discount = Double.valueOf(actionParamJson.get("discount").toString());
|
|
|
currentSalesPrice = currentSalesPrice * discount;
|
|
|
}
|
|
|
if ("Cashreduce".equals(promotionTag.get("type"))) {
|
|
|
isPromotionPriceActive = true;
|
|
|
Double reduce = Double.valueOf(actionParamJson.get("reduce").toString());
|
|
|
currentSalesPrice = currentSalesPrice - reduce;
|
|
|
}
|
|
|
if ("Degressdiscount".equals(promotionTag.get("type"))) {
|
|
|
isPromotionPriceActive = true;
|
|
|
Double discount = this.countDegreeDiscount(actionParamJson);
|
|
|
if (discount == null) {
|
|
|
continue;
|
...
|
...
|
|