Commit 5a5a42463bbfad1f95a32a6c8ee1c13094f633c3
1 parent
92be763c
refactor: 会员商品收藏
Showing
1 changed file
with
1 additions
and
0 deletions
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/favorite/ProductFavoriteServiceImpl.java
| @@ -34,6 +34,7 @@ public class ProductFavoriteServiceImpl implements ProductFavoriteService { | @@ -34,6 +34,7 @@ public class ProductFavoriteServiceImpl implements ProductFavoriteService { | ||
| 34 | if (favorite != null) { | 34 | if (favorite != null) { |
| 35 | throw exception(FAVORITE_EXISTS); | 35 | throw exception(FAVORITE_EXISTS); |
| 36 | } | 36 | } |
| 37 | + | ||
| 37 | ProductFavoriteDO entity = ProductFavoriteConvert.INSTANCE.convert(userId, spuId); | 38 | ProductFavoriteDO entity = ProductFavoriteConvert.INSTANCE.convert(userId, spuId); |
| 38 | productFavoriteMapper.insert(entity); | 39 | productFavoriteMapper.insert(entity); |
| 39 | return entity.getId(); | 40 | return entity.getId(); |