Add teams for wtl pokal
This commit is contained in:
@@ -24,7 +24,7 @@ public abstract class TLWMatchesCreatorBase {
|
|||||||
|
|
||||||
// Add matches from config
|
// Add matches from config
|
||||||
for(TLWMatch match : tlwMatches) {
|
for(TLWMatch match : tlwMatches) {
|
||||||
sql += match.getSQLQueryInsert() + "\n";
|
sql += match.getSQLQueryReplace() + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
return sql;
|
return sql;
|
||||||
|
|||||||
@@ -1,12 +1,16 @@
|
|||||||
package de.jeyp91.tippliga;
|
package de.jeyp91.tippliga;
|
||||||
|
|
||||||
import de.jeyp91.tippligaforum.TippligaSQLConnector;
|
import de.jeyp91.tippligaforum.TippligaSQLConnector;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public class TLWTeamsCreator {
|
public class TLWTeamsCreator {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(TLWTeamsCreator.class);
|
||||||
int season;
|
int season;
|
||||||
int league;
|
int league;
|
||||||
ArrayList<TLWMatch> matches;
|
ArrayList<TLWMatch> matches;
|
||||||
@@ -36,6 +40,10 @@ public class TLWTeamsCreator {
|
|||||||
String sql = "";
|
String sql = "";
|
||||||
for (Integer id : teamIds) {
|
for (Integer id : teamIds) {
|
||||||
ArrayList<TLWTeam> teams = connector.getTeams(String.valueOf(id));
|
ArrayList<TLWTeam> teams = connector.getTeams(String.valueOf(id));
|
||||||
|
if(teams.size() == 0) {
|
||||||
|
this.logger.error("Did not find team id " + id.toString());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
String teamName = teams.get(0).getTeamName();
|
String teamName = teams.get(0).getTeamName();
|
||||||
String teamNameShort = teams.get(0).getTeamNameShort();
|
String teamNameShort = teams.get(0).getTeamNameShort();
|
||||||
String teamSymbol = teams.get(0).getTeamSymbol();
|
String teamSymbol = teams.get(0).getTeamSymbol();
|
||||||
|
|||||||
@@ -511,7 +511,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"teamname": "FC Fulham",
|
"teamname": "FC Fulham",
|
||||||
"tippligaID": 5555,
|
"tippligaID": 555,
|
||||||
"apiFootballID": 36
|
"apiFootballID": 36
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1103,5 +1103,75 @@
|
|||||||
"teamname": "TuS Makkabi Berlin",
|
"teamname": "TuS Makkabi Berlin",
|
||||||
"tippligaID": 192,
|
"tippligaID": 192,
|
||||||
"apiFootballID": 14722
|
"apiFootballID": 14722
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"teamname": "Freiburg II",
|
||||||
|
"tippligaID": 193,
|
||||||
|
"apiFootballID": 9363
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"teamname": "Bournemouth",
|
||||||
|
"tippligaID": 624,
|
||||||
|
"apiFootballID": 35
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"teamname": "Burnley",
|
||||||
|
"tippligaID": 194,
|
||||||
|
"apiFootballID": 44
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"teamname": "Crystal Palace",
|
||||||
|
"tippligaID": 195,
|
||||||
|
"apiFootballID": 52
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"teamname": "Sheffield Utd",
|
||||||
|
"tippligaID": 196,
|
||||||
|
"apiFootballID": 62
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"teamname": "Luton",
|
||||||
|
"tippligaID": 197,
|
||||||
|
"apiFootballID": 1359
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"teamname": "Genoa",
|
||||||
|
"tippligaID": 560,
|
||||||
|
"apiFootballID": 495
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"teamname": "Frosinone",
|
||||||
|
"tippligaID": 198,
|
||||||
|
"apiFootballID": 512
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"teamname": "Lecce",
|
||||||
|
"tippligaID": 199,
|
||||||
|
"apiFootballID": 867
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"teamname": "Cagliari",
|
||||||
|
"tippligaID": 200,
|
||||||
|
"apiFootballID": 490
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"teamname": "Salernitana",
|
||||||
|
"tippligaID": 201,
|
||||||
|
"apiFootballID": 514
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"teamname": "Sassuolo",
|
||||||
|
"tippligaID": 202,
|
||||||
|
"apiFootballID": 488
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"teamname": "Fiorentina",
|
||||||
|
"tippligaID": 438,
|
||||||
|
"apiFootballID": 502
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"teamname": "Torino",
|
||||||
|
"tippligaID": 627,
|
||||||
|
"apiFootballID": 503
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user