From faf70d67701ba30806d79eb99c43103dd9b06618 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Thu, 8 Sep 2022 10:14:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E7=AE=97=E5=8C=BA=E5=9F=9F=E7=9B=91?= =?UTF-8?q?=E6=8E=A7=E7=BB=88=E7=AB=AF=E4=BD=8E=E7=89=88=E6=9C=AC=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E6=97=B6=E5=BF=BD=E7=95=A5=E5=B7=B2=E7=A6=81=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E7=BB=88=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/db/models/report_node_dao.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/db/models/report_node_dao.go b/internal/db/models/report_node_dao.go index 55fb6013..486bece4 100644 --- a/internal/db/models/report_node_dao.go +++ b/internal/db/models/report_node_dao.go @@ -320,6 +320,7 @@ func (this *ReportNodeDAO) FindNodeAllowIPs(tx *dbs.Tx, nodeId int64) ([]string, func (this *ReportNodeDAO) CountAllLowerVersionNodes(tx *dbs.Tx, version string) (int64, error) { return this.Query(tx). State(ReportNodeStateEnabled). + Attr("isOn", true). Where("status IS NOT NULL"). Where("(JSON_EXTRACT(status, '$.buildVersionCode') IS NULL OR JSON_EXTRACT(status, '$.buildVersionCode')<:version)"). Param("version", utils.VersionToLong(version)).