| | |
| | | wrapper1.eq(AuctionSalesroomGoods::getStatus,2); |
| | | wrapper1.eq(AuctionSalesroomGoods::getDelFlag,0); |
| | | wrapper1.eq(AuctionSalesroomGoods::getAuctionSalesroomId,ationSalesroomGoodsDTO.getAuctionSalesroomId()); |
| | | wrapper1.orderByDesc(AuctionSalesroomGoods::getSortNum); |
| | | wrapper1.orderByDesc(AuctionSalesroomGoods::getEndTime); |
| | | wrapper1.last("limit 1"); |
| | | auctionSalesroomGoods = this.getOne(wrapper1); |
| | | if (auctionSalesroomGoods==null){ |
| | |
| | | currentAuctionSalesroomGoods.setGoodsSkustatus(auctionSalesroomGoods.getStatus().getCode()); |
| | | currentAuctionSalesroomGoods.setListingDuration(auctionSalesroomGoods.getListingDuration()); |
| | | auctionSalesroomVO.setCurrentAuctionSalesroomGoods(currentAuctionSalesroomGoods); |
| | | list.add(auctionSalesroomGoods.getSortNum()); |
| | | list.add(auctionSalesroomGoods.getId()); |
| | | } |
| | | LambdaQueryWrapper<AuctionSalesroomGoods> wrapper1=Wrappers.lambdaQuery(); |
| | | wrapper1.eq(AuctionSalesroomGoods::getDelFlag,0); |
| | |
| | | wrapper1.eq(AuctionSalesroomGoods::getAuctionSalesroomId,ationSalesroomGoodsDTO.getAuctionSalesroomId()); |
| | | if (auctionSalesroomGoods!=null) { |
| | | wrapper1.eq(AuctionSalesroomGoods::getSortNum, auctionSalesroomGoods.getSortNum() + 1); |
| | | list.add(auctionSalesroomGoods.getSortNum()+1); |
| | | |
| | | }else{ |
| | | LambdaQueryWrapper<AuctionSalesroomGoods> wrappers=Wrappers.lambdaQuery(); |
| | | wrappers.eq(AuctionSalesroomGoods::getStatus,0); |
| | |
| | | currentAuctionSalesroomGoods.setListingDuration(auctionSalesroomGoodss.getListingDuration()); |
| | | auctionSalesroomVO.setCurrentAuctionSalesroomGoods(currentAuctionSalesroomGoods); |
| | | wrappers.eq(AuctionSalesroomGoods::getSortNum, auctionSalesroomGoodss.getSortNum()); |
| | | list.add(auctionSalesroomGoodss.getSortNum()); |
| | | list.add(auctionSalesroomGoodss.getId()); |
| | | } |
| | | |
| | | |
| | |
| | | nextAuctionSalesroomGoods.setGoodsSkustatus(auctionSalesroomGoods1.getStatus().getCode()); |
| | | nextAuctionSalesroomGoods.setGoodsSkuId(auctionSalesroomGoods1.getId()); |
| | | auctionSalesroomVO.setNextAuctionSalesroomGoods(nextAuctionSalesroomGoods); |
| | | list.add(auctionSalesroomGoods1.getId()); |
| | | } |
| | | LambdaQueryWrapper<AuctionSalesroomGoods> wrapper2=Wrappers.lambdaQuery(); |
| | | if(list.size()>0){ |
| | | wrapper2.notIn(AuctionSalesroomGoods::getSortNum,list); |
| | | wrapper2.notIn(AuctionSalesroomGoods::getId,list); |
| | | } |
| | | wrapper2.eq(AuctionSalesroomGoods::getAuctionSalesroomId,ationSalesroomGoodsDTO.getAuctionSalesroomId()); |
| | | wrapper2.orderByAsc(AuctionSalesroomGoods::getStatus); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | auctionSalesroomGoods.setEndTime(LocalDateTime.now()); |
| | | auctionSalesroomGoods.setStatus(AuctionGoodsStatusEnum.ENDED); |
| | | this.updateById(auctionSalesroomGoods); |
| | | |
| | |
| | | @Override |
| | | public List<AuctionBidRecordVO> getAuctionBidRecord(AuctionSalesroomGoodsInfoDTO auctionSalesroomGoodsInfoDTO) { |
| | | LambdaQueryWrapper<AuctionBidRecord> wrapper=Wrappers.lambdaQuery(); |
| | | |
| | | AuctionSalesroom byId = auctionSalesroomMapper.selectById(auctionSalesroomGoodsInfoDTO.getAuctionSalesroomId()); |
| | | if (byId==null){ |
| | | LambdaQueryWrapper<AuctionSalesroom> wrapper1=Wrappers.lambdaQuery(); |
| | | wrapper1.eq(AuctionSalesroom::getAuctionSalesroomNo,auctionSalesroomGoodsInfoDTO.getAuctionSalesroomId()); |
| | | wrapper1.eq(AuctionSalesroom::getDelFlag,0); |
| | | byId =auctionSalesroomMapper.selectOne(wrapper1); |
| | | } |
| | | |
| | | if (auctionSalesroomGoodsInfoDTO.getAuctionSalesroomId()!=null){ |
| | | wrapper.eq(AuctionBidRecord::getAuctionSalesroomId,auctionSalesroomGoodsInfoDTO.getAuctionSalesroomId()); |
| | | wrapper.eq(AuctionBidRecord::getAuctionSalesroomId,byId.getId()); |
| | | } |
| | | wrapper.eq(AuctionBidRecord::getDelFlag,0); |
| | | wrapper.eq(AuctionBidRecord::getTargetId,auctionSalesroomGoodsInfoDTO.getGoodsSkuId()); |