正在显示
1 个修改的文件
包含
4 行增加
和
1 行删除
| @@ -138,8 +138,11 @@ func GetUserCompanyIdAllBy(options map[string]interface{}) (v []int64, err error | @@ -138,8 +138,11 @@ func GetUserCompanyIdAllBy(options map[string]interface{}) (v []int64, err error | ||
| 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 | } |
| 141 | + //if _, ok := options["NickName"]; ok { | ||
| 142 | + // sql += fmt.Sprintf(" and nick_name like '%%%v%%' ", options["NickName"]) | ||
| 143 | + //} | ||
| 141 | if _, ok := options["NickName"]; ok { | 144 | if _, ok := options["NickName"]; ok { |
| 142 | - sql += fmt.Sprintf(" and nick_name like '%%%v%%' ", options["NickName"]) | 145 | + sql += fmt.Sprintf(" and user_id in (select id from user where nick_name like '%%%v%%') ", options["NickName"]) |
| 143 | } | 146 | } |
| 144 | if _, err = o.Raw(sql).QueryRows(&v); err == nil { | 147 | if _, err = o.Raw(sql).QueryRows(&v); err == nil { |
| 145 | return v, nil | 148 | return v, nil |
-
请 注册 或 登录 后发表评论