mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-01 11:18:08 +08:00
commit
3d16d353df
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user