mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-15 17:40:25 +08:00
生成账单时只处理用户ID大于0的记录
This commit is contained in:
@@ -710,7 +710,10 @@ func (this *ServerDailyStatDAO) FindDistinctUserIds(tx *dbs.Tx, dayFrom string,
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
for _, one := range ones {
|
for _, one := range ones {
|
||||||
userIds = append(userIds, one.GetInt64("userId"))
|
var userId = one.GetInt64("userId")
|
||||||
|
if userId > 0 {
|
||||||
|
userIds = append(userIds, userId)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return userIds, nil
|
return userIds, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -304,7 +304,10 @@ func (this *UserBandwidthStatDAO) FindDistinctUserIds(tx *dbs.Tx, dayFrom string
|
|||||||
|
|
||||||
for _, one := range ones {
|
for _, one := range ones {
|
||||||
locker.Lock()
|
locker.Lock()
|
||||||
userIds = append(userIds, int64(one.(*UserBandwidthStat).UserId))
|
var userId = int64(one.(*UserBandwidthStat).UserId)
|
||||||
|
if userId > 0 {
|
||||||
|
userIds = append(userIds, userId)
|
||||||
|
}
|
||||||
locker.Unlock()
|
locker.Unlock()
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user