Authored by qinchao

二手图片存的是相对路径

package com.yohoufo.product.service.impl;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import com.google.common.collect.Lists;
import com.yohobuy.ufo.model.request.StoragePriceBo;
import com.yohobuy.ufo.model.request.product.SecondhandImagesBo;
import com.yohobuy.ufo.model.resp.product.SecondDetailResp;
import com.yohobuy.ufo.model.resp.product.SkupImageInfo;
import com.yohoufo.common.helper.ImageUrlAssist;
import com.yohoufo.dal.product.SecondhandFlawMapper;
import com.yohoufo.dal.product.SecondhandImagesMapper;
import com.yohoufo.dal.product.SecondhandInfoMapper;
import com.yohoufo.dal.product.model.SecondhandFlaw;
import com.yohoufo.dal.product.model.SecondhandImages;
import com.yohoufo.dal.product.model.SecondhandInfo;
import com.yohoufo.product.service.ProductService;
import com.yohoufo.product.service.SecondhandProductService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
... ... @@ -16,15 +22,9 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.google.common.collect.Lists;
import com.yohobuy.ufo.model.request.product.SecondhandImagesBo;
import com.yohoufo.dal.product.SecondhandFlawMapper;
import com.yohoufo.dal.product.SecondhandImagesMapper;
import com.yohoufo.dal.product.SecondhandInfoMapper;
import com.yohoufo.dal.product.model.SecondhandFlaw;
import com.yohoufo.dal.product.model.SecondhandImages;
import com.yohoufo.dal.product.model.SecondhandInfo;
import com.yohoufo.product.service.SecondhandProductService;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@Service
... ... @@ -103,7 +103,8 @@ public class SecondhandProductServiceImpl implements SecondhandProductService {
List<SkupImageInfo> infos = new ArrayList<>();
if(CollectionUtils.isNotEmpty(imageList)){
imageList.stream().forEach(item ->
infos.add(new SkupImageInfo(item.getImageUrl(), ""))
//二手图片存的是相对路径
infos.add(new SkupImageInfo(ImageUrlAssist.getImageAbsoluteUrl(item.getImageUrl(), "goodsimg"), ""))
);
}
resp.setImageInfoList(infos);
... ...