| | |
| | | package com.ruoyi.auction.controller.management; |
| | | |
| | | |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.ruoyi.auction.controller.management.dto.MgtAuctionSalesroomGoodsQuery; |
| | | import com.ruoyi.auction.controller.management.dto.MgtAuctionSalesroomQuery; |
| | | import com.ruoyi.auction.controller.management.dto.MgtScreenBidPage; |
| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import java.util.List; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | 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.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 添加备选商品 |
| | | * |
| | | * @param idList 备选商品id集合 |
| | | * @param idStr 备选商品id集合 |
| | | */ |
| | | @PutMapping("/add-backup-goods") |
| | | @ApiOperation(value = "选择备选商品", notes = "选择备选商品") |
| | | public R<?> addBackupGoods(@RequestBody List<Long> idList) { |
| | | auctionSalesroomService.addBackupGoods(idList); |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "idStr", value = "商品id集合", required = true) |
| | | }) |
| | | public R<?> addBackupGoods(@RequestParam("idStr") String idStr) { |
| | | auctionSalesroomService.addBackupGoods(idStr); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | * @param id 拍卖场商品id |
| | | */ |
| | | @PutMapping("/stop-current/{id}") |
| | | @ApiOperation("停止当前拍品") |
| | | @ApiOperation("结束当前拍卖商品") |
| | | public R<?> stopCurrentGoods( |
| | | @ApiParam(name = "id", value = "拍卖场商品id", required = true) @PathVariable("id") Long id) { |
| | | auctionSalesroomService.stopCurrentGoods(id); |
| | | try { |
| | | auctionSalesroomService.stopCurrentGoods(id); |
| | | } catch (JsonProcessingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ApiOperation("开始下一拍卖商品") |
| | | public R<?> startNextGoods( |
| | | @ApiParam(name = "id", value = "拍卖场商品id", required = true) @PathVariable("id") Long id) { |
| | | auctionSalesroomService.startNextGoods(id); |
| | | try { |
| | | auctionSalesroomService.startNextGoods(id); |
| | | } catch (JsonProcessingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping("/stop-play/{auctionSalesroomId}") |
| | | /** |
| | | * 结束播放 |
| | | * |
| | | * @param auctionSalesroomId 拍卖场id |
| | | */ |
| | | @PutMapping("/stop-play/{auctionSalesroomId}") |
| | | @ApiOperation("结束播放") |
| | | public R<?> stopPlay( |
| | | @ApiParam(name = "auctionSalesroomId", value = "拍卖场id", required = true) |
| | |
| | | auctionSalesroomService.stopPlay(auctionSalesroomId); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 开始当前拍卖场 |
| | | * |
| | | * @param auctionSalesroomId 拍卖场id |
| | | */ |
| | | @PutMapping("/start-auction/{auctionSalesroomId}") |
| | | @ApiOperation("开始当前拍卖场") |
| | | public R<?> startCurrentAuctionSalesroom( |
| | | @ApiParam(name = "auctionSalesroomId", value = "拍卖场id", required = true) |
| | | @PathVariable("auctionSalesroomId") Long auctionSalesroomId) { |
| | | try { |
| | | auctionSalesroomService.startCurrentAuctionSalesroom(auctionSalesroomId); |
| | | } catch (JsonProcessingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 结束当前拍卖场 |
| | | * |
| | | * @param auctionSalesroomId 拍卖场id |
| | | */ |
| | | @PutMapping("/stop-auction/{auctionSalesroomId}") |
| | | @ApiOperation("结束当前拍卖场") |
| | | public R<?> stopCurrentAuctionSalesroom( |
| | | @ApiParam(name = "auctionSalesroomId", value = "拍卖场id", required = true) |
| | | @PathVariable("auctionSalesroomId") Long auctionSalesroomId) { |
| | | try { |
| | | auctionSalesroomService.stopCurrentAuctionSalesroom(auctionSalesroomId); |
| | | } catch (JsonProcessingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |