作者 yangfu

fix: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