| | |
| | | |
| | | 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.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 io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | |
| | | @Resource |
| | | private IAuctionVideoService iAuctionVideoService; |
| | | |
| | | @Resource |
| | | private SysUserClient sysUserClient; |
| | | |
| | | /** |
| | | * 拍卖大屏获取拍卖信息 |
| | |
| | | @RequestMapping("/getBaaner") |
| | | @ResponseBody |
| | | @ApiOperation(value = " 暖场视频or封面海报") |
| | | public R<AuctionSalesroomVO> getBaaner(@PathVariable("salesroomId") Integer SalesroomId) { |
| | | public R<ForepartAuctionSalesroomVO> getBaaner(@PathVariable("salesroomId") Integer SalesroomId) { |
| | | |
| | | LambdaQueryWrapper<AuctionVideo> wrapper=Wrappers.lambdaQuery(); |
| | | wrapper.eq(AuctionVideo::getAuctionSalesroomId,SalesroomId); |
| | | wrapper.eq(AuctionVideo::getDelFlag,0); |
| | | AuctionVideo auctionVideo=iAuctionVideoService.getOne(wrapper); |
| | | AuctionSalesroomVO auctionSalesroomVO=new AuctionSalesroomVO(); |
| | | ForepartAuctionSalesroomVO forepartAuctionSalesroomVO =new ForepartAuctionSalesroomVO(); |
| | | AuctionSalesroom auctionSalesroom=iAuctionSalesroomService.getById(SalesroomId); |
| | | auctionSalesroomVO.setAuctionSalesroomStatus(auctionSalesroom.getStatus().getCode()); |
| | | forepartAuctionSalesroomVO.setAuctionSalesroomStatus(auctionSalesroom.getStatus().getCode()); |
| | | if (auctionVideo!=null){ |
| | | auctionSalesroomVO.setUrl(auctionVideo.getPromotionVideoUrl()); |
| | | forepartAuctionSalesroomVO.setUrl(auctionVideo.getPromotionVideoUrl()); |
| | | }else{ |
| | | auctionSalesroomVO.setUrl(auctionSalesroom.getCoverPic()); |
| | | forepartAuctionSalesroomVO.setUrl(auctionSalesroom.getCoverPic()); |
| | | } |
| | | |
| | | return R.ok(auctionSalesroomVO); |
| | | return R.ok(forepartAuctionSalesroomVO); |
| | | } |
| | | |
| | | |
| | | @RequestMapping("/getAuctionBidRecordOne") |
| | | @ResponseBody |
| | | @ApiOperation(value = "扫码二维码获取拍卖场信息") |
| | | public R<AuctionSalesroom> getAuctionBidRecordOne(@PathVariable("auctionSalesroomQrcode") String auctionSalesroomQrcode) { |
| | | 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,auctionSalesroomQrcode); |
| | | wrapper.eq(AuctionSalesroom::getAuctionSalesroomQrcode,arepartAuctionBidRecordDTO.getAuctionSalesroomQrcode()); |
| | | wrapper.eq(AuctionSalesroom::getDelFlag,0); |
| | | AuctionSalesroom auctionBidRecord=iAuctionSalesroomService.getOne(wrapper); |
| | | |
| | | return R.ok(auctionBidRecord); |
| | | |
| | | } |