aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/handler
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/handler')
-rw-r--r--src/main/java/org/traccar/handler/FilterHandler.java2
-rw-r--r--src/main/java/org/traccar/handler/events/GeofenceEventHandler.java3
-rw-r--r--src/main/java/org/traccar/handler/events/MotionEventHandler.java2
-rw-r--r--src/main/java/org/traccar/handler/events/OverspeedEventHandler.java2
4 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/org/traccar/handler/FilterHandler.java b/src/main/java/org/traccar/handler/FilterHandler.java
index f09cb16a3..3722f2a22 100644
--- a/src/main/java/org/traccar/handler/FilterHandler.java
+++ b/src/main/java/org/traccar/handler/FilterHandler.java
@@ -88,7 +88,7 @@ public class FilterHandler extends BaseDataHandler {
return storage.getObject(Position.class, new Request(
new Columns.All(),
new Condition.And(
- new Condition.Equals("deviceId", "deviceId", deviceId),
+ new Condition.Equals("deviceId", deviceId),
new Condition.Compare("fixTime", "<=", "time", date)),
new Order(true, "fixTime"),
new Limit(1)));
diff --git a/src/main/java/org/traccar/handler/events/GeofenceEventHandler.java b/src/main/java/org/traccar/handler/events/GeofenceEventHandler.java
index b1be7e8ad..9414f4b31 100644
--- a/src/main/java/org/traccar/handler/events/GeofenceEventHandler.java
+++ b/src/main/java/org/traccar/handler/events/GeofenceEventHandler.java
@@ -82,7 +82,8 @@ public class GeofenceEventHandler extends BaseEventHandler {
try {
storage.updateObject(device, new Request(
- new Columns.Include("geofenceIds"), new Condition.Equals("id", "id")));
+ new Columns.Include("geofenceIds"),
+ new Condition.Equals("id", device.getId())));
} catch (StorageException e) {
throw new RuntimeException("Update device geofences error", e);
}
diff --git a/src/main/java/org/traccar/handler/events/MotionEventHandler.java b/src/main/java/org/traccar/handler/events/MotionEventHandler.java
index 3511cf682..1b9763c41 100644
--- a/src/main/java/org/traccar/handler/events/MotionEventHandler.java
+++ b/src/main/java/org/traccar/handler/events/MotionEventHandler.java
@@ -76,7 +76,7 @@ public class MotionEventHandler extends BaseEventHandler {
try {
storage.updateObject(device, new Request(
new Columns.Include("motionState", "motionTime", "motionDistance"),
- new Condition.Equals("id", "id")));
+ new Condition.Equals("id", device.getId())));
} catch (StorageException e) {
LOGGER.warn("Update device motion error", e);
}
diff --git a/src/main/java/org/traccar/handler/events/OverspeedEventHandler.java b/src/main/java/org/traccar/handler/events/OverspeedEventHandler.java
index 3928fcc88..4d6aa8857 100644
--- a/src/main/java/org/traccar/handler/events/OverspeedEventHandler.java
+++ b/src/main/java/org/traccar/handler/events/OverspeedEventHandler.java
@@ -113,7 +113,7 @@ public class OverspeedEventHandler extends BaseEventHandler {
try {
storage.updateObject(device, new Request(
new Columns.Include("overspeedState", "overspeedTime", "overspeedGeofenceId"),
- new Condition.Equals("id", "id")));
+ new Condition.Equals("id", device.getId())));
} catch (StorageException e) {
LOGGER.warn("Update device overspeed error", e);
}