Commit 78d734a2 by xiaoer.li@freemud.com

Merge remote-tracking branch 'remotes/origin/fix_集点不参与积分同享' into qa

parents 73fab196 be20d9db
...@@ -97,7 +97,7 @@ public class CustomerScoreService implements IPromotionService { ...@@ -97,7 +97,7 @@ public class CustomerScoreService implements IPromotionService {
//积分抵扣开关禁用 有换购活动 且选中了换购商品 //积分抵扣开关禁用 有换购活动 且选中了换购商品
// - 有换购且选中了换购商品 // - 有换购且选中了换购商品
// - 有换购且没有选中换购商品 且除集点以外还有其他促销 // - 有换购且没有选中换购商品 且除集点以外还有其他促销
if (type81 == 0 if ((type81 == 0 && discountCount >= 1)
|| (type81 == 1 && !CollectionUtils.isEmpty(shoppingCartInfoRequestVo.getSendGoods())) || (type81 == 1 && !CollectionUtils.isEmpty(shoppingCartInfoRequestVo.getSendGoods()))
|| (type81 == 1 && discountCount > 1)) { || (type81 == 1 && discountCount > 1)) {
customerScoreVo.setScoreReduceState(5); customerScoreVo.setScoreReduceState(5);
......
...@@ -414,7 +414,8 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -414,7 +414,8 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
requestDto.setProductIds(Collections.singletonList(Long.parseLong(cartGoods.getGoodsId()))); requestDto.setProductIds(Collections.singletonList(Long.parseLong(cartGoods.getGoodsId())));
GetProductStockResponseDto availableStocks = stockClient.getAvailableStocks(requestDto); GetProductStockResponseDto availableStocks = stockClient.getAvailableStocks(requestDto);
if ((availableStocks != null) && (ResponseCodeConstant.RESPONSE_SUCCESS_STR.equals(availableStocks.getCode()))) { if ((availableStocks != null) && (ResponseCodeConstant.RESPONSE_SUCCESS_STR.equals(availableStocks.getCode()))) {
if ((CollectionUtils.isEmpty(availableStocks.getResult())) || (qty > availableStocks.getResult().get(0).getQty())) { if ((CollectionUtils.isEmpty(availableStocks.getResult())) || (availableStocks.getResult().get(0).getQty() != null &&
qty > availableStocks.getResult().get(0).getQty())) {
Integer stock = 0; Integer stock = 0;
if (!CollectionUtils.isEmpty(availableStocks.getResult()) && (stock = availableStocks.getResult().get(0).getQty()) > 0) { if (!CollectionUtils.isEmpty(availableStocks.getResult()) && (stock = availableStocks.getResult().get(0).getQty()) > 0) {
throw new BizServiceException(ResponseResult.SHOPPING_CART_STOCK_NOT_HAVE, "仅剩" + stock + "件库存了"); throw new BizServiceException(ResponseResult.SHOPPING_CART_STOCK_NOT_HAVE, "仅剩" + stock + "件库存了");
......
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