...
|
...
|
@@ -49,32 +49,20 @@ public class DepositServiceImpl implements DepositService { |
|
|
}
|
|
|
List<Integer> productIdList = storageDepositMapper.queryUserDepositProductId(uid, (page - 1) * limit, limit);
|
|
|
List<StorageDepositCount> countInfoList = storageDepositMapper.queryUserDepositProduct(uid, productIdList);
|
|
|
/*// 商品名称
|
|
|
List<Product> productList = productMapper.selectByIds(productIdList);
|
|
|
// 颜色
|
|
|
List<Goods> goodsList = goodsMapper.selectByProductIds(productIdList);
|
|
|
// 图片
|
|
|
List<GoodsImages> goodsImagesList = goodsImagesMapper.selectByGoodsIdList(goodsList.stream().map(Goods::getId).collect(Collectors.toList()));
|
|
|
List<Integer> skupList = countInfoList.stream().map(StorageDepositCount::getSkup).collect(Collectors.toList());
|
|
|
List<SellerOrderGoods> goodsList = sellerOrderGoodsMapper.selectBySkups(skupList);
|
|
|
Map<Integer, StorageDepositCount> countInfoMap = countInfoList.stream().map(Function.identity()).collect(Collectors.toMap(StorageDepositCount::getProductId, Function.identity()));
|
|
|
Map<Integer, Product> productMap = productList.stream().map(Function.identity()).collect(Collectors.toMap(Product::getId, Function.identity()));
|
|
|
Map<Integer, Goods> goodsMap = goodsList.stream().map(Function.identity()).collect(Collectors.toMap(Goods::getProductId, Function.identity()));
|
|
|
Map<Integer, GoodsImages> goodsImagesMap = goodsImagesList.stream().map(Function.identity()).collect(Collectors.toMap(GoodsImages::getProductId, Function.identity()));
|
|
|
Map<Integer, SellerOrderGoods> goodsMap = goodsList.stream().map(Function.identity()).collect(Collectors.toMap(SellerOrderGoods::getProductId, Function.identity()));
|
|
|
|
|
|
List<DepositProductBo> result = new ArrayList<>();
|
|
|
for (Integer productId : productIdList) {
|
|
|
DepositProductBo bo = new DepositProductBo();
|
|
|
bo.setProductId(productId);
|
|
|
Product p = productMap.get(productId);
|
|
|
if (p != null) {
|
|
|
bo.setProductName(p.getProductName());
|
|
|
}
|
|
|
Goods g = goodsMap.get(productId);
|
|
|
if (g != null) {
|
|
|
bo.setColorName(StringUtils.isBlank(g.getGoodsName()) ? g.getColorName() : g.getGoodsName());
|
|
|
}
|
|
|
GoodsImages gi = goodsImagesMap.get(productId);
|
|
|
if (gi != null) {
|
|
|
bo.setPic(ImageUrlAssist.getAllProductPicUrl(gi.getImageUrl(), "goodsimg", "center", "d2hpdGU="));
|
|
|
SellerOrderGoods goods = goodsMap.get(productId);
|
|
|
if (goods != null) {
|
|
|
bo.setProductName(goods.getProductName());
|
|
|
bo.setColorName(goods.getColorName());
|
|
|
bo.setPic(goods.getImageUrl());
|
|
|
}
|
|
|
StorageDepositCount countInfo = countInfoMap.get(productId);
|
|
|
if (countInfo != null) {
|
...
|
...
|
@@ -83,7 +71,7 @@ public class DepositServiceImpl implements DepositService { |
|
|
bo.setShelfStatus(countInfo.getStorageIdCount() == 0 ? "全部已上架" : ("有" + countInfo.getStorageIdCount() + "件未上架"));
|
|
|
}
|
|
|
result.add(bo);
|
|
|
}*/
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
|
...
|
...
|
|