Skip to content

Commit

Permalink
Fix/model (#39)
Browse files Browse the repository at this point in the history
* feat:(api) entity token ...

* feat:(config) Service configuration, easy integration to tkeel

* feat:(tools) swaggerJSON generate

* style:code style for golangci-lint

* fix(api): Compatible with tkeel api

* fix(model):tenant list
  • Loading branch information
chanoe authored Mar 3, 2022
1 parent fea9464 commit f6ad9a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion model/tenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ func (o *Tenant) List(db *gorm.DB, where map[string]interface{}, page *Page, key
if keywords != "" {
db = db.Where("concat (id, title, remark) like ?", "%"+keywords+"%")
}
db = db.Table(o.TableName()).Count(&total)
if page != nil {
db = FormatPage(db, page)
}
err = db.Find(&tenants).Count(&total).Error
err = db.Find(&tenants).Error
return
}

Expand Down

0 comments on commit f6ad9a8

Please sign in to comment.