mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-04 07:50:25 +08:00 
			
		
		
		
	读取节点列表时可以按照连接数排序
This commit is contained in:
		@@ -435,6 +435,16 @@ func (this *NodeDAO) ListEnabledNodesMatch(tx *dbs.Tx,
 | 
			
		||||
		valueField = "load1m"
 | 
			
		||||
		isAsc = false
 | 
			
		||||
		ifNullValue = -1
 | 
			
		||||
	case "connectionsAsc":
 | 
			
		||||
		valueItem = "connections"
 | 
			
		||||
		valueField = "total"
 | 
			
		||||
		isAsc = true
 | 
			
		||||
		ifNullValue = 1000
 | 
			
		||||
	case "connectionsDesc":
 | 
			
		||||
		valueItem = "connections"
 | 
			
		||||
		valueField = "total"
 | 
			
		||||
		isAsc = false
 | 
			
		||||
		ifNullValue = -1
 | 
			
		||||
	default:
 | 
			
		||||
		query.Desc("level")
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user