Authored by Lixiaodi

bug修改

... ... @@ -161,6 +161,9 @@ public class DepositServiceImpl implements DepositService {
List<Integer> skupList = depositList.stream().map(StorageDeposit::getSkup).collect(Collectors.toList());
List<SellerOrderGoods> goodsList = sellerOrderGoodsMapper.selectBySkups(skupList);
Map<Integer, SellerOrderGoods> goodsMap = goodsList.stream().map(Function.identity()).collect(Collectors.toMap(SellerOrderGoods::getId, Function.identity()));
List<BuyerOrder> buyerGoodsList = buyerOrderMapper.selectByOrderCodes(depositList.stream().map(StorageDeposit::getOrderCode).collect(Collectors.toList()), null);
Map<Long, BuyerOrder> buyerGoodsMap = buyerGoodsList.stream().map(Function.identity()).collect(Collectors.toMap(BuyerOrder::getOrderCode, Function.identity()));
// 最低价信息
Map<Integer, BigDecimal> leastMap = productProxyService.getFlashLeastPrice(productId);
List<DepositDetailBo> result = new ArrayList<>();
... ... @@ -172,7 +175,10 @@ public class DepositServiceImpl implements DepositService {
bo.setProductName(goods.getProductName());
bo.setColorName(goods.getColorName());
bo.setPic(ImageUrlAssist.getAllProductPicUrl(goods.getImageUrl(), "goodsimg", "center", "d2hpdGU="));
bo.setPrice(goods.getGoodsPrice().toString());
BuyerOrder buyerOrder = buyerGoodsMap.get(buyerGoodsMap.get(depo.getOrderCode()));
if (buyerOrder != null) {
bo.setPrice(buyerOrder.getAmount().toString());
}
bo.setSizeName(goods.getSizeName());
bo.setOrderStatusName(getOrderStatusName(depo.getOrderStatus()));
bo.setRemainDays(Integer.toString(getRemainDay(depo.getDepositEndTime())));
... ...