mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-02 22:50:26 +08:00
计算区域监控终端低版本数量时忽略已禁用的终端
This commit is contained in:
@@ -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) {
|
func (this *ReportNodeDAO) CountAllLowerVersionNodes(tx *dbs.Tx, version string) (int64, error) {
|
||||||
return this.Query(tx).
|
return this.Query(tx).
|
||||||
State(ReportNodeStateEnabled).
|
State(ReportNodeStateEnabled).
|
||||||
|
Attr("isOn", true).
|
||||||
Where("status IS NOT NULL").
|
Where("status IS NOT NULL").
|
||||||
Where("(JSON_EXTRACT(status, '$.buildVersionCode') IS NULL OR JSON_EXTRACT(status, '$.buildVersionCode')<:version)").
|
Where("(JSON_EXTRACT(status, '$.buildVersionCode') IS NULL OR JSON_EXTRACT(status, '$.buildVersionCode')<:version)").
|
||||||
Param("version", utils.VersionToLong(version)).
|
Param("version", utils.VersionToLong(version)).
|
||||||
|
|||||||
Reference in New Issue
Block a user