Authored by caoyan

尺码集合

... ... @@ -1976,19 +1976,18 @@ 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 = sizePoolDetailMapper.queryByBrandId(brandId);
if(!CollectionUtils.isEmpty(list)) {
List<SizePoolDetail> notIncludeList = sizePoolDetailMapper.queryByProductId(productId, 0, list.get(0).getSizePoolId());//不包括
if(!CollectionUtils.isEmpty(notIncludeList)) {
return resp;
}
}
if(CollectionUtils.isEmpty(list)) {
}else {
return resp;
}
}
List<Integer> poolIdList = list.stream().map(SizePoolDetail::getSizePoolId).collect(Collectors.toList());
SizePool pool = sizePoolMapper.querySizePoolByIds(poolIdList);
... ...