...
|
...
|
@@ -12,6 +12,8 @@ import com.alibaba.fastjson.JSONObject; |
|
|
import com.yoho.core.dal.datasource.annotation.Database;
|
|
|
import com.yoho.core.rest.client.ServiceCaller;
|
|
|
import com.yoho.ufo.event.model.StorageNumEvent;
|
|
|
import com.yoho.ufo.util.ImagesConstant;
|
|
|
import com.yoho.ufo.util.ImagesHelper;
|
|
|
import com.yohobuy.ufo.model.enums.InboxBusinessTypeEnum;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
...
|
...
|
@@ -140,7 +142,7 @@ public class ProductServiceImpl implements IProductService, ApplicationContextAw |
|
|
} else {
|
|
|
gi.setIsDefault("N");
|
|
|
}
|
|
|
gi.setImageUrl(image);
|
|
|
gi.setImageUrl(ImagesHelper.getImageRelativeUrl(image, ImagesConstant.BUCKET_GOODS_IMG));
|
|
|
gi.setOrderBy(i + 1);
|
|
|
goodsImagesList.add(gi);
|
|
|
}
|
...
|
...
|
@@ -167,7 +169,7 @@ public class ProductServiceImpl implements IProductService, ApplicationContextAw |
|
|
g.setId(bo.getGoodsId());
|
|
|
g.setIsDefault("Y");
|
|
|
if (CollectionUtils.isNotEmpty(bo.getImageUrlList())) {
|
|
|
g.setColorImage(bo.getImageUrlList().get(0));
|
|
|
g.setColorImage(ImagesHelper.getImageRelativeUrl(bo.getImageUrlList().get(0), ImagesConstant.BUCKET_GOODS_IMG));
|
|
|
}
|
|
|
return g;
|
|
|
}
|
...
|
...
|
@@ -281,7 +283,7 @@ public class ProductServiceImpl implements IProductService, ApplicationContextAw |
|
|
bo.setColorId(goods.getColorId());
|
|
|
}
|
|
|
if (CollectionUtils.isNotEmpty(goodsImages)) {
|
|
|
bo.setImageUrlList(CollectionUtil.map(goodsImages, GoodsImages::getImageUrl));
|
|
|
bo.setImageUrlList(CollectionUtil.map(goodsImages, item -> ImagesHelper.getImageAbsoluteUrl(item.getImageUrl(), ImagesConstant.BUCKET_GOODS_IMG)));
|
|
|
}
|
|
|
if (CollectionUtils.isNotEmpty(storages)) {
|
|
|
bo.setStorageIdList(CollectionUtil.map(storages, Storage::getId));
|
...
|
...
|
@@ -333,7 +335,7 @@ public static void main(String[] args) { |
|
|
// 图片
|
|
|
Goods goods = goodsMap.get(respBo.getId());
|
|
|
if (goods != null) {
|
|
|
respBo.setColorImage(goods.getColorImage());
|
|
|
respBo.setColorImage(ImagesHelper.getImageAbsoluteUrl(goods.getColorImage(), ImagesConstant.BUCKET_GOODS_IMG));
|
|
|
}
|
|
|
// 分类
|
|
|
ProductSort maxSort = productSortMap.get(respBo.getMaxSortId());
|
...
|
...
|
|