hotfix #28

Merged
李寻欢 merged 2 commits from hotfix into main 2024-03-11 14:56:45 +08:00
4 changed files with 4 additions and 4 deletions
Showing only changes of commit a548af9de2 - Show all commits

View File

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

View File

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

View File

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

View File

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