1
This commit is contained in:
parent
a413a2494c
commit
74bab3600c
@ -29,7 +29,7 @@ func (this *ChipApi) List(c *gin.Context) {
|
||||
}{}
|
||||
for _, m := range chips {
|
||||
v := new(vo.Chip)
|
||||
v.FromModel(m)
|
||||
v.FromModel(&m)
|
||||
q5.AppendSlice(&rspObj.Data, v)
|
||||
}
|
||||
c.JSON(200, rspObj)
|
||||
|
@ -16,10 +16,10 @@ func (this *chip) init() {
|
||||
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(
|
||||
"account_id = ? AND expiretime < ?", accountId, nowTime).Find(chips)
|
||||
return result.Error, []*model.Chip{}
|
||||
return result.Error, chips
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user