| | |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.goods.domain.dto.MgtGoodsEditDto; |
| | | import com.ruoyi.goods.domain.dto.MgtGoodsPageDto; |
| | | import com.ruoyi.goods.domain.dto.MgtGoodsRecommendDto; |
| | | import com.ruoyi.goods.domain.dto.MgtGoodsUpDownDto; |
| | | import com.ruoyi.goods.domain.vo.MgtGoodsPageVo; |
| | | import com.ruoyi.goods.domain.vo.MgtGoodsTotalVo; |
| | | import com.ruoyi.goods.service.goods.GoodsService; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseGetDto; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/upDownMgtGoods", method = RequestMethod.POST) |
| | | @ApiOperation(value = "平台上下架商品") |
| | | public R upDownMgtGoods(@RequestBody MgtGoodsUpDownDto mgtGoodsUpDownDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtGoodsUpDownDto.setUserId(userId); |
| | | goodsService.upDownMgtGoods(mgtGoodsUpDownDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/recommendMgtGoods", method = RequestMethod.POST) |
| | | @ApiOperation(value = "平台推荐商品") |
| | | public R recommendMgtGoods(@RequestBody MgtGoodsRecommendDto mgtGoodsRecommendDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtGoodsRecommendDto.setUserId(userId); |
| | | goodsService.recommendMgtGoods(mgtGoodsRecommendDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/deleteMgtGoods", method = RequestMethod.POST) |
| | | @ApiOperation(value = "平台推荐商品") |
| | | public R deleteMgtGoods(@RequestBody MgtBaseGetDto mgtBaseGetDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtBaseGetDto.setUserId(userId); |
| | | goodsService.deleteMgtGoods(mgtBaseGetDto.getId(),userId); |
| | | return R.ok(); |
| | | } |
| | | } |