| | |
| | | wrapper.eq(AuctionSalesroom::getDelFlag,0); |
| | | byId =this.getOne(wrapper); |
| | | } |
| | | |
| | | if (byId.getType().getCode()==0){ |
| | | throw new ServiceException("该拍卖会是线下拍卖会"); |
| | | } |
| | | MemberAuctionSalesroomInfoVO memberAuctionSalesroomInfoVO=new MemberAuctionSalesroomInfoVO(); |
| | | memberAuctionSalesroomInfoVO.setId(byId.getId()); |
| | | memberAuctionSalesroomInfoVO.setBound(byId.getBond()); |
| | |
| | | wrapper.eq(AuctionSalesroom::getAuctionSalesroomNo,MemberAuctionSalesroomDTO.getSalesroomNO()); |
| | | wrapper.eq(AuctionSalesroom::getDelFlag,0); |
| | | AuctionSalesroom auctionSalesroom = this.getOne(wrapper); |
| | | if (auctionSalesroom.getType().getCode()==0){ |
| | | throw new ServiceException("该拍卖会是线下拍卖会"); |
| | | } |
| | | MemberAuctionSalesroomVO memberAuctionSalesroomVO=new MemberAuctionSalesroomVO(); |
| | | memberAuctionSalesroomVO.setSalesroomName(auctionSalesroom.getSalesroomName()); |
| | | memberAuctionSalesroomVO.setStatus(auctionSalesroom.getStatus().getCode()); |
| | |
| | | wrapper3.orderByDesc(AuctionBidRecord::getLastBidAmount); |
| | | wrapper3.last("limit 1"); |
| | | AuctionBidRecord one3 = auctionBidRecordService.getOne(wrapper3); |
| | | if (one3!=null){ |
| | | if (bidVO.getLastBidAmount().doubleValue()<one3.getLastBidAmount().doubleValue()){ |
| | | throw new ServiceException("出价不能比当前最高价低"); |
| | | if (byId.getSalesroomStock()==1){ |
| | | if (one3!=null){ |
| | | if (bidVO.getLastBidAmount().doubleValue()<one3.getLastBidAmount().doubleValue()){ |
| | | throw new ServiceException("出价不能比当前最高价低"); |
| | | } |
| | | } |
| | | } |
| | | if (one3!=null){ |
| | | if (bidVO.getLastBidAmount().doubleValue()<one3.getLastBidAmount().add(byId.getMinimumMarkupAmount()).doubleValue()){ |
| | | throw new ServiceException("出价不能比当前最高价低加每次加价低"); |
| | | if (one3!=null){ |
| | | if (bidVO.getLastBidAmount().doubleValue()<one3.getLastBidAmount().add(byId.getMinimumMarkupAmount()).doubleValue()){ |
| | | throw new ServiceException("出价不能比当前最高价低加每次加价低"); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | if (bigDecimal.doubleValue()>bidVO.getLastBidAmount().doubleValue()){ |
| | | throw new ServiceException("出价不能比每次最少加价低"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | LambdaQueryWrapper<AuctionBidRecord> wrapper1=Wrappers.lambdaQuery(); |
| | | wrapper1.eq(AuctionBidRecord::getMemberId,bidVO.getMemberId()); |
| | |
| | | |
| | | AuctionBidRecord one = auctionBidRecordService.getOne(wrapper1); |
| | | if (one!=null){ |
| | | BigDecimal bigDecimal1=one.getLastBidAmount().add(byId.getMinimumMarkupAmount()); |
| | | if (bigDecimal1.doubleValue()>bidVO.getLastBidAmount().doubleValue()){ |
| | | throw new ServiceException("出价不能比上次出价加每次最少加价低"); |
| | | } |
| | | one.setLastBidAmount(bidVO.getLastBidAmount()); |
| | | one.setLastBidTime(LocalDateTime.now()); |
| | | one.setBidCount(one.getBidCount()+1); |
| | |
| | | wrapper1.orderByDesc(AuctionBidRecord::getLastBidAmount); |
| | | wrapper1.last("limit 1"); |
| | | AuctionBidRecord one = auctionBidRecordService.getOne(wrapper1); |
| | | if (byId.getAuctionStock()==1){ |
| | | if (one != null) { |
| | | BigDecimal bigDecimal1 = one.getLastBidAmount().add(byId.getMinimumMarkupAmount()); |
| | | if (bigDecimal1.doubleValue() > bidVO.getLastBidAmount().doubleValue()) { |
| | |
| | | } |
| | | |
| | | } |
| | | } |
| | | LambdaQueryWrapper<AuctionBidRecord> wrapper3=Wrappers.lambdaQuery(); |
| | | wrapper3.eq(AuctionBidRecord::getTargetId,bidVO.getTargetId()); |
| | | wrapper3.eq(AuctionBidRecord::getDelFlag,0); |