修复一处带宽计算错误

This commit is contained in:
刘祥超
2022-09-19 14:39:22 +08:00
parent fb084a9f48
commit 2a1f78a440

View File

@@ -208,6 +208,7 @@ func (this *ServerBandwidthStatDAO) FindDailyBandwidthStats(tx *dbs.Tx, serverId
func (this *ServerBandwidthStatDAO) FindMonthlyPeekBandwidthBytes(tx *dbs.Tx, serverId int64, month string) (int64, error) { func (this *ServerBandwidthStatDAO) FindMonthlyPeekBandwidthBytes(tx *dbs.Tx, serverId int64, month string) (int64, error) {
return this.Query(tx). return this.Query(tx).
Table(this.partialTable(serverId)). Table(this.partialTable(serverId)).
Attr("serverId", serverId).
Between("day", month+"01", month+"31"). Between("day", month+"01", month+"31").
Result("MAX(bytes)"). Result("MAX(bytes)").
FindInt64Col(0) FindInt64Col(0)