🐛 修复活跃度不发送的BUG

This commit is contained in:
李寻欢 2024-03-11 14:55:10 +08:00
parent 64c3c9c78b
commit a548af9de2
4 changed files with 4 additions and 4 deletions

View File

@ -68,7 +68,7 @@ func dealMonth(gid string) {
log.Printf("查询群成员总数失败, 错误信息: %v", err)
}
// 计算活跃度
showActivity := err != nil && groupUsers > 0
showActivity := err == nil && groupUsers > 0
activity := "0.00"
if groupUsers > 0 {
activity = fmt.Sprintf("%.2f", (float64(len(records))/float64(groupUsers))*100)

View File

@ -67,7 +67,7 @@ func dealWeek(gid string) {
log.Printf("查询群成员总数失败, 错误信息: %v", err)
}
// 计算活跃度
showActivity := err != nil && groupUsers > 0
showActivity := err == nil && groupUsers > 0
activity := "0.00"
if groupUsers > 0 {
activity = fmt.Sprintf("%.2f", (float64(len(records))/float64(groupUsers))*100)

View File

@ -67,7 +67,7 @@ func dealYear(gid string) {
log.Printf("查询群成员总数失败, 错误信息: %v", err)
}
// 计算活跃度
showActivity := err != nil && groupUsers > 0
showActivity := err == nil && groupUsers > 0
activity := "0.00"
if groupUsers > 0 {
activity = fmt.Sprintf("%.2f", (float64(len(records))/float64(groupUsers))*100)

View File

@ -69,7 +69,7 @@ func dealYesterday(gid string) {
log.Printf("查询群成员总数失败, 错误信息: %v", err)
}
// 计算活跃度
showActivity := err != nil && groupUsers > 0
showActivity := err == nil && groupUsers > 0
activity := "0.00"
if groupUsers > 0 {
activity = fmt.Sprintf("%.2f", (float64(len(records))/float64(groupUsers))*100)