From 43c263df4d8ce0cc830f287780c29db8a2b47f0f Mon Sep 17 00:00:00 2001 From: rentaiming <806181062@qq.com> Date: 星期一, 27 五月 2024 08:44:34 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/controller/forepart/ForepartAuctionSalesroomController.java | 68 +++++----------------------------- 1 files changed, 10 insertions(+), 58 deletions(-) diff --git a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/controller/forepart/ForepartAuctionSalesroomController.java b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/controller/forepart/ForepartAuctionSalesroomController.java index 76cbb5e..6aac614 100644 --- a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/controller/forepart/ForepartAuctionSalesroomController.java +++ b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/controller/forepart/ForepartAuctionSalesroomController.java @@ -1,17 +1,14 @@ 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.DTO.ForepartAuctionBidRecordDTO; -import com.ruoyi.auction.controller.forepart.VO.ForepartAuctionSalesroomVO; + +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.pojo.AuctionSalesroom; -import com.ruoyi.auction.domain.pojo.AuctionVideo; import com.ruoyi.auction.service.IAuctionSalesroomService; -import com.ruoyi.auction.service.IAuctionVideoService; import com.ruoyi.common.core.domain.R; -import com.ruoyi.system.api.domain.SysUser; -import com.ruoyi.system.api.feignClient.SysUserClient; +import com.ruoyi.common.core.utils.page.PageDTO; import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.*; @@ -34,12 +31,6 @@ @Resource private IAuctionSalesroomService iAuctionSalesroomService; - @Resource - private IAuctionVideoService iAuctionVideoService; - - @Resource - private SysUserClient sysUserClient; - /** * 拍卖大屏获取拍卖信息 * @@ -47,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)); } @@ -63,22 +50,9 @@ @RequestMapping("/getBaaner") @ResponseBody @ApiOperation(value = " 暖场视频or封面海报") - public R<ForepartAuctionSalesroomVO> 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); - ForepartAuctionSalesroomVO forepartAuctionSalesroomVO =new ForepartAuctionSalesroomVO(); - AuctionSalesroom auctionSalesroom=iAuctionSalesroomService.getById(SalesroomId); - forepartAuctionSalesroomVO.setAuctionSalesroomStatus(auctionSalesroom.getStatus().getCode()); - if (auctionVideo!=null){ - forepartAuctionSalesroomVO.setUrl(auctionVideo.getPromotionVideoUrl()); - }else{ - forepartAuctionSalesroomVO.setUrl(auctionSalesroom.getCoverPic()); - } - - return R.ok(forepartAuctionSalesroomVO); + return R.ok(iAuctionSalesroomService.getBaaner(ctionSalesroomGoodsDTO)); } @@ -86,29 +60,7 @@ @ResponseBody @ApiOperation(value = "扫码二维码获取拍卖场信息") public R<AuctionSalesroom> getAuctionBidRecordOne(@RequestBody ForepartAuctionBidRecordDTO arepartAuctionBidRecordDTO) { - - R<SysUser> r=sysUserClient.queryUserByPhone(arepartAuctionBidRecordDTO.getPhone()); - SysUser sysUser=r.getData(); - - if (sysUser!=null){ - R.fail("手机号未注册"); - } - - if (!sysUser.getPassword().equals(arepartAuctionBidRecordDTO.getPassword())){ - R.fail("密码输入错误"); - } - - if (!sysUser.getUserType().equals("2")){ - R.fail("该人员不是拍卖师"); - } - - LambdaQueryWrapper<AuctionSalesroom> wrapper=Wrappers.lambdaQuery(); - wrapper.eq(AuctionSalesroom::getAuctionSalesroomQrcode,arepartAuctionBidRecordDTO.getAuctionSalesroomQrcode()); - wrapper.eq(AuctionSalesroom::getDelFlag,0); - AuctionSalesroom auctionBidRecord=iAuctionSalesroomService.getOne(wrapper); - - return R.ok(auctionBidRecord); - + return R.ok(iAuctionSalesroomService.getAuctionBidRecordOne(arepartAuctionBidRecordDTO)); } -- Gitblit v1.7.1