mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-24 14:06:36 +08:00
[账单]显示账单、手动生成账单
This commit is contained in:
@@ -160,3 +160,22 @@ func (this *UserDAO) ExistUser(userId int64, username string) (bool, error) {
|
||||
Neq("id", userId).
|
||||
Exist()
|
||||
}
|
||||
|
||||
// 列出单页的用户ID
|
||||
func (this *UserDAO) ListEnabledUserIds(offset, size int64) ([]int64, error) {
|
||||
ones, _, err := this.Query().
|
||||
ResultPk().
|
||||
State(UserStateEnabled).
|
||||
Offset(offset).
|
||||
Limit(size).
|
||||
AscPk().
|
||||
FindOnes()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
result := []int64{}
|
||||
for _, one := range ones {
|
||||
result = append(result, one.GetInt64("id"))
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user