实现总体流量按天统计、按小时统计,提供管理平台Dashboard API

This commit is contained in:
刘祥超
2021-01-21 18:55:34 +08:00
parent 26e898a695
commit 22667b7d0a
15 changed files with 489 additions and 4 deletions

View File

@@ -163,6 +163,8 @@ func (this *NodeDAO) UpdateNode(tx *dbs.Tx, nodeId int64, name string, clusterId
func (this *NodeDAO) CountAllEnabledNodes(tx *dbs.Tx) (int64, error) {
return this.Query(tx).
State(NodeStateEnabled).
Where("clusterId IN (SELECT id FROM "+SharedNodeClusterDAO.Table+" WHERE state=:clusterState)").
Param("clusterState", NodeClusterStateEnabled).
Count()
}