mirror of
https://gitee.com/pnoker/iot-dc3.git
synced 2026-11-03 03:32:08 +08:00
fix(driver): remove stale fields from DeviceEvent and PointValue, fix mqtt driver init
This commit is contained in:
@@ -72,11 +72,9 @@ public class DeviceEvent implements Serializable {
|
||||
private Object content;
|
||||
|
||||
@Transient
|
||||
@JsonIgnore
|
||||
private int timeOut = 15;
|
||||
|
||||
@Transient
|
||||
@JsonIgnore
|
||||
private TimeUnit timeUnit = TimeUnit.MINUTES;
|
||||
|
||||
private Long originTime;
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.dc3.common.bean.driver;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
@@ -80,11 +79,9 @@ public class PointValue implements Serializable {
|
||||
private List<PointValue> children;
|
||||
|
||||
@Transient
|
||||
@JsonIgnore
|
||||
private int timeOut = 15;
|
||||
|
||||
@Transient
|
||||
@JsonIgnore
|
||||
private TimeUnit timeUnit = TimeUnit.MINUTES;
|
||||
|
||||
private Boolean multi;
|
||||
|
||||
+2
-1
@@ -30,6 +30,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* @author pnoker
|
||||
@@ -72,7 +73,7 @@ public class CustomDriverServiceImpl implements CustomDriverService {
|
||||
MAINTAIN:维护
|
||||
FAULT:故障
|
||||
*/
|
||||
driverContext.getDeviceMap().keySet().forEach(id -> driverService.deviceStatusSender(id, Common.Device.Status.ONLINE));
|
||||
driverContext.getDeviceMap().keySet().forEach(id -> driverService.deviceStatusSender(id, Common.Device.Status.ONLINE, 25, TimeUnit.SECONDS));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user