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

This commit is contained in:
刘祥超
2022-07-07 09:18:08 +08:00
parent c0a99a4ba3
commit c15cc6d75c
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
}