| | |
| | | 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; |
| | |
| | | */ |
| | | @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)); |
| | | } |
| | | } |