Merge pull request #103 in MIN/mineplex from feature/player-data to develop
* commit 'c2e88c27946e1b3870b71748a936469016e4158b': Updated to a better check
This commit is contained in:
commit
453c3a65b6
@ -73,30 +73,20 @@ public class CustomDataRepository extends RepositoryBase
|
|||||||
|
|
||||||
for (CustomData cd : data.getDataMap().keySet())
|
for (CustomData cd : data.getDataMap().keySet())
|
||||||
{
|
{
|
||||||
|
if (executeUpdate(
|
||||||
executeInsert(UPDATE_DATA, new ResultSetCallable()
|
UPDATE_DATA,
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void processResultSet(ResultSet resultSet) throws SQLException
|
|
||||||
{
|
|
||||||
|
|
||||||
if (!resultSet.isBeforeFirst())
|
|
||||||
{
|
|
||||||
|
|
||||||
// Not already in the DB
|
|
||||||
executeUpdate(
|
|
||||||
INSERT_DATA,
|
|
||||||
new ColumnInt("account", accountId),
|
|
||||||
new ColumnInt("customData", cd.getId()),
|
|
||||||
new ColumnInt("data", data.getDataMap().get(cd))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new ColumnInt("data", data.getDataMap().get(cd)),
|
new ColumnInt("data", data.getDataMap().get(cd)),
|
||||||
new ColumnInt("account", accountId),
|
new ColumnInt("account", accountId),
|
||||||
new ColumnInt("customData", cd.getId())
|
new ColumnInt("customData", cd.getId())) < 1)
|
||||||
);
|
{
|
||||||
|
// Not already in the DB
|
||||||
|
executeUpdate(
|
||||||
|
INSERT_DATA,
|
||||||
|
new ColumnInt("account", accountId),
|
||||||
|
new ColumnInt("customData", cd.getId()),
|
||||||
|
new ColumnInt("data", data.getDataMap().get(cd))
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user