Fix from delivery dates
This commit is contained in:
@@ -141,11 +141,11 @@ public class TLWMatchesUpdaterFootball extends TLWMatchesManagerBase {
|
||||
}
|
||||
|
||||
private void updateStatus(ArrayList<TLWMatch> matches) {
|
||||
Date earliestDate = getEarliestMatchDateTime(matches);
|
||||
Date now = new Date(System.currentTimeMillis());
|
||||
if(earliestDate.after(now)) {
|
||||
LocalDateTime earliestDate = TLWMatchesManagerBase.getFirstMatchtimeTLW(matches);
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
if(earliestDate.isAfter(now)) {
|
||||
for(TLWMatch match : matches) {
|
||||
Date date = this.getDateObject(match.getMatchDateTime());
|
||||
LocalDateTime date = TLWMatchesManagerBase.getDate(match);
|
||||
if (this.getDaysDifference(earliestDate, date) == 0) {
|
||||
match.setStatus(0);
|
||||
} else {
|
||||
@@ -155,17 +155,6 @@ public class TLWMatchesUpdaterFootball extends TLWMatchesManagerBase {
|
||||
}
|
||||
}
|
||||
|
||||
private Date getEarliestMatchDateTime(ArrayList<TLWMatch> matches) {
|
||||
Date earliestDate = this.getDateObject(matches.get(0).getMatchDateTime());
|
||||
for(TLWMatch match : matches) {
|
||||
Date date = this.getDateObject(match.getMatchDateTime());
|
||||
if(date.before(earliestDate)) {
|
||||
earliestDate = date;
|
||||
}
|
||||
}
|
||||
return earliestDate;
|
||||
}
|
||||
|
||||
private TLWMatch getMatchingMatch(APIFootballMatch apiFootballMatch, ArrayList<TLWMatch> tlwMatches) throws Exception {
|
||||
int foundMatches = 0;
|
||||
TLWMatch matchingMatch = null;
|
||||
|
||||
Reference in New Issue
Block a user