Authored by wangnan

fix

... ... @@ -117,7 +117,7 @@ public class PromotionPriceService {
}
if ("Discount".equals(promotionTag.get("type"))) {
Double discount = Double.valueOf(actionParamJson.get("discount").toString());
if (discount == null) {
if (discount == null||currentSalesPrice==null) {
continue;
}
currentSalesPrice = currentSalesPrice * discount;
... ... @@ -125,7 +125,7 @@ public class PromotionPriceService {
}
if ("Cashreduce".equals(promotionTag.get("type"))) {
Double reduce = Double.valueOf(actionParamJson.get("reduce").toString());
if (reduce == null) {
if (reduce == null||currentSalesPrice==null) {
continue;
}
currentSalesPrice = currentSalesPrice - reduce;
... ... @@ -195,7 +195,7 @@ public class PromotionPriceService {
private Double countDegressdiscountPrice(JSONObject actionParamJson, Double salesPrice) {
Double tempPrice = null;
if (actionParamJson.get("degress_discount_list") == null) {
if (actionParamJson.get("degress_discount_list") == null||salesPrice==null) {
return tempPrice;
}
String degressDiscountList = actionParamJson.get("degress_discount_list").toString();
... ...