作者 yangfu

fix:1.机会搜索

... ... @@ -138,8 +138,11 @@ func GetUserCompanyIdAllBy(options map[string]interface{}) (v []int64, err error
if _, ok := options["CompanyId"]; ok {
sql += fmt.Sprintf(" and company_id=%v ", options["CompanyId"])
}
//if _, ok := options["NickName"]; ok {
// sql += fmt.Sprintf(" and nick_name like '%%%v%%' ", options["NickName"])
//}
if _, ok := options["NickName"]; ok {
sql += fmt.Sprintf(" and nick_name like '%%%v%%' ", options["NickName"])
sql += fmt.Sprintf(" and user_id in (select id from user where nick_name like '%%%v%%') ", options["NickName"])
}
if _, err = o.Raw(sql).QueryRows(&v); err == nil {
return v, nil
... ...