|
@@ -798,22 +798,13 @@ func processLeads(saleLeadsMap map[string]interface{}, sourceMap map[string]map[
|
|
return dataArr, endtime
|
|
return dataArr, endtime
|
|
}
|
|
}
|
|
|
|
|
|
-<<<<<<< HEAD
|
|
|
|
// 处理单个线索
|
|
// 处理单个线索
|
|
-func processLead(v map[string]interface{}, sourceMap map[string]map[string]interface{}, nowTime string, committeeTime int64, data map[string]interface{}) (map[string]interface{}, int64) {
|
|
|
|
- sources := gconv.String(v["source"])
|
|
|
|
- // 更新委员会时间
|
|
|
|
- if gconv.Int64(v["createtime"]) > committeeTime {
|
|
|
|
- committeeTime = gconv.Int64(v["createtime"])
|
|
|
|
-=======
|
|
|
|
-// 处理单个留资信息
|
|
|
|
func processLead(v map[string]interface{}, sourceMap map[string]map[string]interface{}, lastTime int64, data map[string]interface{}) (map[string]interface{}, int64) {
|
|
func processLead(v map[string]interface{}, sourceMap map[string]map[string]interface{}, lastTime int64, data map[string]interface{}) (map[string]interface{}, int64) {
|
|
|
|
+ sources := gconv.String(v["source"])
|
|
nowTime := time.Now().Format(date.Date_Full_Layout)
|
|
nowTime := time.Now().Format(date.Date_Full_Layout)
|
|
- sources := common.ObjToString(v["source"])
|
|
|
|
// 更新最后会时间
|
|
// 更新最后会时间
|
|
if gconv.Int64(v["createtime"]) > lastTime {
|
|
if gconv.Int64(v["createtime"]) > lastTime {
|
|
lastTime = gconv.Int64(v["createtime"])
|
|
lastTime = gconv.Int64(v["createtime"])
|
|
->>>>>>> master
|
|
|
|
}
|
|
}
|
|
sourceData, exist := sourceMap[sources]
|
|
sourceData, exist := sourceMap[sources]
|
|
if !exist {
|
|
if !exist {
|
|
@@ -828,16 +819,11 @@ func processLead(v map[string]interface{}, sourceMap map[string]map[string]inter
|
|
if userData == nil || isUserInBlackList(userData) {
|
|
if userData == nil || isUserInBlackList(userData) {
|
|
return nil, lastTime
|
|
return nil, lastTime
|
|
}
|
|
}
|
|
-<<<<<<< HEAD
|
|
|
|
- key := fmt.Sprintf("%s_%s_%s", sourceMap[sources], phone, gconv.String(v["interest"]))
|
|
|
|
-=======
|
|
|
|
key := fmt.Sprintf("%s_%s_%s", sources, phone, common.ObjToString(v["interest"]))
|
|
key := fmt.Sprintf("%s_%s_%s", sources, phone, common.ObjToString(v["interest"]))
|
|
->>>>>>> master
|
|
|
|
if _, exists := data[key]; exists {
|
|
if _, exists := data[key]; exists {
|
|
return nil, lastTime
|
|
return nil, lastTime
|
|
}
|
|
}
|
|
data[key] = true
|
|
data[key] = true
|
|
-
|
|
|
|
return map[string]interface{}{
|
|
return map[string]interface{}{
|
|
"createTime": nowTime,
|
|
"createTime": nowTime,
|
|
"createtime": v["createtime"],
|
|
"createtime": v["createtime"],
|
|
@@ -845,14 +831,9 @@ func processLead(v map[string]interface{}, sourceMap map[string]map[string]inter
|
|
"company": gconv.String(v["company"]),
|
|
"company": gconv.String(v["company"]),
|
|
"phone": phone,
|
|
"phone": phone,
|
|
"source": gconv.String(sourceData["name"]),
|
|
"source": gconv.String(sourceData["name"]),
|
|
-<<<<<<< HEAD
|
|
|
|
"belongTo": "咨询组/市场组", // 根据需要修改
|
|
"belongTo": "咨询组/市场组", // 根据需要修改
|
|
"interest": gconv.String(v["interest"]),
|
|
"interest": gconv.String(v["interest"]),
|
|
"data_requirement": gconv.String(v["data_requirement"]),
|
|
"data_requirement": gconv.String(v["data_requirement"]),
|
|
-=======
|
|
|
|
- "interest": common.ObjToString(v["interest"]),
|
|
|
|
- "data_requirement": common.ObjToString(v["data_requirement"]),
|
|
|
|
->>>>>>> master
|
|
|
|
"branch": v["branch"],
|
|
"branch": v["branch"],
|
|
"job": v["position"],
|
|
"job": v["position"],
|
|
"email": gconv.String(v["mail"]),
|
|
"email": gconv.String(v["mail"]),
|