From 855921d253a4854d4fb78b83bfcf7c6e93b3f68d Mon Sep 17 00:00:00 2001 From: mitao <2763622819@qq.com> Date: 星期三, 29 五月 2024 19:43:50 +0800 Subject: [PATCH] 1.提交【管理后台】团购、拍卖商品立即结束退款处理 2.提交【管理后台】拍卖场管理部分接口 --- ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/controller/management/MgtAuctionGoodsController.java | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 44 insertions(+), 1 deletions(-) diff --git a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/controller/management/MgtAuctionGoodsController.java b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/controller/management/MgtAuctionGoodsController.java index 3043837..f8e18fc 100644 --- a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/controller/management/MgtAuctionGoodsController.java +++ b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/controller/management/MgtAuctionGoodsController.java @@ -1,6 +1,7 @@ package com.ruoyi.auction.controller.management; +import com.ruoyi.auction.controller.management.dto.AuctionGoodsDTO; import com.ruoyi.auction.controller.management.dto.AuctionGoodsQuery; import com.ruoyi.auction.controller.management.vo.AuctionGoodsVO; import com.ruoyi.auction.service.IAuctionGoodsService; @@ -9,7 +10,12 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; +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; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -21,7 +27,7 @@ * @author mitao * @since 2024-05-16 */ -@Api(value = "管理后台拍卖商品相关接口", tags = {"管理后台接口"}) +@Api(value = "拍卖商品管理相关接口", tags = {"管理后台接口"}) @RestController @RequiredArgsConstructor @RequestMapping("/mgt/auction-goods") @@ -29,10 +35,47 @@ private final IAuctionGoodsService auctionGoodsService; + /** + * 获取拍卖商品列表的分页数据 + * + * @param query 拍卖商品查询对象 + * @return PageDTO<AuctionGoodsVO> + */ @ApiOperation(value = "获取拍卖商品列表的分页数据", notes = "获取拍卖商品列表的分页数据") @PostMapping("/page") public R<PageDTO<AuctionGoodsVO>> getAuctionGoodsPage( AuctionGoodsQuery query) { return R.ok(auctionGoodsService.getAuctionGoodsPage(query)); } + + /** + * 查看详情 + * + * @param id 拍卖商品id + * @return AuctionGoodsVO + */ + @ApiOperation(value = "查看详情", notes = "查看详情") + @GetMapping("/{id}") + public R<AuctionGoodsVO> getAuctionGoods(@PathVariable("id") Long id) { + return R.ok(auctionGoodsService.getAuctionGoodsById(id)); + } + + /** + * 添加/编辑 拍卖商品 + * + * @param dto 拍卖商品数据传输对象 + */ + @ApiOperation(value = "添加/编辑 拍卖商品", notes = "添加/编辑 拍卖商品") + @PostMapping("/save") + public R<?> saveAuctionGoods(@Validated @RequestBody AuctionGoodsDTO dto) { + auctionGoodsService.saveAuctionGoods(dto); + return R.ok(); + } + + @ApiOperation("立即结束") + @PutMapping("/stop/{id}") + public R<?> stopAuctionGoods(@PathVariable("id") Long id) { + auctionGoodsService.stopAuctionGoods(id); + return R.ok(); + } } -- Gitblit v1.7.1