...
|
...
|
@@ -1976,20 +1976,19 @@ public class ProductServiceImpl implements ProductService { |
|
|
@Override
|
|
|
public SizeImageResp getSizeImage(Integer productId, Integer brandId) {
|
|
|
SizeImageResp resp = new SizeImageResp();
|
|
|
List<SizePoolDetail> list = sizePoolDetailMapper.queryByBrandId(brandId);
|
|
|
List<SizePoolDetail> list = sizePoolDetailMapper.queryByProductId(productId, 1, null);//包括
|
|
|
if(CollectionUtils.isEmpty(list)) {
|
|
|
list = sizePoolDetailMapper.queryByProductId(productId, 1, null);//包括
|
|
|
}else {
|
|
|
List<SizePoolDetail> notIncludeList = sizePoolDetailMapper.queryByProductId(productId, 0, list.get(0).getSizePoolId());//不包括
|
|
|
if(!CollectionUtils.isEmpty(notIncludeList)) {
|
|
|
list = sizePoolDetailMapper.queryByBrandId(brandId);
|
|
|
if(!CollectionUtils.isEmpty(list)) {
|
|
|
List<SizePoolDetail> notIncludeList = sizePoolDetailMapper.queryByProductId(productId, 0, list.get(0).getSizePoolId());//不包括
|
|
|
if(!CollectionUtils.isEmpty(notIncludeList)) {
|
|
|
return resp;
|
|
|
}
|
|
|
}else {
|
|
|
return resp;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if(CollectionUtils.isEmpty(list)) {
|
|
|
return resp;
|
|
|
}
|
|
|
|
|
|
List<Integer> poolIdList = list.stream().map(SizePoolDetail::getSizePoolId).collect(Collectors.toList());
|
|
|
SizePool pool = sizePoolMapper.querySizePoolByIds(poolIdList);
|
|
|
if(null == pool) {
|
...
|
...
|
|