mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-04 07:50:25 +08:00 
			
		
		
		
	已经停用的节点不提示需要升级
This commit is contained in:
		@@ -93,6 +93,7 @@ func (this *NSNodeDAO) CountAllLowerVersionNodesWithClusterId(tx *dbs.Tx, cluste
 | 
			
		||||
	return this.Query(tx).
 | 
			
		||||
		State(NSNodeStateEnabled).
 | 
			
		||||
		Attr("clusterId", clusterId).
 | 
			
		||||
		Attr("isOn", true).
 | 
			
		||||
		Where("status IS NOT NULL").
 | 
			
		||||
		Where("JSON_EXTRACT(status, '$.os')=:os").
 | 
			
		||||
		Where("JSON_EXTRACT(status, '$.arch')=:arch").
 | 
			
		||||
@@ -161,6 +162,7 @@ func (this *NSNodeDAO) UpdateNodeStatus(tx *dbs.Tx, nodeId int64, nodeStatus *no
 | 
			
		||||
func (this *NSNodeDAO) CountAllLowerVersionNodes(tx *dbs.Tx, version string) (int64, error) {
 | 
			
		||||
	return this.Query(tx).
 | 
			
		||||
		State(NSNodeStateEnabled).
 | 
			
		||||
		Attr("isOn", true).
 | 
			
		||||
		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)").
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user