diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/TermiteInfoResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/TermiteInfoResponse.java index 9720b15..25c55d9 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/TermiteInfoResponse.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/TermiteInfoResponse.java @@ -47,6 +47,9 @@ @ApiModelProperty(value = "状态") private String status; + @ApiModelProperty(value = "在线状态 1在线 0离线") + private String onlineStatus; + @ApiModelProperty(value = "项目编码") private String projectCode; diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/TermiteInfoResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/TermiteInfoResponse.java index 9720b15..25c55d9 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/TermiteInfoResponse.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/TermiteInfoResponse.java @@ -47,6 +47,9 @@ @ApiModelProperty(value = "状态") private String status; + @ApiModelProperty(value = "在线状态 1在线 0离线") + private String onlineStatus; + @ApiModelProperty(value = "项目编码") private String projectCode; diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/TermiteMapper.xml b/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/TermiteMapper.xml index 0086c9c..9fcd259 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/TermiteMapper.xml +++ b/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/TermiteMapper.xml @@ -23,6 +23,7 @@ tb.heating_datetime, tb.uptime, ta.status, + case when TIMESTAMPDIFF(minute, uptime, now()) > 1440 then 0 else 1 end as onlineStatus, ta.project_code as projectCode, th.project_name as projectName, ta.create_time as createTime