Authored by zhaojun2

bug fix

... ... @@ -40,7 +40,7 @@
from goods_images
</select>
<select id="selectByGoodsId" resultMap="BaseResultMap">
select image_url
select id, goods_id, image_url
from goods_images where goods_id = #{goodsId,jdbcType=INTEGER} order BY order_by;
</select>
</mapper>
\ No newline at end of file
... ...
... ... @@ -303,7 +303,7 @@ public class ProductServiceImpl implements ProductService{
List<GoodsImages> goodsImages = goodsImagesMapper.selectByGoodsId(goodId);
List<GoodsImageBO> imageList = new ArrayList<>();
if (!CollectionUtils.isEmpty(goodsImages)) {
List<String> imageUrlList = goodsImages.stream().map(GoodsImages::getImageUrl).filter(StringUtils::isBlank).map(this::buildImageFullUrl).collect(Collectors.toList());
List<String> imageUrlList = goodsImages.stream().map(GoodsImages::getImageUrl).filter(StringUtils::isNotBlank).map(this::buildImageFullUrl).collect(Collectors.toList());
imageUrlList.forEach(e -> imageList.add(GoodsImageBO.create(e)));
}
goodsBO.setImageList(imageList);
... ...