| | |
| | | import com.ruoyi.auction.service.IAuctionGoodsService; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.system.api.domain.dto.ListStatusDTO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | */ |
| | | @ApiOperation(value = "查看详情", notes = "查看详情") |
| | | @GetMapping("/{id}") |
| | | public R<MgtAuctionGoodsVO> getAuctionGoods(@PathVariable("id") Long id) { |
| | | public R<MgtAuctionGoodsVO> getAuctionGoods( |
| | | @ApiParam(name = "id", value = "拍卖商品id", required = true) @PathVariable("id") Long id) { |
| | | return R.ok(auctionGoodsService.getAuctionGoodsById(id)); |
| | | } |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 立即结束 |
| | | * |
| | | * @param id 拍卖商品id |
| | | */ |
| | | @ApiOperation("立即结束") |
| | | @PutMapping("/stop/{id}") |
| | | public R<?> stopAuctionGoods(@PathVariable("id") Long id) { |
| | | public R<?> stopAuctionGoods( |
| | | @ApiParam(name = "id", value = "拍卖商品id", required = true) @PathVariable("id") Long id) { |
| | | auctionGoodsService.stopAuctionGoods(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 下架/上架 拍卖商品 |
| | | * |
| | | * @param dto 商品上下架状态对象 |
| | | */ |
| | | @ApiOperation(value = "下架/上架 拍卖商品", notes = "下架/上架 拍卖商品") |
| | | @PutMapping("/upd-status") |
| | | public R<?> updStatus(@Validated @RequestBody ListStatusDTO dto) { |
| | | auctionGoodsService.updStatus(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |