Commit 999cff3e by 周晓航

Merge branch 'ka-商品技术需求购物车不校验商品库存' into develop

parents bbbc0033 9c1fb75a
...@@ -199,7 +199,7 @@ public class EvaluationServiceImpl implements EvaluationService { ...@@ -199,7 +199,7 @@ public class EvaluationServiceImpl implements EvaluationService {
getEvaluationsByOrderIdReq.setPartnerId(request.getPartnerId()); getEvaluationsByOrderIdReq.setPartnerId(request.getPartnerId());
OrderBaseResp<GetEvaluationsByOrderIdResultDto> evaluationsByOrderId = orderSdkService.getEvaluationsByOrderId(getEvaluationsByOrderIdReq, LogThreadLocal.getTrackingNo()); OrderBaseResp<GetEvaluationsByOrderIdResultDto> evaluationsByOrderId = orderSdkService.getEvaluationsByOrderId(getEvaluationsByOrderIdReq, LogThreadLocal.getTrackingNo());
CheckAndJoinResponse checkAndJoinMsg; CheckAndJoinResponse checkAndJoinMsg;
if (evaluationsByOrderId != null && evaluationsByOrderId.getResult() != null && evaluationsByOrderId.getResult().getOrderEvaluations().size() > 0) { if (evaluationsByOrderId != null && evaluationsByOrderId.getResult() != null && CollectionUtils.isNotEmpty(evaluationsByOrderId.getResult().getOrderEvaluations())) {
// 获取 评价有礼活动 // 获取 评价有礼活动
GetOrderEvaluationDto assortmentOrderEvaluation = evaluationsByOrderId.getResult().getOrderEvaluations().get(0); GetOrderEvaluationDto assortmentOrderEvaluation = evaluationsByOrderId.getResult().getOrderEvaluations().get(0);
checkAndJoinMsg = getCheckAndJoinMsg(orderDetailResponse.getResult(), request.getSessionId(), assortmentOrderEvaluation.getOrderId(), assortmentOrderEvaluation.getActivityId()); checkAndJoinMsg = getCheckAndJoinMsg(orderDetailResponse.getResult(), request.getSessionId(), assortmentOrderEvaluation.getOrderId(), assortmentOrderEvaluation.getActivityId());
......
...@@ -1309,8 +1309,8 @@ public class PayServiceImpl { ...@@ -1309,8 +1309,8 @@ public class PayServiceImpl {
return plugInParameter; return plugInParameter;
} }
String applyMchid = assortmentOpenPlatformPartnerPaymentAuth.getSp_mchid(); String applyMchid = openPlatformPartnerPaymentConfigs.get(0).getSubMchid();
String signMchid = openPlatformPartnerPaymentConfigs.get(0).getSubMchid(); String signMchid = assortmentOpenPlatformPartnerPaymentAuth.getSp_mchid();
String thirdStoreId = assortmentOpenPlatformPaymentStore.getThirdStoreId(); String thirdStoreId = assortmentOpenPlatformPaymentStore.getThirdStoreId();
plugInParameter.setApplyMchid(applyMchid); plugInParameter.setApplyMchid(applyMchid);
plugInParameter.setSignMchid(signMchid); plugInParameter.setSignMchid(signMchid);
......
...@@ -2372,11 +2372,14 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -2372,11 +2372,14 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
requestDto.setStoreId(addShoppingCartGoodsRequestVo.getShopId()); requestDto.setStoreId(addShoppingCartGoodsRequestVo.getShopId());
requestDto.setProductIds(productIds); requestDto.setProductIds(productIds);
GetProductStockResponseDto availableStocks = stockClient.getAvailableStocks(requestDto); GetProductStockResponseDto availableStocks = stockClient.getAvailableStocks(requestDto);
if (availableStocks == null || !ResponseCodeConstant.RESPONSE_SUCCESS_STR.equals(availableStocks.getCode())) { // 商品服务 返回null 或者 qty=null 表示不限制库存
if (Objects.isNull(availableStocks) || Objects.isNull(availableStocks.getResult().get(0).getQty())) {
return;
}
if (!ResponseCodeConstant.RESPONSE_SUCCESS_STR.equals(availableStocks.getCode())) {
throw new ServiceException(ResponseResult.SHOPPING_CART_STOCK_NOT_HAVE); throw new ServiceException(ResponseResult.SHOPPING_CART_STOCK_NOT_HAVE);
} }
int stock = CollectionUtils.isEmpty(availableStocks.getResult()) || availableStocks.getResult().get(0).getQty() == null ? 0 : int stock = availableStocks.getResult().get(0).getQty();
availableStocks.getResult().get(0).getQty();
if (stock <= 0) { if (stock <= 0) {
throw new ServiceException(ResponseResult.SHOPPING_CART_STOCK_NOT_HAVE); throw new ServiceException(ResponseResult.SHOPPING_CART_STOCK_NOT_HAVE);
} else if (stock < qty) { } else if (stock < qty) {
......
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