mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-12 14:50:25 +08:00
网站看板数据中增加当日独立IP和当日流量
This commit is contained in:
@@ -471,6 +471,17 @@ func (this *ServerStatBoardService) ComposeServerStatBoard(ctx context.Context,
|
||||
}
|
||||
}
|
||||
|
||||
// 当日统计
|
||||
{
|
||||
var day = timeutil.Format("Ymd")
|
||||
stat, err := models.SharedServerBandwidthStatDAO.SumDailyStat(tx, req.ServerId, 0, day, day)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
result.DailyCountIPs = stat.CountIPs
|
||||
result.DailyTrafficBytes = stat.Bytes
|
||||
}
|
||||
|
||||
// 带宽统计
|
||||
{
|
||||
var month = timeutil.Format("Ym")
|
||||
|
||||
Reference in New Issue
Block a user