aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/database
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/database')
-rw-r--r--src/main/java/org/traccar/database/CommandsManager.java8
-rw-r--r--src/main/java/org/traccar/database/DeviceLookupService.java2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/org/traccar/database/CommandsManager.java b/src/main/java/org/traccar/database/CommandsManager.java
index 53040ad53..764ea637b 100644
--- a/src/main/java/org/traccar/database/CommandsManager.java
+++ b/src/main/java/org/traccar/database/CommandsManager.java
@@ -69,9 +69,9 @@ public class CommandsManager implements BroadcastInterface {
throw new RuntimeException("SMS not configured");
}
Device device = storage.getObject(Device.class, new Request(
- new Columns.Include("positionId", "phone"), new Condition.Equals("id", "id", deviceId)));
+ new Columns.Include("positionId", "phone"), new Condition.Equals("id", deviceId)));
Position position = storage.getObject(Position.class, new Request(
- new Columns.All(), new Condition.Equals("id", "id", device.getPositionId())));
+ new Columns.All(), new Condition.Equals("id", device.getPositionId())));
if (position != null) {
BaseProtocol protocol = serverManager.getProtocol(position.getProtocol());
protocol.sendTextCommand(device.getPhone(), command);
@@ -101,12 +101,12 @@ public class CommandsManager implements BroadcastInterface {
try {
var commands = storage.getObjects(QueuedCommand.class, new Request(
new Columns.All(),
- new Condition.Equals("deviceId", "deviceId", deviceId),
+ new Condition.Equals("deviceId", deviceId),
new Order(false, "id"),
new Limit(count)));
for (var command : commands) {
storage.removeObject(QueuedCommand.class, new Request(
- new Condition.Equals("id", "id", command.getId())));
+ new Condition.Equals("id", command.getId())));
}
return commands.stream().map(QueuedCommand::toCommand).collect(Collectors.toList());
} catch (StorageException e) {
diff --git a/src/main/java/org/traccar/database/DeviceLookupService.java b/src/main/java/org/traccar/database/DeviceLookupService.java
index 9cf0899ee..28910c24a 100644
--- a/src/main/java/org/traccar/database/DeviceLookupService.java
+++ b/src/main/java/org/traccar/database/DeviceLookupService.java
@@ -108,7 +108,7 @@ public class DeviceLookupService {
for (String uniqueId : uniqueIds) {
if (!isThrottled(uniqueId)) {
device = storage.getObject(Device.class, new Request(
- new Columns.All(), new Condition.Equals("uniqueId", "uniqueId", uniqueId)));
+ new Columns.All(), new Condition.Equals("uniqueId", uniqueId)));
if (device != null) {
lookupSucceeded(uniqueId);
break;