增加按用户统计带宽/修改其他相关代码

This commit is contained in:
GoEdgeLab
2022-07-07 09:18:08 +08:00
parent 74604f96b3
commit 37a39d3765
19 changed files with 470 additions and 113 deletions

View File

@@ -413,7 +413,7 @@ func (this *ServerStatBoardService) ComposeServerStatBoard(ctx context.Context,
var bandwidthMinutes = utils.RangeMinutes(time.Now(), 12, 5)
var bandwidthStatMap = map[string]*pb.ServerBandwidthStat{}
for _, r := range utils.GroupMinuteRanges(bandwidthMinutes) {
bandwidthStats, err := stats.SharedServerBandwidthStatDAO.FindServerStats(tx, req.ServerId, r.Day, r.MinuteFrom, r.MinuteTo)
bandwidthStats, err := models.SharedServerBandwidthStatDAO.FindServerStats(tx, req.ServerId, r.Day, r.MinuteFrom, r.MinuteTo)
if err != nil {
return nil, err
}