Showing
1 changed file
with
8 additions
and
9 deletions
@@ -1976,20 +1976,19 @@ public class ProductServiceImpl implements ProductService { | @@ -1976,20 +1976,19 @@ public class ProductServiceImpl implements ProductService { | ||
1976 | @Override | 1976 | @Override |
1977 | public SizeImageResp getSizeImage(Integer productId, Integer brandId) { | 1977 | public SizeImageResp getSizeImage(Integer productId, Integer brandId) { |
1978 | SizeImageResp resp = new SizeImageResp(); | 1978 | SizeImageResp resp = new SizeImageResp(); |
1979 | - List<SizePoolDetail> list = sizePoolDetailMapper.queryByBrandId(brandId); | 1979 | + List<SizePoolDetail> list = sizePoolDetailMapper.queryByProductId(productId, 1, null);//包括 |
1980 | if(CollectionUtils.isEmpty(list)) { | 1980 | if(CollectionUtils.isEmpty(list)) { |
1981 | - list = sizePoolDetailMapper.queryByProductId(productId, 1, null);//包括 | ||
1982 | - }else { | ||
1983 | - List<SizePoolDetail> notIncludeList = sizePoolDetailMapper.queryByProductId(productId, 0, list.get(0).getSizePoolId());//不包括 | ||
1984 | - if(!CollectionUtils.isEmpty(notIncludeList)) { | 1981 | + list = sizePoolDetailMapper.queryByBrandId(brandId); |
1982 | + if(!CollectionUtils.isEmpty(list)) { | ||
1983 | + List<SizePoolDetail> notIncludeList = sizePoolDetailMapper.queryByProductId(productId, 0, list.get(0).getSizePoolId());//不包括 | ||
1984 | + if(!CollectionUtils.isEmpty(notIncludeList)) { | ||
1985 | + return resp; | ||
1986 | + } | ||
1987 | + }else { | ||
1985 | return resp; | 1988 | return resp; |
1986 | } | 1989 | } |
1987 | } | 1990 | } |
1988 | 1991 | ||
1989 | - if(CollectionUtils.isEmpty(list)) { | ||
1990 | - return resp; | ||
1991 | - } | ||
1992 | - | ||
1993 | List<Integer> poolIdList = list.stream().map(SizePoolDetail::getSizePoolId).collect(Collectors.toList()); | 1992 | List<Integer> poolIdList = list.stream().map(SizePoolDetail::getSizePoolId).collect(Collectors.toList()); |
1994 | SizePool pool = sizePoolMapper.querySizePoolByIds(poolIdList); | 1993 | SizePool pool = sizePoolMapper.querySizePoolByIds(poolIdList); |
1995 | if(null == pool) { | 1994 | if(null == pool) { |
-
Please register or login to post a comment