|
|
@@ -56,12 +56,15 @@ public class AuctionRecordService {
|
|
|
auctionRecordDTO.setName(record.getName());
|
|
|
auctionRecordDTO.setUserId(record.getUserId());
|
|
|
auctionRecordDTO.setType(record.getType());
|
|
|
- if (auctionActivity.getStatus().equals(AuctionStatus.PURCHASED) || auctionActivity.getStatus()
|
|
|
- .equals(AuctionStatus.FINISH)) {
|
|
|
- if (auctionActivity.getRecordId().equals(record.getId())) {
|
|
|
- auctionRecordDTO.setPurchased(true);
|
|
|
- }
|
|
|
- }
|
|
|
+ auctionRecordDTO.setPurchased(record.isPurchased());
|
|
|
+// if (auctionActivity.getStatus().equals(AuctionStatus.PURCHASED) || auctionActivity.getStatus()
|
|
|
+// .equals(AuctionStatus.FINISH)) {
|
|
|
+// if (auctionActivity.getRecordId() != null) {
|
|
|
+// if (auctionActivity.getRecordId().equals(record.getId())) {
|
|
|
+// auctionRecordDTO.setPurchased(true);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
if (auctionRecordDTO.getType().equals(AuctionRecordType.DEPOSIT) || auctionRecordDTO.isPurchased()) {
|
|
|
AuctionOrder auctionOrder = auctionOrderRepo.findFirstByAuctionRecordIdOrderByCreatedAt(record.getId());
|
|
|
auctionRecordDTO.setOrderId(auctionOrder.getId());
|