New file |
| | |
| | | package com.ruoyi.goods.controller.forepart; |
| | | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.goods.service.IMemberGoodsCollectionService; |
| | | import com.ruoyi.system.api.domain.dto.AuctionCollectionDTO; |
| | | import com.ruoyi.system.api.domain.vo.AuctionGoodsListVO; |
| | | import com.ruoyi.system.api.domain.vo.HomeGoodsSkuListVO; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <p> |
| | | * 会员收藏普通商品 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author mitao |
| | | * @since 2024-05-27 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/forepart/member-goods-collection") |
| | | public class ForepartMemberGoodsCollectionController { |
| | | |
| | | @Resource |
| | | private IMemberGoodsCollectionService iMemberGoodsCollectionService; |
| | | |
| | | @PostMapping("/saveGoodsCollection") |
| | | @ResponseBody |
| | | @ApiOperation(value = "用户端-商品收藏和取消收藏") |
| | | public R saveAuctionCollection(@RequestBody AuctionCollectionDTO auctionCollectionDTO) { |
| | | iMemberGoodsCollectionService.saveGoodsCollection(auctionCollectionDTO); |
| | | return R.ok(); |
| | | } |
| | | @RequestMapping("/getGoodsCollectionList") |
| | | @ResponseBody |
| | | @ApiOperation(value = "用户端-商品收藏列表") |
| | | public R<PageDTO<HomeGoodsSkuListVO>> getGoodsCollectionList(@RequestBody AuctionCollectionDTO auctionCollectionDTO) { |
| | | return R.ok(iMemberGoodsCollectionService.getGoodsCollectionList(auctionCollectionDTO)); |
| | | } |
| | | |
| | | } |