TRX пре 1 година
родитељ
комит
7d5c5e9df1

+ 3 - 0
src/main/java/com/zswl/dataservice/domain/mqtt/GateWayInfo.java

@@ -40,6 +40,9 @@ public class GateWayInfo extends SuperEntity {
     @Schema(description = "项目code")
     private String projectInfoCode;
 
+    @Schema(description = "激活时间")
+    private Long activityTime;
+
     @Schema(description = "最上线时间")
     private Long lastOnlineTime;
 }

+ 1 - 0
src/main/java/com/zswl/dataservice/service/mqtt/GateWayInfoService.java

@@ -87,6 +87,7 @@ public class GateWayInfoService extends SuperService {
         GateWayInfo gateWayInfo = gateWayInfoDao.findTopByGateWayId(param.getGateWayId());
         if (ObjectUtils.isEmpty(gateWayInfo)) {
             gateWayInfo = new GateWayInfo();
+            gateWayInfo.setActivityTime(System.currentTimeMillis());
         }
         gateWayInfo.setOnLineState(OnLineState.OnLine);
         gateWayInfo.setLastOnlineTime(System.currentTimeMillis());