mirror of
https://github.com/traccar/traccar.git
synced 2025-01-09 04:07:38 +08:00
Fix database data mocks
This commit is contained in:
parent
408758d371
commit
cd86a9e571
@ -9,7 +9,7 @@
|
||||
<entry key='web.enable'>true</entry>
|
||||
<!--<entry key='web.address'></entry>-->
|
||||
<entry key='web.port'>8082</entry>
|
||||
<entry key='web.application'>../traccar-web/traccar-web.war</entry>
|
||||
<!--<entry key='web.application'>../traccar-web/traccar-web.war</entry>-->
|
||||
<entry key='web.new'>true</entry>
|
||||
<entry key='web.path'>web</entry>
|
||||
<entry key='web.mobile'>webm</entry>
|
||||
|
@ -168,9 +168,9 @@ public class DataManager {
|
||||
admin.setEmail("admin");
|
||||
admin.setPassword("admin");
|
||||
admin.setAdmin(true);
|
||||
QueryBuilder.create(dataSource, properties.getProperty("database.insertUser"))
|
||||
admin.setId(QueryBuilder.create(dataSource, properties.getProperty("database.insertUser"))
|
||||
.setObject(admin)
|
||||
.executeUpdate();
|
||||
.executeUpdate());
|
||||
|
||||
Server server = new Server();
|
||||
server.setRegistration(true);
|
||||
@ -189,7 +189,10 @@ public class DataManager {
|
||||
device.setName("test1");
|
||||
device.setUniqueId("123456789012345");
|
||||
addDevice(device);
|
||||
linkDevice(userId, device.getId());
|
||||
QueryBuilder.create(dataSource, properties.getProperty("database.linkDevice"))
|
||||
.setLong("userId", userId)
|
||||
.setLong("deviceId", device.getId())
|
||||
.executeUpdate();
|
||||
|
||||
Position position = new Position();
|
||||
position.setDeviceId(device.getId());
|
||||
|
Loading…
Reference in New Issue
Block a user