Authored by zhaojun2

bug fix

@@ -39,8 +39,8 @@ @@ -39,8 +39,8 @@
39 select id, goods_id, product_id, is_default, image_url, order_by 39 select id, goods_id, product_id, is_default, image_url, order_by
40 from goods_images 40 from goods_images
41 </select> 41 </select>
42 - <select id="selectByGoodsId" resultMap="BaseResultMap">  
43 - select image_url  
44 - from goods_images where goods_id = #{goodsId,jdbcType=INTEGER} order BY order_by;  
45 - </select> 42 + <select id="selectByGoodsId" resultMap="BaseResultMap">
  43 + select id, goods_id, image_url
  44 + from goods_images where goods_id = #{goodsId,jdbcType=INTEGER} order BY order_by;
  45 + </select>
46 </mapper> 46 </mapper>
@@ -303,7 +303,7 @@ public class ProductServiceImpl implements ProductService{ @@ -303,7 +303,7 @@ public class ProductServiceImpl implements ProductService{
303 List<GoodsImages> goodsImages = goodsImagesMapper.selectByGoodsId(goodId); 303 List<GoodsImages> goodsImages = goodsImagesMapper.selectByGoodsId(goodId);
304 List<GoodsImageBO> imageList = new ArrayList<>(); 304 List<GoodsImageBO> imageList = new ArrayList<>();
305 if (!CollectionUtils.isEmpty(goodsImages)) { 305 if (!CollectionUtils.isEmpty(goodsImages)) {
306 - List<String> imageUrlList = goodsImages.stream().map(GoodsImages::getImageUrl).filter(StringUtils::isBlank).map(this::buildImageFullUrl).collect(Collectors.toList()); 306 + List<String> imageUrlList = goodsImages.stream().map(GoodsImages::getImageUrl).filter(StringUtils::isNotBlank).map(this::buildImageFullUrl).collect(Collectors.toList());
307 imageUrlList.forEach(e -> imageList.add(GoodsImageBO.create(e))); 307 imageUrlList.forEach(e -> imageList.add(GoodsImageBO.create(e)));
308 } 308 }
309 goodsBO.setImageList(imageList); 309 goodsBO.setImageList(imageList);