Merge pull request #531 from GLYASAI/V5.1

expected 0 arguments, got 1
This commit is contained in:
barnettZQG 2019-11-04 07:08:09 -06:00 committed by GitHub
commit 3d16d353df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,7 +91,7 @@ func (t *TenantDaoImpl) GetTenantIDByName(name string) (*model.Tenants, error) {
func (t *TenantDaoImpl) GetALLTenants(query string) ([]*model.Tenants, error) { func (t *TenantDaoImpl) GetALLTenants(query string) ([]*model.Tenants, error) {
var tenants []*model.Tenants var tenants []*model.Tenants
if query != "" { if query != "" {
if err := t.DB.Where("name like '%?%'", query).Find(&tenants).Error; err != nil { if err := t.DB.Where("name like ?", "%"+query+"%").Find(&tenants).Error; err != nil {
return nil, err return nil, err
} }
} else { } else {