|
|
@@ -85,7 +85,11 @@ public class AuctionRecordService {
|
|
|
auctionOrderStatuses.add(AuctionOrderStatus.CANCELLED);
|
|
|
AuctionOrder depositOrder = auctionOrderRepo.findFirstByAuctionIdAndPaymentTypeAndStatusNotIn(record
|
|
|
.getAuctionId(), AuctionPaymentType.DEPOSIT, auctionOrderStatuses);
|
|
|
- auctionRecordDTO.setDepositStatus(depositOrder.getStatus());
|
|
|
+ if (depositOrder != null) {
|
|
|
+ auctionRecordDTO.setDepositStatus(depositOrder.getStatus());
|
|
|
+ } else {
|
|
|
+ auctionRecordDTO.setDepositStatus(AuctionOrderStatus.FINISH);
|
|
|
+ }
|
|
|
auctionRecordDTOS.add(auctionRecordDTO);
|
|
|
});
|
|
|
return new PageImpl<>(auctionRecordDTOS, records.getPageable(), records.getTotalElements());
|