Commit 4e754656 by ping.wu

限购数量为0判断修改

parent b94fa912
...@@ -2621,7 +2621,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -2621,7 +2621,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
qty += cartGoods.getQty(); qty += cartGoods.getQty();
} }
int limitCount = queryLimitCount(partnerId,appid); int limitCount = queryLimitCount(partnerId,appid);
if (qty > limitCount) { if (limitCount != 0 && qty > limitCount) {
throw new ServiceException(ResponseResult.SHOPPING_CART_LIMIT_ADD); throw new ServiceException(ResponseResult.SHOPPING_CART_LIMIT_ADD);
} }
return qty; return qty;
...@@ -2691,7 +2691,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -2691,7 +2691,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
} }
} }
int cartLimitCount = queryLimitCount(partnerId,appid); int cartLimitCount = queryLimitCount(partnerId,appid);
if (checkQty + sendQty > cartLimitCount) { if (cartLimitCount != 0 && checkQty + sendQty > cartLimitCount) {
assortmentSdkService.setShoppingCart(partnerId, storeId, userId, oldCartGoodsList, null, tableNumber, shoppingCartService); assortmentSdkService.setShoppingCart(partnerId, storeId, userId, oldCartGoodsList, null, tableNumber, shoppingCartService);
throw new ServiceException(ResponseResult.SHOPPING_CART_LIMIT_ADD); throw new ServiceException(ResponseResult.SHOPPING_CART_LIMIT_ADD);
} }
...@@ -2717,7 +2717,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -2717,7 +2717,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
} }
} }
} }
if (updateQty + sendQty > cartLimitCount) { if (cartLimitCount != 0 && updateQty + sendQty > cartLimitCount) {
assortmentSdkService.updateGoodsQtyBySdk(partnerId, userId, storeId, cartGoodsUid, goodsQty, "", shoppingCartBaseService); assortmentSdkService.updateGoodsQtyBySdk(partnerId, userId, storeId, cartGoodsUid, goodsQty, "", shoppingCartBaseService);
throw new ServiceException(ResponseResult.SHOPPING_CART_LIMIT_ADD); throw new ServiceException(ResponseResult.SHOPPING_CART_LIMIT_ADD);
} }
......
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