1
This commit is contained in:
parent
c6d994c308
commit
2471a80a30
@ -17,8 +17,9 @@ func (this *chip) unInit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *chip) List(accountId string) (error, []*model.Chip) {
|
func (this *chip) List(accountId string) (error, []*model.Chip) {
|
||||||
|
nowTime := f5.GetApp().GetRealSeconds()
|
||||||
chips := []*model.Chip{}
|
chips := []*model.Chip{}
|
||||||
result := f5.GetApp().GetOrmDb(constant.WHEEL_DB).Table(new(model.Chip).TableName()).Where(
|
result := f5.GetApp().GetOrmDb(constant.WHEEL_DB).Table(new(model.Chip).TableName()).Where(
|
||||||
"account_id = ?", accountId).Find(chips)
|
"account_id = ? AND expiretime < ?", accountId, nowTime).Find(chips)
|
||||||
return result.Error, []*model.Chip{}
|
return result.Error, []*model.Chip{}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user