|
@@ -14,21 +14,22 @@ func (u *Use) GetCustom() {
|
|
r := func() Result {
|
|
r := func() Result {
|
|
cName := func() (customName string) {
|
|
cName := func() (customName string) {
|
|
userid := qu.ObjToString(u.GetSession("userId"))
|
|
userid := qu.ObjToString(u.GetSession("userId"))
|
|
|
|
+ positionId := qu.Int64All(u.GetSession("positionId"))
|
|
t := u.GetString("type") // kf 直接返回客服 不查询客成
|
|
t := u.GetString("type") // kf 直接返回客服 不查询客成
|
|
if userid == "" || t == "kf" {
|
|
if userid == "" || t == "kf" {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
-
|
|
|
|
bigPower := jy.GetBigVipUserBaseMsg(u.Session(), *config.Middleground)
|
|
bigPower := jy.GetBigVipUserBaseMsg(u.Session(), *config.Middleground)
|
|
if (bigPower.Status <= 0 && bigPower.EntnicheStatus <= 0) || bigPower.EntName == "" {
|
|
if (bigPower.Status <= 0 && bigPower.EntnicheStatus <= 0) || bigPower.EntName == "" {
|
|
return ""
|
|
return ""
|
|
}
|
|
}
|
|
- info := db.MysqlSubject.FindOne("dwd_f_csm_customer_info", map[string]interface{}{
|
|
|
|
- "is_transfer": 1,
|
|
|
|
- "company_name": bigPower.EntName,
|
|
|
|
- }, "name", "id desc")
|
|
|
|
- if info != nil && len(*info) > 0 {
|
|
|
|
- customName = qu.ObjToString((*info)["name"])
|
|
|
|
|
|
+ res := db.MysqlSubject.SelectBySql("SELECT i.name as customer_name FROM dwd_f_data_equity_info e INNER JOIN dwd_f_crm_clue_info c on (e.uid=c.uid) INNER JOIN dwd_f_csm_customer_info i on( c.id = i.clue_id) WHERE e.position_id=? AND e.product_type in ('大会员','商机管理') AND i.is_transfer=1", positionId)
|
|
|
|
+ if res != nil || len(*res) != 0 {
|
|
|
|
+ for _, m := range *res {
|
|
|
|
+ if customName = qu.ObjToString(m["customer_name"]); customName != "" {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return
|
|
return
|
|
}()
|
|
}()
|
|
@@ -75,5 +76,8 @@ func getWxm(name string) (customEwm interface{}) {
|
|
redis.Put("other", cacheKey, rMap, -1)
|
|
redis.Put("other", cacheKey, rMap, -1)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if rMap[name] == nil {
|
|
|
|
+ return rMap[""]
|
|
|
|
+ }
|
|
return rMap[name]
|
|
return rMap[name]
|
|
}
|
|
}
|