Authored by mali

寄存列表兼容

... ... @@ -2,6 +2,7 @@ package com.yohoufo.order.service.impl;
import com.google.common.base.Throwables;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.yoho.core.dal.datasource.annotation.Database;
import com.yohobuy.ufo.model.order.bo.ButtonShowBo;
import com.yohobuy.ufo.model.order.bo.DepositDetailBo;
... ... @@ -610,9 +611,15 @@ public class DepositServiceImpl implements DepositService {
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().filter(item -> DepositSourceEnum.SOURCE_BUYER.getCode().equals(item.getSource()))
.map(StorageDeposit::getOrderCode).collect(Collectors.toList()), null);
Map<Long, BuyerOrder> buyerGoodsMap = buyerGoodsList.stream().map(Function.identity()).collect(Collectors.toMap(BuyerOrder::getOrderCode, Function.identity()));
List<Long> collect = depositList.stream().filter(item -> DepositSourceEnum.SOURCE_BUYER.getCode().equals(item.getSource()))
.map(StorageDeposit::getOrderCode).collect(Collectors.toList());
Map<Long, BuyerOrder> buyerGoodsMap;
if (CollectionUtils.isEmpty(collect)) {
buyerGoodsMap= Maps.newHashMap();
} else {
List<BuyerOrder> buyerGoodsList = buyerOrderMapper.selectByOrderCodes(collect, null);
buyerGoodsMap = buyerGoodsList.stream().map(Function.identity()).collect(Collectors.toMap(BuyerOrder::getOrderCode, Function.identity()));
}
Map<Integer, BigDecimal> leastMap = productProxyService.getFlashLeastPrice(userDopositReq.getProductId()); // 最低价信息
List result = new ArrayList<>();
... ...