...
|
...
|
@@ -18,19 +18,6 @@ import java.util.function.BinaryOperator; |
|
|
import java.util.function.Function;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
|
import com.yohobuy.ufo.model.request.product.ProductRequestBo;
|
|
|
import com.yohobuy.ufo.model.response.StorageCheckResp;
|
|
|
import com.yohobuy.ufo.model.response.store.StoreInfoBo;
|
|
|
import com.yohoufo.common.ApiResponse;
|
|
|
import com.yohoufo.common.constant.BusinessClientEnum;
|
|
|
import com.yohoufo.common.exception.UfoServiceException;
|
|
|
import com.yohoufo.common.utils.OrikaUtils;
|
|
|
import com.yohoufo.dal.product.*;
|
|
|
import com.yohoufo.dal.product.model.*;
|
|
|
import com.yohoufo.product.service.cache.BrandCacheService;
|
|
|
import com.yohoufo.product.service.cache.SizeCacheService;
|
|
|
import org.apache.commons.collections.MapUtils;
|
|
|
import org.apache.commons.lang.ArrayUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
...
|
...
|
@@ -63,6 +50,7 @@ import com.yohobuy.ufo.model.request.StoragePriceBo; |
|
|
import com.yohobuy.ufo.model.request.product.PriceTrendBO;
|
|
|
import com.yohobuy.ufo.model.request.product.ProductRequestBo;
|
|
|
import com.yohobuy.ufo.model.response.ProductDetailResp;
|
|
|
import com.yohobuy.ufo.model.response.SizeImageResp;
|
|
|
import com.yohobuy.ufo.model.response.StorageCheckResp;
|
|
|
import com.yohobuy.ufo.model.response.StorageDataResp;
|
|
|
import com.yohobuy.ufo.model.response.StorageInfoResp;
|
...
|
...
|
@@ -131,6 +119,8 @@ import com.yohoufo.product.response.SkupDetailForScreenResp; |
|
|
import com.yohoufo.product.response.StorageLeastPriceResp;
|
|
|
import com.yohoufo.product.service.ProductSearchService;
|
|
|
import com.yohoufo.product.service.ProductService;
|
|
|
import com.yohoufo.product.service.cache.BrandCacheService;
|
|
|
import com.yohoufo.product.service.cache.SizeCacheService;
|
|
|
|
|
|
|
|
|
@Service
|
...
|
...
|
@@ -1984,23 +1974,28 @@ public class ProductServiceImpl implements ProductService { |
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public String getSizeImage(Integer productId, Integer brandId) {
|
|
|
public SizeImageResp getSizeImage(Integer productId, Integer brandId) {
|
|
|
SizeImageResp resp = new SizeImageResp();
|
|
|
List<SizePoolDetail> list = sizePoolDetailMapper.queryByProductId(productId);
|
|
|
if(CollectionUtils.isEmpty(list)) {
|
|
|
list = sizePoolDetailMapper.queryByBrandId(brandId);
|
|
|
}
|
|
|
|
|
|
if(CollectionUtils.isEmpty(list)) {
|
|
|
return StringUtils.EMPTY;
|
|
|
return resp;
|
|
|
}
|
|
|
|
|
|
List<Integer> poolIdList = list.stream().map(SizePoolDetail::getSizePoolId).collect(Collectors.toList());
|
|
|
SizePool pool = sizePoolMapper.querySizePoolByIds(poolIdList);
|
|
|
if(null == pool) {
|
|
|
return StringUtils.EMPTY;
|
|
|
return resp;
|
|
|
}
|
|
|
|
|
|
return pool.getImageUrl();
|
|
|
resp.setImageUrl(pool.getImageUrl());
|
|
|
resp.setImageWidth(pool.getImageWidth());
|
|
|
resp.setImageHeight(pool.getImageHeight());
|
|
|
|
|
|
return resp;
|
|
|
}
|
|
|
|
|
|
private List<Integer> buildSizeIdList(String[] sizeIdArr){
|
...
|
...
|
|