正在显示
1 个修改的文件
包含
1 行增加
和
1 行删除
@@ -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 | } |
-
请 注册 或 登录 后发表评论