生成账单时只处理用户ID大于0的记录

This commit is contained in:
刘祥超
2022-11-15 16:34:33 +08:00
parent c449265e05
commit 181a4d05b0
2 changed files with 8 additions and 2 deletions

View File

@@ -304,7 +304,10 @@ func (this *UserBandwidthStatDAO) FindDistinctUserIds(tx *dbs.Tx, dayFrom string
for _, one := range ones {
locker.Lock()
userIds = append(userIds, int64(one.(*UserBandwidthStat).UserId))
var userId = int64(one.(*UserBandwidthStat).UserId)
if userId > 0 {
userIds = append(userIds, userId)
}
locker.Unlock()
}
return nil