|
|
@@ -46,7 +46,7 @@ public class AuctionOrderService {
|
|
|
.findAll(JpaUtils.toSpecification(pageQuery, AuctionOrder.class), JpaUtils.toPageRequest(pageQuery));
|
|
|
}
|
|
|
|
|
|
- public AuctionOrder create(Long userId, Long auctionId, Long addressId,Long auctionRecordId, AuctionPaymentType type) {
|
|
|
+ public AuctionOrder create(Long userId, Long auctionId, Long addressId, Long auctionRecordId, AuctionPaymentType type) {
|
|
|
User user = userRepo.findById(userId).orElseThrow(new BusinessException("无用户"));
|
|
|
|
|
|
AuctionActivity auction = auctionActivityRepo.findById(auctionId)
|
|
|
@@ -77,7 +77,7 @@ public class AuctionOrderService {
|
|
|
return this.createDeposit(user, auction);
|
|
|
}
|
|
|
if (AuctionPaymentType.PURCHASE_PRICE.equals(type)) {
|
|
|
- if (LocalDateTime.now().isAfter(auction.getEndTime())) {
|
|
|
+ if (auction.getEndTime().isAfter(LocalDateTime.now())) {
|
|
|
throw new BusinessException("拍卖还未结束");
|
|
|
}
|
|
|
AuctionRecord record = auctionRecordRepo.findTopByAuctionIdAndUserIdOrderByIdDesc(auctionId, userId);
|
|
|
@@ -190,7 +190,6 @@ public class AuctionOrderService {
|
|
|
.build();
|
|
|
|
|
|
|
|
|
-
|
|
|
return auctionOrderRepo.save(order);
|
|
|
|
|
|
}
|