From 692eb04c93bb611c494e951f274826f7694d8895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Tue, 6 Jul 2021 10:27:14 +0800 Subject: [PATCH] =?UTF-8?q?DNS=E8=8A=82=E7=82=B9=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E9=9C=80=E8=A6=81=E5=8D=87=E7=BA=A7=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=8A=A0=E5=85=A5=E9=9B=86=E7=BE=A4=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=8F=AF=E7=94=A8=E7=9A=84=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/const/const.go | 2 +- internal/db/models/nameservers/ns_node_dao.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/const/const.go b/internal/const/const.go index 670114c8..46de635f 100644 --- a/internal/const/const.go +++ b/internal/const/const.go @@ -22,5 +22,5 @@ const ( UserNodeVersion = "0.0.9" AuthorityNodeVersion = "0.0.2" MonitorNodeVersion = "0.0.2" - DNSNodeVersion = "0.0.1" + DNSNodeVersion = "0.0.2" ) diff --git a/internal/db/models/nameservers/ns_node_dao.go b/internal/db/models/nameservers/ns_node_dao.go index 8e9814bb..269da324 100644 --- a/internal/db/models/nameservers/ns_node_dao.go +++ b/internal/db/models/nameservers/ns_node_dao.go @@ -335,6 +335,7 @@ func (this NSNodeDAO) UpdateNodeStatus(tx *dbs.Tx, nodeId int64, statusJSON []by func (this *NSNodeDAO) CountAllLowerVersionNodes(tx *dbs.Tx, version string) (int64, error) { return this.Query(tx). State(NSNodeStateEnabled). + Where("clusterId IN (SELECT id FROM "+SharedNSClusterDAO.Table+" WHERE state=1)"). Where("status IS NOT NULL"). Where("(JSON_EXTRACT(status, '$.buildVersionCode') IS NULL OR JSON_EXTRACT(status, '$.buildVersionCode')<:version)"). Param("version", utils.VersionToLong(version)).