Dev #65

Merged
reynisson merged 67 commits from dev into main 2021-11-16 18:14:00 +00:00
2 changed files with 6 additions and 3 deletions
Showing only changes of commit b37141f5ce - Show all commits

View File

@ -7,6 +7,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.Getter;
import lombok.Setter;
import java.sql.Timestamp;
/**
* Used to expose a representation of the state of an auction through an interface. This class is
* only meant as a starting point when defining a uniform HTTP API for the Auction House: feel free
@ -28,12 +30,12 @@ public class AuctionJsonRepresentation {
private String taskType;
@Getter @Setter
private Integer deadline;
private Timestamp deadline;
public AuctionJsonRepresentation() { }
public AuctionJsonRepresentation(String auctionId, String auctionHouseUri, String taskUri,
String taskType, Integer deadline) {
String taskType, Timestamp deadline) {
this.auctionId = auctionId;
this.auctionHouseUri = auctionHouseUri;
this.taskUri = taskUri;

View File

@ -12,6 +12,7 @@ import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.sql.Timestamp;
import java.util.Optional;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
@ -26,7 +27,7 @@ import java.util.concurrent.TimeUnit;
public class StartAuctionService implements LaunchAuctionUseCase {
private static final Logger LOGGER = LogManager.getLogger(StartAuctionService.class);
private final static int DEFAULT_AUCTION_DEADLINE_MILLIS = 10000;
private final Timestamp DEFAULT_AUCTION_DEADLINE_MILLIS = Timestamp.valueOf("1970-01-01 00:00:01");
// Event port used to publish an auction started event
private final AuctionStartedEventPort auctionStartedEventPort;