Authored by TANLING

Merge branch 'test6.9.22' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.22

... ... @@ -1019,7 +1019,7 @@ public class ProductController {
@IgnoreSession
@Cachable(expire = 300)
public ApiResponse getSizeImage(@RequestParam(value = "product_id") Integer productId,
@RequestParam(value = "brand_id") Integer brandId) {
@RequestParam(value = "brand_id", required = false) Integer brandId) {
LOG.info("in method=ufo.product.sizeImage product_id is {}, brandId is {}", productId, brandId);
SizeImageResp result = productService.getSizeImage(productId, brandId);
return new ApiResponse.ApiResponseBuilder().code(200).data(result).message("getSizeImage success").build();
... ...
... ... @@ -1984,7 +1984,11 @@ public class ProductServiceImpl implements ProductService {
SizeImageResp resp = new SizeImageResp();
List<SizePoolDetail> list = sizePoolDetailMapper.queryByProductId(productId, 1, null);//包括
if(CollectionUtils.isEmpty(list)) {
list = sizePoolDetailMapper.queryByBrandId(brandId);
if (null == brandId) {
Product product = productHelpService.selectByIdCache(productId);
brandId = null == product ? null : product.getBrandId();
}
list = sizePoolDetailMapper.queryByBrandId(brandId);
if(!CollectionUtils.isEmpty(list)) {
List<SizePoolDetail> notIncludeList = sizePoolDetailMapper.queryByProductId(productId, 0, list.get(0).getSizePoolId());//不包括
if(!CollectionUtils.isEmpty(notIncludeList)) {
... ...