...
|
...
|
@@ -90,7 +90,7 @@ public class ChangePricePrepareProcessor { |
|
|
//若needChangePriceSkupList中有skup出现不存在于skupOfSalingMap keys中,说明该skup走到了其他状态中
|
|
|
Map<Integer, SkupDto> skupMap = checkNeedProcessSkups(needChangePriceSkupList,skupOfSalingMap);
|
|
|
//
|
|
|
SkupDto sampleSkupDto = skupMap.get(0);
|
|
|
SkupDto sampleSkupDto = skupMap.values().iterator().next();
|
|
|
int sampleSkup = sampleSkupDto.getSkup();
|
|
|
SellerOrderGoods sampleSog = sampleSkupDto.getSellerOrderGoods();
|
|
|
SellerOrder sellerOrder = sellerOrderMapper.selectBySkup(sampleSkup);
|
...
|
...
|
@@ -157,6 +157,10 @@ public class ChangePricePrepareProcessor { |
|
|
SellerOrderGoods condition = new SellerOrderGoods();
|
|
|
condition.setBatchNo(batchNo);
|
|
|
List<SellerOrderGoods> sellerOrderGoodList = sellerOrderGoodsMapper.selectByBatchNo(condition, Arrays.asList(SkupStatus.CAN_SELL.getCode(), SkupStatus.SELL_OUT.getCode()));
|
|
|
if (CollectionUtils.isEmpty(sellerOrderGoodList)){
|
|
|
logger.warn("ChangePrice checkAndAcquire not find skups by batchNo, req {}", req);
|
|
|
throw new UfoServiceException(501, "商品不能变价");
|
|
|
}
|
|
|
List<Integer> skups = sellerOrderGoodList.parallelStream().map(SellerOrderGoods::getId).collect(Collectors.toList());
|
|
|
logger.info("batch change price checkExistWaitingBuyerPay req {} skups {}", req, skups);
|
|
|
List<BuyerOrderGoods> buyerOrderGoodsList = buyerOrderGoodsMapper.selectBySkups(skups);
|
...
|
...
|
@@ -167,7 +171,8 @@ public class ChangePricePrepareProcessor { |
|
|
buyerOrderList = buyerOrderMapper.selectByOrderCodes(orderCodeList, Arrays.asList(OrderStatus.WAITING_PAY.getCode()));
|
|
|
}
|
|
|
if (CollectionUtils.isNotEmpty(buyerOrderList)){
|
|
|
logger.warn("ChangePrice checkAndAcquire storageId illegal , req {}", req);
|
|
|
List<Long> waitingPayOrderCodes = buyerOrderList.parallelStream().map(BuyerOrder::getOrderCode).collect(Collectors.toList());
|
|
|
logger.warn("ChangePrice checkAndAcquire exist waiting pay skup , req {} waitingPayOrderCodes {}", req, waitingPayOrderCodes);
|
|
|
throw new UfoServiceException(400, "部分商品正在等待买家支付");
|
|
|
}
|
|
|
return sellerOrderGoodList.parallelStream().collect(Collectors.toMap(SellerOrderGoods::getId,
|
...
|
...
|
|