作者 yangfu

搜索修改

@@ -134,7 +134,7 @@ func GetUserAllCompany(uid int64) (v []*UserCompany, err error) { @@ -134,7 +134,7 @@ func GetUserAllCompany(uid int64) (v []*UserCompany, err error) {
134 //@key CompanyId NickName 134 //@key CompanyId NickName
135 func GetUserCompanyIdAllBy(options map[string]interface{}) (v []int64, err error) { 135 func GetUserCompanyIdAllBy(options map[string]interface{}) (v []int64, err error) {
136 o := orm.NewOrm() 136 o := orm.NewOrm()
137 - sql := "select id from user_company " 137 + sql := "select id from user_company where 1=1 "
138 if _, ok := options["CompanyId"]; ok { 138 if _, ok := options["CompanyId"]; ok {
139 sql += fmt.Sprintf(" and company_id=%v ", options["CompanyId"]) 139 sql += fmt.Sprintf(" and company_id=%v ", options["CompanyId"])
140 } 140 }