| | |
| | | if (bidVO.getAuctionType() == 2) { |
| | | AuctionSalesroomGoods byId = auctionSalesroomGoodsMapper.selectById( |
| | | bidVO.getTargetId()); |
| | | // 判断否大于最高价 |
| | | if (byId.getMaxAmount().compareTo(bidVO.getLastBidAmount()) < 0) { |
| | | throw new ServiceException("出价不能高出最高价"); |
| | | } |
| | | // 查询用户出价记录判断是否第一次出价 首次出价,可以只出起拍价,而不是需要比起拍价高。 |
| | | Long count = auctionBidRecordService.lambdaQuery() |
| | | .eq(AuctionBidRecord::getAuctionSalesroomId, bidVO.getAuctionSalesroomId()) |
| | | .eq(AuctionBidRecord::getTargetId, bidVO.getTargetId()) |
| | | .eq(AuctionBidRecord::getAuctionType, bidVO.getAuctionType()) |
| | | .eq(AuctionBidRecord::getMemberId, bidVO.getMemberId()).count(); |
| | | |
| | | if (byId.getStartingPrice().doubleValue() > bidVO.getLastBidAmount() |
| | | .doubleValue()) { |
| | | .doubleValue() && count > 0) { |
| | | throw new ServiceException("出价不能比起拍价低"); |
| | | } |
| | | AuctionSalesroom byId1 = this.getById(bidVO.getAuctionSalesroomId()); |
| | |
| | | .clientType(ClientTypeEnum.MEMBER).build(), SecurityConstants.INNER); |
| | | } else { |
| | | AuctionGoods byId = auctionGoodsService.getById(bidVO.getTargetId()); |
| | | // 查询用户出价记录判断是否第一次出价 首次出价,可以只出起拍价,而不是需要比起拍价高。 |
| | | Long count = auctionBidRecordService.lambdaQuery() |
| | | .eq(AuctionBidRecord::getTargetId, bidVO.getTargetId()) |
| | | .eq(AuctionBidRecord::getAuctionType, bidVO.getAuctionType()) |
| | | .eq(AuctionBidRecord::getMemberId, bidVO.getMemberId()).count(); |
| | | if (byId.getStartingPrice().doubleValue() > bidVO.getLastBidAmount() |
| | | .doubleValue()) { |
| | | .doubleValue() && count > 0) { |
| | | throw new ServiceException("出价不能比起拍价低"); |
| | | } |
| | | BigDecimal bigDecimal = byId.getStartingPrice().add(byId.getMinimumMarkupAmount()); |