Add teams for wtl pokal

This commit is contained in:
2023-08-06 18:51:12 +02:00
parent fbca245326
commit cbc4b4ff76
3 changed files with 80 additions and 2 deletions

View File

@@ -24,7 +24,7 @@ public abstract class TLWMatchesCreatorBase {
// Add matches from config
for(TLWMatch match : tlwMatches) {
sql += match.getSQLQueryInsert() + "\n";
sql += match.getSQLQueryReplace() + "\n";
}
return sql;

View File

@@ -1,12 +1,16 @@
package de.jeyp91.tippliga;
import de.jeyp91.tippligaforum.TippligaSQLConnector;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.Set;
public class TLWTeamsCreator {
private static final Logger logger = LogManager.getLogger(TLWTeamsCreator.class);
int season;
int league;
ArrayList<TLWMatch> matches;
@@ -36,6 +40,10 @@ public class TLWTeamsCreator {
String sql = "";
for (Integer id : teamIds) {
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 teamNameShort = teams.get(0).getTeamNameShort();
String teamSymbol = teams.get(0).getTeamSymbol();

View File

@@ -511,7 +511,7 @@
},
{
"teamname": "FC Fulham",
"tippligaID": 5555,
"tippligaID": 555,
"apiFootballID": 36
},
{
@@ -1103,5 +1103,75 @@
"teamname": "TuS Makkabi Berlin",
"tippligaID": 192,
"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
}
]