forked from lxh/go-wxhelper
🐛 修复活跃度不发送的BUG
This commit is contained in:
parent
64c3c9c78b
commit
a548af9de2
@ -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)
|
||||||
|
@ -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)
|
||||||
|
@ -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)
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user