| | |
| | | |
| | | |
| | | @Resource |
| | | private PromotionClient promotionClient; |
| | | |
| | | @Resource |
| | | private IAuctionVideoService iAuctionVideoService; |
| | | |
| | | @Resource |
| | | private IAuctionSalesroomGoodsService iAuctionSalesroomGoodsService; |
| | | |
| | | |
| | | /** |
| | |
| | | @ResponseBody |
| | | @ApiOperation(value = "获取拍卖师端视频列表") |
| | | public R<List<PromotionVideo>> getVoidList() { |
| | | R<List<PromotionVideo>> promotionVideoList=promotionClient.getPromotionVideoList(); |
| | | List<PromotionVideo> promotionVideos=promotionVideoList.getData(); |
| | | return R.ok(promotionVideos); |
| | | return R.ok(iAuctionVideoService.getVoidList()); |
| | | } |
| | | |
| | | |
| | |
| | | @ResponseBody |
| | | @ApiOperation(value = "拍卖师端添加拍卖会视频播放") |
| | | public R<T> addVoid(@RequestBody ForepartAuctionVideo orepartAuctionVideo) { |
| | | |
| | | |
| | | LambdaQueryWrapper<AuctionSalesroomGoods> wrapper=Wrappers.lambdaQuery(); |
| | | wrapper.eq(AuctionSalesroomGoods::getStatus,1); |
| | | wrapper.eq(AuctionSalesroomGoods::getAuctionSalesroomId,orepartAuctionVideo.getAuctionSalesroomId()); |
| | | wrapper.eq(AuctionSalesroomGoods::getDelFlag,0); |
| | | AuctionSalesroomGoods auctionSalesroomGoods=iAuctionSalesroomGoodsService.getOne(wrapper); |
| | | if (auctionSalesroomGoods!=null){ |
| | | R.fail("当前有拍卖品正在拍卖中,请结束后再试!"); |
| | | } |
| | | |
| | | LambdaQueryWrapper<AuctionVideo> wrapper1=Wrappers.lambdaQuery(); |
| | | wrapper1.eq(AuctionVideo::getAuctionSalesroomId,orepartAuctionVideo.getAuctionSalesroomId()); |
| | | wrapper1.eq(AuctionVideo::getPromotionVideoId,orepartAuctionVideo.getPromotionVideoId()); |
| | | wrapper1.eq(AuctionVideo::getDelFlag,0); |
| | | AuctionVideo auctionVideo=iAuctionVideoService.getOne(wrapper1); |
| | | if (auctionVideo!=null){ |
| | | iAuctionVideoService.removeById(auctionVideo); |
| | | } |
| | | |
| | | R<PromotionVideo> promotionVideo=promotionClient.getPromotionVideoOne(orepartAuctionVideo.getPromotionVideoId()); |
| | | PromotionVideo promotionVideo1= promotionVideo.getData(); |
| | | |
| | | AuctionVideo auctionVideo1=new AuctionVideo(); |
| | | auctionVideo1.setPromotionVideoId(orepartAuctionVideo.getPromotionVideoId()); |
| | | auctionVideo1.setAuctionSalesroomId(orepartAuctionVideo.getAuctionSalesroomId()); |
| | | auctionVideo1.setPromotionVideoUrl(promotionVideo1.getVideoUrl()); |
| | | iAuctionVideoService.save(auctionVideo1); |
| | | iAuctionVideoService.addVoid(orepartAuctionVideo); |
| | | return R.ok(); |
| | | |
| | | } |