|
@@ -372,7 +372,7 @@ func CNode(userId string) bool {
|
|
|
rdataOne, ok := mongodb.FindOne("saleLeads", map[string]interface{}{
|
|
|
"userid": userId,
|
|
|
"source": map[string]interface{}{
|
|
|
- "$regex": "jyarticle_see3_plus",
|
|
|
+ "$regex": "article_slogan",
|
|
|
},
|
|
|
})
|
|
|
data := make(map[string]interface{})
|
|
@@ -383,28 +383,13 @@ func CNode(userId string) bool {
|
|
|
if userinfo, uok := mongodb.FindById("user", userId, `{"s_phone":1,"s_m_phone":1,"s_myemail":1,"s_company":1,"o_jy":1,"o_vipjy":1}`); userinfo != nil && uok && len(*userinfo) > 0 {
|
|
|
s_phone := util.ObjToString((*userinfo)["s_phone"])
|
|
|
phone := util.If(s_phone == "", util.ObjToString((*userinfo)["s_m_phone"]), s_phone)
|
|
|
-
|
|
|
- data["phone"] = phone
|
|
|
- mail := util.ObjToString((*userinfo)["s_myemail"])
|
|
|
- //获取邮箱 1.超级订阅邮箱、订阅邮箱、数据导出填写邮箱
|
|
|
- if mail == "" {
|
|
|
- if vipjy, _ := (*userinfo)["o_vipjy"].(map[string]interface{}); vipjy != nil && len(vipjy) > 0 {
|
|
|
- mail = util.ObjToString(vipjy["s_email"])
|
|
|
- }
|
|
|
+ if data["phone"] == "" {
|
|
|
+ data["phone"] = phone
|
|
|
}
|
|
|
- if mail == "" {
|
|
|
- if ojy, _ := (*userinfo)["o_jy"].(map[string]interface{}); ojy != nil && len(ojy) > 0 {
|
|
|
- mail = util.ObjToString(ojy["s_email"])
|
|
|
- }
|
|
|
- }
|
|
|
- if mail == "" {
|
|
|
- if list := public.Mysql.SelectBySql(`select user_mail from
|
|
|
- dataexport_order where user_id =? and user_mail IS NOT NULL order by id desc`, userId); list != nil && len(*list) > 0 {
|
|
|
- mail = util.ObjToString((*list)[0]["user_mail"])
|
|
|
- }
|
|
|
+
|
|
|
+ if data["company"] == "" {
|
|
|
+ data["company"] = util.ObjToString((*userinfo)["s_company"])
|
|
|
}
|
|
|
- data["mail"] = mail
|
|
|
- data["company"] = util.ObjToString((*userinfo)["s_company"])
|
|
|
}
|
|
|
//rM := map[string]interface{}{}
|
|
|
rdata, sok := mongodb.Find("saleLeads", map[string]interface{}{
|
|
@@ -427,13 +412,15 @@ func CNode(userId string) bool {
|
|
|
delete(data, "createtime")
|
|
|
delete(data, "client")
|
|
|
}
|
|
|
- var ss = []string{"name", "phone", "company", "position", "branch"}
|
|
|
- for _, v := range ss {
|
|
|
- if vlu, ok1 := data[v]; !ok1 || vlu == "" {
|
|
|
+
|
|
|
+ if data["name"] != "" && data["phone"] != "" && data["company"] != "" && data["position"] != "" {
|
|
|
+ if data["position"] != "总裁" && data["position"] != "总经理" && data["branch"] == "" {
|
|
|
return false
|
|
|
}
|
|
|
+ return true
|
|
|
}
|
|
|
- return true
|
|
|
+
|
|
|
+ return false
|
|
|
}
|
|
|
|
|
|
//查看公告详情次数限制
|