| | |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.goods.controller.management.DTO.GoodsInfoTitleQuery; |
| | | import com.ruoyi.goods.controller.management.DTO.GoodsSkuDTO; |
| | | import com.ruoyi.goods.controller.management.DTO.GoodsSkuQuery; |
| | | import com.ruoyi.goods.controller.management.VO.GoodsBrandVO; |
| | | import com.ruoyi.goods.controller.management.VO.GoodsCategoryVO; |
| | | import com.ruoyi.goods.controller.management.VO.GoodsFlavorTypeVO; |
| | | import com.ruoyi.goods.controller.management.VO.GoodsInfoTitleVO; |
| | | import com.ruoyi.goods.controller.management.VO.GoodsSeriesVO; |
| | | import com.ruoyi.goods.controller.management.VO.GoodsSkuVO; |
| | | import com.ruoyi.goods.controller.management.dto.GoodsInfoTitleQuery; |
| | | import com.ruoyi.goods.controller.management.dto.GoodsSkuDTO; |
| | | import com.ruoyi.goods.controller.management.dto.GoodsSkuQuery; |
| | | import com.ruoyi.goods.controller.management.vo.GoodsBrandVO; |
| | | import com.ruoyi.goods.controller.management.vo.GoodsCategoryVO; |
| | | import com.ruoyi.goods.controller.management.vo.GoodsFlavorTypeVO; |
| | | import com.ruoyi.goods.controller.management.vo.GoodsInfoTitleVO; |
| | | import com.ruoyi.goods.controller.management.vo.GoodsSeriesVO; |
| | | import com.ruoyi.goods.controller.management.vo.GoodsSkuVO; |
| | | import com.ruoyi.goods.service.IGoodsBrandService; |
| | | import com.ruoyi.goods.service.IGoodsCategoryService; |
| | | import com.ruoyi.goods.service.IGoodsFlavorTypeService; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | @RestController |
| | | @RequestMapping("/mgt/goods-sku") |
| | | @RequiredArgsConstructor |
| | | @Api(value = "管理后台商品相关接口", tags = {"管理后台接口"}) |
| | | @Api(value = "管理后台商品相关接口", tags = {"管理后台-商品相关接口"}) |
| | | public class MgtGoodsSkuController { |
| | | |
| | | private final IGoodsSkuService goodsSkuService; |
| | |
| | | */ |
| | | @ApiOperation(value = "下架/上架 商品", notes = "下架/上架 商品") |
| | | @PutMapping("/upd-status") |
| | | public R<Void> updStatus(@RequestBody ListStatusDTO dto) { |
| | | public R<Void> updStatus(@Validated @RequestBody ListStatusDTO dto) { |
| | | goodsSkuService.updStatus(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation("查看详情") |
| | | @GetMapping("/detail/{id}") |
| | | public R<GoodsSkuVO> getGoodsDetail(@PathVariable("id") Long id) { |
| | | return R.ok(goodsSkuService.getGoodsDetail(id)); |
| | | } |
| | | } |