...
|
...
|
@@ -4,11 +4,10 @@ import java.math.BigDecimal; |
|
|
import java.util.*;
|
|
|
import java.util.function.BinaryOperator;
|
|
|
import java.util.function.Function;
|
|
|
import java.util.function.ToIntFunction;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.yoho.core.common.helpers.ImagesHelper;
|
|
|
import com.yohoufo.common.utils.UfoStringUtils;
|
|
|
import com.yohoufo.dal.product.*;
|
|
|
import com.yohoufo.dal.product.model.*;
|
|
|
import com.yohoufo.product.model.GoodsImageBO;
|
...
|
...
|
@@ -143,8 +142,21 @@ public class ProductServiceImpl implements ProductService{ |
|
|
public ProductSeriesTemplateResp querySortTemplateData(String skns) {
|
|
|
ProductSeriesTemplateResp resp = new ProductSeriesTemplateResp();
|
|
|
|
|
|
List<Integer> sknlist = UfoStringUtils.string2IntegerList(skns);
|
|
|
|
|
|
List<String> sknlist = Lists.newArrayList(skns.split(","));
|
|
|
if (!CollectionUtils.isEmpty(sknlist)) {
|
|
|
List<Product> products = productMapper.selectByIds(sknlist);
|
|
|
if (!CollectionUtils.isEmpty(products)) {
|
|
|
List<Integer> seriesIds = products.stream().map(Product::getSeriesId).filter(Objects::nonNull).collect(Collectors.toList());
|
|
|
if (!CollectionUtils.isEmpty(seriesIds)) {
|
|
|
List<BrandSeries> seriesList = brandSeriesMapper.selectByIds(seriesIds);
|
|
|
}
|
|
|
|
|
|
|
|
|
List<Goods> goodsList = goodsMapper.selectByProductIds(sknlist);
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return null;
|
|
|
}
|
...
|
...
|
@@ -316,7 +328,7 @@ public class ProductServiceImpl implements ProductService{ |
|
|
List<GoodsImages> goodsImages = goodsImagesMapper.selectByGoodsId(goodId);
|
|
|
List<GoodsImageBO> imageList = new ArrayList<>();
|
|
|
if (!CollectionUtils.isEmpty(goodsImages)) {
|
|
|
List<String> imageUrlList = goodsImages.stream().map(GoodsImages::getImageUrl).filter(StringUtils::isNotBlank).map(this::buildImageFullUrl).collect(Collectors.toList());
|
|
|
List<String> imageUrlList = goodsImages.stream().map(GoodsImages::getImageUrl).filter(StringUtils::isNotBlank).collect(Collectors.toList());
|
|
|
imageUrlList.forEach(e -> imageList.add(GoodsImageBO.create(e)));
|
|
|
}
|
|
|
goodsBO.setImageList(imageList);
|
...
|
...
|
|