| | |
| | | package com.ruoyi.auction.controller.management; |
| | | |
| | | |
| | | import com.ruoyi.auction.controller.management.dto.MgtAuctionSalesroomQuery; |
| | | import com.ruoyi.auction.controller.management.vo.MgtAuctionSalesroomVO; |
| | | import com.ruoyi.auction.service.IAuctionSalesroomService; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | 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.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | * @author mitao |
| | | * @since 2024-05-16 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/mgt/auction-salesroom") |
| | | @RequiredArgsConstructor |
| | | @Api(value = "拍卖场管理相关接口", tags = {"管理后台接口"}) |
| | | public class MgtAuctionSalesroomController { |
| | | |
| | | private final IAuctionSalesroomService auctionSalesroomService; |
| | | |
| | | /** |
| | | * 分页查询拍卖场 |
| | | * |
| | | * @param query 拍卖场查询对象 |
| | | * @return PageDTO<MgtAuctionSalesroomVO> |
| | | */ |
| | | @PostMapping("/page") |
| | | @ApiOperation(value = "获取拍卖场列表的分页数据", notes = "获取拍卖场列表的分页数据") |
| | | public R<PageDTO<MgtAuctionSalesroomVO>> getAuctionSalesroomPage( |
| | | MgtAuctionSalesroomQuery query) { |
| | | return R.ok(auctionSalesroomService.getAuctionSalesroomPage(query)); |
| | | } |
| | | |
| | | /** |
| | | * 查看二维码 |
| | | * |
| | | * @param id 拍卖场id |
| | | * @return 二维码 |
| | | */ |
| | | @GetMapping("/qr-code/{id}") |
| | | @ApiOperation(value = "查看二维码", notes = "查看二维码") |
| | | public R<String> getQrCode(@PathVariable("id") Long id) { |
| | | try { |
| | | return R.ok(auctionSalesroomService.getQrCode(id)); |
| | | } catch (Exception e) { |
| | | log.info("查看二维码异常", e); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | } |