Authored by chenjian

Merge branch 'dev-offline-buy' into test6.8.5

... ... @@ -26,6 +26,9 @@ public class SkupInfo {
@JSONField(name = "color_name")
private String colorName;
@JSONField(name = "size_name")
private String sizeName;
@JSONField(name = "image_list")
private List<String> imageList;
... ...
... ... @@ -14,6 +14,7 @@ import java.util.function.BinaryOperator;
import java.util.function.Function;
import java.util.stream.Collectors;
import com.yohoufo.common.helper.ImageUrlAssist;
import com.yohoufo.product.model.*;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
... ... @@ -806,12 +807,16 @@ public class ProductServiceImpl implements ProductService{
List<GoodsImages> goodsImages = goodsImagesMapper.selectByGoodsId(goods.getId());
List<String> imageList = CollectionUtils.isEmpty(goodsImages) ? Lists.newArrayList()
: goodsImages.stream().map(GoodsImages::getImageUrl).filter(StringUtils::isNotBlank).collect(Collectors.toList());
: goodsImages.stream().map(GoodsImages::getImageUrl).filter(StringUtils::isNotBlank)
.map(i -> ImageUrlAssist.getAllProductPicUrl(i, "goodsimg", "center", "d2hpdGU="))
.collect(Collectors.toList());
Brand brand = product.getBrandId() == null ? null : brandMapper.selectByPrimaryKey(product.getBrandId());
BrandSeries brandSeries = product.getSeriesId() == null ? null : brandSeriesMapper.selectByPrimaryKey(product.getSeriesId());
Size size = storage.getSizeId() == null ? null : sizeMapper.selectByPrimaryKey(storage.getSizeId());
Pair<Integer, String> skupStatusPair = product.getShelveStatus() == 1 ? getSkupStatus(skupDo.getStatus()) : getSkupStatus(0);
return SkupInfo.builder()
... ... @@ -823,6 +828,7 @@ public class ProductServiceImpl implements ProductService{
.saleTime((product.getSaleTime() == null || product.getSaleTime().equals(0)) ? "0" : DateUtil.getDateString(product.getSaleTime(), DateUtil.YYYY_MM_DD_DOT))
.colorName(goods.getColorName())
.imageList(imageList)
.sizeName(size == null ? "" : size.getSizeName())
.skup(skup)
.price(skupDo.getPrice())
.status(skupStatusPair.getLeft())
... ...