Commit 40f28a76 by xiaoer.li@freemud.com

fix

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