mitao
2024-05-27 c26092c422c4b72fa5d51a38f6de1b48ab1ccd87
ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/controller/forepart/ForepartAuctionSalesroomController.java
@@ -1,23 +1,19 @@
package com.ruoyi.auction.controller.forepart;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.auction.controller.forepart.VO.AuctionSalesroomVO;
import com.ruoyi.auction.domain.pojo.AuctionSalesroom;
import com.ruoyi.auction.domain.pojo.AuctionVideo;
import com.ruoyi.auction.controller.forepart.dto.AuctionSalesroomGoodsDTO;
import com.ruoyi.auction.controller.forepart.dto.ForepartAuctionBidRecordDTO;
import com.ruoyi.auction.controller.forepart.vo.ForepartAuctionSalesroomVO;
import com.ruoyi.auction.domain.AuctionSalesroom;
import com.ruoyi.auction.service.IAuctionSalesroomService;
import com.ruoyi.auction.service.IAuctionVideoService;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.utils.page.PageDTO;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PathVariable;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
 * <p>
@@ -35,9 +31,6 @@
    @Resource
    private IAuctionSalesroomService iAuctionSalesroomService;
    @Resource
    private IAuctionVideoService  iAuctionVideoService;
    /**
     * 拍卖大屏获取拍卖信息
     *
@@ -45,12 +38,8 @@
    @RequestMapping("getAuctionBidRecordList")
    @ResponseBody
    @ApiOperation(value = "拍卖大屏获取拍卖信息")
    public R<List<AuctionSalesroom>> getAuctionBidRecordList(@PathVariable("salesroomName") String salesroomName) {
        LambdaQueryWrapper<AuctionSalesroom> wrapper=Wrappers.lambdaQuery();
        wrapper.eq(AuctionSalesroom::getSalesroomName,salesroomName);
        wrapper.eq(AuctionSalesroom::getDelFlag,0);
        List<AuctionSalesroom> auctionBidRecordList=iAuctionSalesroomService.list(wrapper);
        return R.ok(auctionBidRecordList);
    public R<PageDTO<AuctionSalesroom>> getAuctionBidRecordList(AuctionSalesroomGoodsDTO ctionSalesroomGoodsDTO) {
        return R.ok(iAuctionSalesroomService.getAuctionBidRecordList(ctionSalesroomGoodsDTO));
    }
@@ -61,35 +50,17 @@
    @RequestMapping("/getBaaner")
    @ResponseBody
    @ApiOperation(value = " 暖场视频or封面海报")
    public R<AuctionSalesroomVO> getBaaner(@PathVariable("salesroomId") Integer SalesroomId) {
    public R<ForepartAuctionSalesroomVO> getBaaner(AuctionSalesroomGoodsDTO ctionSalesroomGoodsDTO) {
        LambdaQueryWrapper<AuctionVideo> wrapper=Wrappers.lambdaQuery();
        wrapper.eq(AuctionVideo::getAuctionSalesroomId,SalesroomId);
        wrapper.eq(AuctionVideo::getDelFlag,0);
        AuctionVideo auctionVideo=iAuctionVideoService.getOne(wrapper);
        AuctionSalesroomVO auctionSalesroomVO=new AuctionSalesroomVO();
        AuctionSalesroom auctionSalesroom=iAuctionSalesroomService.getById(SalesroomId);
        auctionSalesroomVO.setAuctionSalesroomStatus(auctionSalesroom.getStatus().getCode());
        if (auctionVideo!=null){
            auctionSalesroomVO.setUrl(auctionVideo.getPromotionVideoUrl());
        }else{
            auctionSalesroomVO.setUrl(auctionSalesroom.getCoverPic());
        }
        return R.ok(auctionSalesroomVO);
        return R.ok(iAuctionSalesroomService.getBaaner(ctionSalesroomGoodsDTO));
    }
    @RequestMapping("/getAuctionBidRecordOne")
    @ResponseBody
    @ApiOperation(value = "扫码二维码获取拍卖场信息")
    public R<AuctionSalesroom> getAuctionBidRecordOne(@PathVariable("auctionSalesroomQrcode") String auctionSalesroomQrcode) {
        LambdaQueryWrapper<AuctionSalesroom> wrapper=Wrappers.lambdaQuery();
        wrapper.eq(AuctionSalesroom::getAuctionSalesroomQrcode,auctionSalesroomQrcode);
        wrapper.eq(AuctionSalesroom::getDelFlag,0);
        AuctionSalesroom auctionBidRecord=iAuctionSalesroomService.getOne(wrapper);
        return R.ok(auctionBidRecord);
    public R<AuctionSalesroom> getAuctionBidRecordOne(@RequestBody ForepartAuctionBidRecordDTO arepartAuctionBidRecordDTO) {
        return R.ok(iAuctionSalesroomService.getAuctionBidRecordOne(arepartAuctionBidRecordDTO));
    }