hotfix #30
@ -79,7 +79,7 @@ func dealMonth(gid string) {
|
|||||||
var medianCount int64
|
var medianCount int64
|
||||||
for idx, v := range records {
|
for idx, v := range records {
|
||||||
msgCount += v.Count
|
msgCount += v.Count
|
||||||
if idx == len(records)/2 {
|
if idx == (len(records)/2)-1 {
|
||||||
medianCount = v.Count
|
medianCount = v.Count
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ func dealWeek(gid string) {
|
|||||||
var medianCount int64
|
var medianCount int64
|
||||||
for idx, v := range records {
|
for idx, v := range records {
|
||||||
msgCount += v.Count
|
msgCount += v.Count
|
||||||
if idx == len(records)/2 {
|
if idx == (len(records)/2)-1 {
|
||||||
medianCount = v.Count
|
medianCount = v.Count
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ func dealYear(gid string) {
|
|||||||
var medianCount int64
|
var medianCount int64
|
||||||
for idx, v := range records {
|
for idx, v := range records {
|
||||||
msgCount += v.Count
|
msgCount += v.Count
|
||||||
if idx == len(records)/2 {
|
if idx == (len(records)/2)-1 {
|
||||||
medianCount = v.Count
|
medianCount = v.Count
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ func dealYesterday(gid string) {
|
|||||||
var medianCount int64
|
var medianCount int64
|
||||||
for idx, v := range records {
|
for idx, v := range records {
|
||||||
msgCount += v.Count
|
msgCount += v.Count
|
||||||
if idx == len(records)/2 {
|
if idx == (len(records)/2)-1 {
|
||||||
medianCount = v.Count
|
medianCount = v.Count
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user