|
@@ -67,11 +67,12 @@ public class GoodsManagerImpl extends BaseServiceImpl<GoodsMapper, GoodsDO> impl
|
|
|
checkParams(goodsDTO);
|
|
|
GoodsDO goodsDO = BeanUtil.copyProperties(goodsDTO, GoodsDO.class);
|
|
|
List<ProductDO> bean = BeanUtils.toBean(goodsDTO.getProductList(), ProductDO.class);
|
|
|
- // 保存相册
|
|
|
- super.save(goodsDO);
|
|
|
+
|
|
|
this.goodsGalleryManager.add(goodsDTO.getImageList(), goodsDO.getId());
|
|
|
GoodsGalleryDO goodsGallery = goodsGalleryManager.getGoodsGallery(goodsDTO.getImageList().get(0).getOriginal());
|
|
|
goodsDO.setImageSmallList(goodsGallery.getSmall());
|
|
|
+ // 保存相册
|
|
|
+ super.save(goodsDO);
|
|
|
bean.forEach(item ->{
|
|
|
item.setGoodsId(goodsDO.getId());
|
|
|
item.setName(goodsDTO.getName());
|