Authored by zhaojun2

add 促销优先级

... ... @@ -696,6 +696,9 @@
},
"endTime": {
"type": "long"
},
"priority": {
"type": "integer"
}
}
},
... ...
... ... @@ -103,6 +103,7 @@ public class PromotionConditionLogicService {
if (!promotionTypeMap.isEmpty() && promotionCond.getShowStatus() == 1) {
matchedPromotion.put("name", promotionTypeMap.get(promotionCond.getPromotionType()));
}
matchedPromotion.put("priority", promotionCond.getPriority());
return matchedPromotion;
}).collect(Collectors.toList());
productIndexBO.setMatchedPromotions(matchedPromotions);
... ... @@ -147,6 +148,7 @@ public class PromotionConditionLogicService {
promotionCond.setPromotionType(promotionParams.getPromotionType());
promotionCond.setStartTime(promotionInfo.getStartTime());
promotionCond.setEndTime(promotionInfo.getEndTime());
promotionCond.setPriority(promotionInfo.getPriority());
JSONObject conditionParamJSONObj = JSONObject.parseObject(promotionParams.getConditionParam());
Assert.notEmpty(conditionParamJSONObj, "conditionParamJSONObj cannot be empty");
promotionCond.setAggregator(PromotionCond.Aggregator.from(conditionParamJSONObj.getString("aggregator")));
... ...