Commit 40f28a76 by xiaoer.li@freemud.com

fix

parent aa39d0e3
......@@ -1855,7 +1855,6 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
public boolean grayPush(String partnerId, String storeId, String version) {
if (StringUtils.isBlank(sharing)) return false;
CalculateCenter center = JSON.parseObject(sharing, CalculateCenter.class);
Boolean enable = false;
if (!center.getEnable()) return false;
......@@ -1864,21 +1863,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
enable = true;
break;
case 1: {
if (StringUtils.isBlank(center.getPartnerId())) {
enable = false;
} else {
if (Arrays.asList(center.getPartnerId().split(",")).contains(partnerId)) {
enable = true;
} else {
enable = false;
}
if (Arrays.asList(center.getStoreId().split(",")).contains(storeId)) {
enable = true;
} else {
enable = false;
}
String real = partnerId.concat(storeId);
if (Arrays.asList(center.getGrayList().split(",")).contains(real)) {
enable = true;
}
break;
}
}
if (center.getEnable() && enable) {
......
......@@ -22,12 +22,7 @@ public class CalculateCenter {
/**
* 商户
*/
private String partnerId;
/**
* 门店
*/
private String storeId;
private String grayList;
/**
* 是否启用新的算价中心
......
......@@ -202,6 +202,7 @@ public class CalculationSharingDiscountService {
}
}
/**
* 实物商品
* @param calculationDiscountGoodsList
......@@ -213,7 +214,7 @@ public class CalculationSharingDiscountService {
calculationDiscountGoods.setGoodsId(cartGoods.getGoodsId());
calculationDiscountGoods.setCartGoodsUid(cartGoods.getCartGoodsUid());
calculationDiscountGoods.setGoodsQuantity(cartGoods.getQty());
calculationDiscountGoods.setOriginalPrice(cartGoods.getOriginalPrice());
calculationDiscountGoods.setOriginalPrice(cartGoods.getFinalPrice()!=null ? cartGoods.getFinalPrice() : cartGoods.getOriginalPrice());
calculationDiscountGoods.setMemberDiscount(cartGoods.getMemberDiscount());
calculationDiscountGoods.setSpuId(cartGoods.getSpuId());
//商品加料
......
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