hotfix #28

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

View File

@ -60,7 +60,10 @@ func dealMonth(gid string) {
// 查询群成员总数 // 查询群成员总数
var groupUsers int64 var groupUsers int64
err = client.MySQL.Model(&entity.GroupUser{}).Where("group_id = ?", gid).Count(&groupUsers).Error err = client.MySQL.Model(&entity.GroupUser{}).
Where("group_id = ?", gid).
Where("is_member IS TRUE").
Count(&groupUsers).Error
if err != nil { if err != nil {
log.Printf("查询群成员总数失败, 错误信息: %v", err) log.Printf("查询群成员总数失败, 错误信息: %v", err)
} }

View File

@ -59,7 +59,10 @@ func dealWeek(gid string) {
// 查询群成员总数 // 查询群成员总数
var groupUsers int64 var groupUsers int64
err = client.MySQL.Model(&entity.GroupUser{}).Where("group_id = ?", gid).Count(&groupUsers).Error err = client.MySQL.Model(&entity.GroupUser{}).
Where("group_id = ?", gid).
Where("is_member IS TRUE").
Count(&groupUsers).Error
if err != nil { if err != nil {
log.Printf("查询群成员总数失败, 错误信息: %v", err) log.Printf("查询群成员总数失败, 错误信息: %v", err)
} }

View File

@ -59,7 +59,10 @@ func dealYear(gid string) {
// 查询群成员总数 // 查询群成员总数
var groupUsers int64 var groupUsers int64
err = client.MySQL.Model(&entity.GroupUser{}).Where("group_id = ?", gid).Count(&groupUsers).Error err = client.MySQL.Model(&entity.GroupUser{}).
Where("group_id = ?", gid).
Where("is_member IS TRUE").
Count(&groupUsers).Error
if err != nil { if err != nil {
log.Printf("查询群成员总数失败, 错误信息: %v", err) log.Printf("查询群成员总数失败, 错误信息: %v", err)
} }

View File

@ -61,7 +61,10 @@ func dealYesterday(gid string) {
// 查询群成员总数 // 查询群成员总数
var groupUsers int64 var groupUsers int64
err = client.MySQL.Model(&entity.GroupUser{}).Where("group_id = ?", gid).Count(&groupUsers).Error err = client.MySQL.Model(&entity.GroupUser{}).
Where("group_id = ?", gid).
Where("is_member IS TRUE").
Count(&groupUsers).Error
if err != nil { if err != nil {
log.Printf("查询群成员总数失败, 错误信息: %v", err) log.Printf("查询群成员总数失败, 错误信息: %v", err)
} }