xuzhiheng 1 gadu atpakaļ
vecāks
revīzija
8c8da4bda3

BIN
.DS_Store


BIN
biddingSync/biddingSync


BIN
clueSync/.DS_Store


+ 1 - 1
clueSync/autoTask.go

@@ -283,7 +283,7 @@ func autoExitSea() {
 }
 
 func GetPositionName(seatNumber string) string {
-	data := TiDb.SelectBySql(`select name from jy_salesperson_info where status = 0 and position != 0 and seatNumber = ? limit 1`, seatNumber)
+	data := TiDb.SelectBySql(`select name from dwd_f_crm_personnel_management where resign = 0 and seat_number = ? limit 1`, seatNumber)
 	if data != nil && len(*data) > 0 {
 		return common.ObjToString((*data)[0]["name"])
 	}

BIN
clueSync/clueSync


+ 7 - 0
clueSync/config.go

@@ -112,6 +112,13 @@ type (
 			User     string `json:"user"`
 			Password string `json:"password"`
 		} `json:"mgoLog"`
+		MgoQyxy struct {
+			Address  string `json:"address"`
+			DbName   string `json:"dbName"`
+			DbSize   int    `json:"dbSize"`
+			User     string `json:"user"`
+			Password string `json:"password"`
+		} `json:"mgoQyxy"`
 		Es struct {
 			Address  string `json:"address"`
 			DbSize   int    `json:"dbSize"`

+ 7 - 0
clueSync/config.json

@@ -92,6 +92,13 @@
 		"user": "admin",
 		"password": "123456"
 	},
+	"mgoQyxy": {
+		"address": "192.168.3.206:27090",
+		"dbName": "qfw",
+		"dbSize": 20,
+		"user": "admin",
+		"password": "123456"
+	},
 	"es": {
 		"address": "http://192.168.3.206:9800",
 		"dbSize": 20,

+ 40 - 2
clueSync/everything.go

@@ -1,6 +1,7 @@
 package main
 
 import (
+	"encoding/json"
 	"fmt"
 	"log"
 	"net/url"
@@ -42,8 +43,8 @@ func everythingSync() {
 			//
 			udata := TiDb.FindOne("dwd_f_userbase_baseinfo", map[string]interface{}{"userid": user_id}, "", "")
 			if udata != nil {
-				userSource := common.IntAll((*udata)["source"])
-				if userSource == 6 {
+				userSource := common.ObjToString((*udata)["source"])
+				if userSource == "0102" {
 					continue
 				}
 			}
@@ -550,3 +551,40 @@ func eventReg() {
 	common.WriteSysConfig(&cfg)
 	log.Println("活动报名表定时任务结束")
 }
+
+func saveHlyj(belong_to, item, phone, name, sourceName, cluename, position, nowTime string, isGroup, isCommerce int) {
+	if strings.HasPrefix(belong_to, "02") && item == "eventReg" {
+		saveMap := map[string]interface{}{
+			"unique_id":      phone,
+			"phone":          phone,
+			"username":       name,
+			"source":         sourceName,
+			"status999":      "status5",
+			"company":        cluename,
+			"job":            position,
+			"belongTo":       "市场部",
+			"createTime":     nowTime,
+			"lastUpdateTime": nowTime,
+		}
+		token := getToken()
+		updateData := map[string]interface{}{
+			"dbType":       "0001",
+			"customerList": []map[string]interface{}{saveMap},
+		}
+		dataByte, _ := json.Marshal(&updateData)
+		url := `https://a1.7x24cc.com/commonInte?flag=1007&account=N000000029739&accessToken=` + token + `&json=` + url.QueryEscape(string(dataByte))
+		bs, err := doGet(url)
+		if err != nil {
+			log.Println("调用接口失败")
+		} else {
+			resMap := common.StringToMap(string(bs))
+			if resMap["success"] != nil && resMap["success"].(bool) {
+				saveMap["company_nature"] = isGroup
+				saveMap["company_verification"] = isCommerce
+				TiDbData.Insert("customer", saveMap)
+			} else {
+				log.Println("新增线索失败")
+			}
+		}
+	}
+}

+ 39 - 452
clueSync/job.go

@@ -2,10 +2,8 @@ package main
 
 import (
 	"database/sql"
-	"encoding/json"
 	"fmt"
 	"log"
-	"net/url"
 	"strings"
 	"time"
 
@@ -49,42 +47,15 @@ func orders() {
 // 新注册用户 5分钟一次
 func users() {
 	//判断节假日
-	currentTime, runOk := time.Now(), false
-	// if currentTime.Weekday() == time.Sunday || currentTime.Weekday() == time.Saturday {
-	if currentTime.Weekday() == time.Sunday {
-		isok := false
-		for k, v := range DateMap {
-			if currentTime.Format(date.Date_Short_Layout) == k && v == 2 {
-				isok = true
-			}
-		}
-		if isok {
-			runOk = true
-		}
-	} else {
-		isok := true
-		for k, v := range DateMap {
-			if currentTime.Format(date.Date_Short_Layout) == k && v == 1 {
-				isok = false
-			}
-		}
-		if isok {
-			runOk = true
-		}
-	}
+	runOk := getRunOk()
 	if !runOk {
 		log.Println("不是工作日,任务暂停")
 		return
-	} /*else {
-		if currentTime.Hour() == 17 && currentTime.Minute() > 30 {
-			log.Println("不是工作日,任务暂停")
-			return
-		}
-	}*/
+	}
 	//新用户注册后5分钟内进入线索 C
 	log.Println("新注册用户定时任务开始")
 	selectTimeEnd := cfg.LastUserId
-	sql := fmt.Sprintf(`select * from dwd_f_userbase_baseinfo where createtime > "%s" and source = 1`, selectTimeEnd)
+	sql := fmt.Sprintf(`select * from dwd_f_userbase_baseinfo where createtime > "%s" and source = "0101" and status != 2`, selectTimeEnd)
 	data := TiDb.SelectBySql(sql)
 	if data != nil && *data != nil && len(*data) > 0 {
 		for k, v := range *data {
@@ -99,152 +70,14 @@ func users() {
 	log.Println("新注册用户定时任务结束")
 }
 
-func userbase() {
-	log.Println("userbase定时任务开始")
-	selectTimeEnd := time.Unix(time.Now().Unix()-1800, 0).Format("2006-01-02 15:04:05")
-	sql := fmt.Sprintf(`select * from dwd_f_userbase_baseinfo where updatetime > "%s" and source > 0`, selectTimeEnd)
-	data := TiDb.SelectBySql(sql)
-	if data != nil && *data != nil && len(*data) > 0 {
-		for _, v := range *data {
-			phone := common.ObjToString(v["phone"])
-			uId := common.ObjToString(v["uid"])
-			userId := common.ObjToString(v["userid"])
-			registedate := common.ObjToString(v["l_registedate"])
-			name := common.ObjToString(v["name"])
-			nowTime := time.Now().Format(date.Date_Full_Layout)
-			source := common.IntAll(v["source"])
-			if phone != "" {
-				contactsData := TiDb.SelectBySql("select * from dwd_f_userbase_contacts where phone = ? and is_delete = 1", phone)
-				if contactsData == nil || len(*contactsData) == 0 {
-					contactsData2 := TiDb.SelectBySql("select * from dwd_f_userbase_contacts where baseinfo_id = ? and is_delete = 1", uId)
-					if contactsData2 != nil && len(*contactsData2) > 0 {
-						log.Println("userbase uid不为空 新增通讯录", uId)
-						TiDb.Insert("dwd_f_userbase_contacts", map[string]interface{}{
-							"status":      1,
-							"is_delete":   1,
-							"createtime":  nowTime,
-							"updatetime":  nowTime,
-							"phone":       phone,
-							"baseinfo_id": uId,
-							"SOURCE":      source,
-						})
-					} else {
-						registedates, _ := time.Parse(date.Date_Full_Layout, registedate)
-						count := TiDb.CountBySql("select count(1) as count from dwd_f_crm_clue_info where uid = ?", uId)
-						log.Println("userbase uid 线索数量 ", count)
-						log.Println("userbase uid 注册时间 ", registedates)
-						if time.Now().Unix()-registedates.Unix() > int64(cfg.RegTimes)*86400 {
-							if count == 0 {
-								// TiDb.Insert("dwd_f_crm_open_sea", map[string]interface{}{
-								// 	"clue_id":      clueId,
-								// 	"comeintime":   nowTime,
-								// 	"comeinsource": 2,
-								// })
-								clueId := TiDb.Insert("dwd_f_crm_clue_info", map[string]interface{}{
-									"userid":            userId,
-									"uid":               uId,
-									"is_assign":         0,
-									"comeintime":        nowTime,
-									"createtime":        nowTime,
-									"updatetime":        nowTime,
-									"cluename":          phone,
-									"top_cluetype":      "474",
-									"sub_cluetype":      "475",
-									"trailstatus":       "01",
-									"name":              name,
-									"phone":             phone,
-									"comeintime_open":   nowTime,
-									"comeinsource_open": 1,
-								})
-								if clueId > 0 {
-									TiDb.Insert("dwd_f_userbase_contacts", map[string]interface{}{
-										"status":      1,
-										"is_delete":   1,
-										"createtime":  nowTime,
-										"updatetime":  nowTime,
-										"phone":       phone,
-										"baseinfo_id": uId,
-										"SOURCE":      source,
-									})
-									TiDb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
-										"clue_id":     clueId,
-										"position_id": -1,
-										"change_type": "创建线索",
-										"new_value":   "系统自动创建",
-										"createtime":  nowTime,
-										"BCPCID":      common.GetRandom(32),
-										"operator_id": -1,
-									})
-								}
-							} else {
-								TiDb.Insert("dwd_f_userbase_contacts", map[string]interface{}{
-									"status":      1,
-									"is_delete":   1,
-									"createtime":  nowTime,
-									"updatetime":  nowTime,
-									"phone":       phone,
-									"baseinfo_id": uId,
-									"SOURCE":      source,
-								})
-							}
-						} else {
-							if count == 0 {
-								FormatData(v, "users")
-							} else {
-								TiDb.Insert("dwd_f_userbase_contacts", map[string]interface{}{
-									"status":      1,
-									"is_delete":   1,
-									"createtime":  nowTime,
-									"updatetime":  nowTime,
-									"phone":       phone,
-									"baseinfo_id": uId,
-									"SOURCE":      source,
-								})
-							}
-						}
-					}
-				}
-			}
-		}
-	}
-	log.Println("userbase定时任务结束")
-}
-
 // 留资 5分钟一次
 func saleLeads() {
 	//判断节假日
-	currentTime, runOk := time.Now(), false
-	// if currentTime.Weekday() == time.Sunday || currentTime.Weekday() == time.Saturday {
-	if currentTime.Weekday() == time.Sunday {
-		isok := false
-		for k, v := range DateMap {
-			if currentTime.Format(date.Date_Short_Layout) == k && v == 2 {
-				isok = true
-			}
-		}
-		if isok {
-			runOk = true
-		}
-	} else {
-		isok := true
-		for k, v := range DateMap {
-			if currentTime.Format(date.Date_Short_Layout) == k && v == 1 {
-				isok = false
-			}
-		}
-		if isok {
-			runOk = true
-		}
-	}
+	runOk := getRunOk()
 	if !runOk {
 		log.Println("不是工作日,任务暂停")
 		return
-	} /*else {
-		if currentTime.Hour() == 17 && currentTime.Minute() > 30 {
-			log.Println("不是工作日,任务暂停")
-			return
-		}
-	}*/
+	}
 	//留资后5分钟内进入线索
 	//分为免费留资和付费留资 付费B 免费C
 	log.Println("用户留资定时任务开始")
@@ -257,12 +90,9 @@ func saleLeads() {
 	if lastId != "" {
 		query["_id"] = map[string]interface{}{"$gt": mongodb.StringTOBsonId(lastId)}
 	}
-	// query["_id"] = map[string]interface{}{"$gt": mongodb.StringTOBsonId("63f6049a4c172a1fd44ed3c8")}
 	log.Println("query :", query)
-
 	iter := session.DB(cfg.Mgo.DbName).C("saleLeads").Find(&query).Sort("_id").Iter()
 	thisData := map[string]interface{}{}
-
 	for {
 		if !iter.Next(&thisData) {
 			break
@@ -273,18 +103,17 @@ func saleLeads() {
 			break
 		}
 		cfg.LastId = mongodb.BsonIdToSId(thisData["_id"])
-		// FormatData(thisData, "saleLeads")
 	}
 	common.WriteSysConfig(&cfg)
 	log.Println("用户留资定时任务结束")
 }
 
 func FormatData(data map[string]interface{}, item string) (bool, bool) {
-	userId, uId, positionId, source, cluename, phone, sourceCode, keyword := common.ObjToString(data["user_id"]), "", "", 0, "", "", "", []string{}
+	userId, uId, positionId, source, cluename, phone, sourceCode, keyword := common.ObjToString(data["user_id"]), "", "", "", "", "", "", []string{}
 	role, industry, department, departments, position, name, top_cluetype, sub_cluetype, follow_project_area, level := "", "", "", "", "", "", "", "", "", ""
 	query, topname, subname, belong_to, sourceName := map[string]interface{}{}, "", "", "01", ""
 	nowTime := time.Now().Format("2006-01-02 15:04:05")
-	if item == "orders" {
+	if item == "orders" { //订单
 		if !mongodb.IsObjectIdHex(userId) {
 			positionId = userId
 			userMapping := TiDb.FindOne("dwd_f_userbase_id_mapping", map[string]interface{}{"position_id": userId}, "", "")
@@ -296,10 +125,9 @@ func FormatData(data map[string]interface{}, item string) (bool, bool) {
 		userInfo := TiDb.FindOne("dwd_f_userbase_baseinfo", query, "", "")
 		if userInfo != nil && len(*userInfo) > 0 {
 			uId = common.ObjToString((*userInfo)["uid"])
-			source = common.IntAll((*userInfo)["source"])
+			source = common.ObjToString((*userInfo)["source"])
 			belong_to = common.ObjToString((*userInfo)["belong_to"])
 		}
-		//cluename --> company_name
 		cluename = common.ObjToString(data["company_name"])
 		phone = common.ObjToString(data["user_phone"])
 	} else if item == "message" {
@@ -312,12 +140,11 @@ func FormatData(data map[string]interface{}, item string) (bool, bool) {
 		userInfo := TiDb.FindOne("dwd_f_userbase_baseinfo", query, "", "")
 		if userInfo != nil && len(*userInfo) > 0 {
 			uId = common.ObjToString((*userInfo)["uid"])
-			source = common.IntAll((*userInfo)["source"])
+			source = common.ObjToString((*userInfo)["source"])
 			belong_to = common.ObjToString((*userInfo)["belong_to"])
-			// cluename = common.ObjToString((*userInfo)["company_name"])
 			phone = common.ObjToString((*userInfo)["phone"])
 		}
-	} else if item == "users" {
+	} else if item == "users" { //注册用户
 		userId = mongodb.BsonIdToSId(data["userid"])
 		//新用户没有uid、source要等5分钟
 		cluename = common.ObjToString(data["company_name"])
@@ -337,12 +164,11 @@ func FormatData(data map[string]interface{}, item string) (bool, bool) {
 			userInfo := TiDb.FindOne("dwd_f_userbase_baseinfo", query, "", "")
 			if userInfo != nil && len(*userInfo) > 0 {
 				uId = common.ObjToString((*userInfo)["uid"])
-				source = common.IntAll((*userInfo)["source"])
+				source = common.ObjToString((*userInfo)["source"])
 				belong_to = common.ObjToString((*userInfo)["belong_to"])
-				// userId = common.ObjToString((*userInfo)["userid"])
 			}
 		}
-	} else if item == "saleLeads" {
+	} else if item == "saleLeads" { //留资
 		userId = common.ObjToString(data["userid"])
 		if !mongodb.IsObjectIdHex(userId) {
 			positionId = userId
@@ -379,11 +205,11 @@ func FormatData(data map[string]interface{}, item string) (bool, bool) {
 		userInfo := TiDb.FindOne("dwd_f_userbase_baseinfo", query, "", "")
 		if userInfo != nil && len(*userInfo) > 0 {
 			uId = common.ObjToString((*userInfo)["uid"])
-			source = common.IntAll((*userInfo)["source"])
+			source = common.ObjToString((*userInfo)["source"])
 			belong_to = common.ObjToString((*userInfo)["belong_to"])
 			userId = common.ObjToString((*userInfo)["userid"])
 		}
-	} else if item == "eventReg" {
+	} else if item == "eventReg" { //渠道
 		userId = common.ObjToString(data["userid"])
 		cluename = common.ObjToString(data["company"])
 		phone = common.ObjToString(data["sign_phone"])
@@ -407,7 +233,7 @@ func FormatData(data map[string]interface{}, item string) (bool, bool) {
 		userInfo := TiDb.FindOne("dwd_f_userbase_baseinfo", query, "", "")
 		if userInfo != nil && len(*userInfo) > 0 {
 			uId = common.ObjToString((*userInfo)["uid"])
-			source = common.IntAll((*userInfo)["source"])
+			source = common.ObjToString((*userInfo)["source"])
 			belong_to = common.ObjToString((*userInfo)["belong_to"])
 			userId = common.ObjToString((*userInfo)["userid"])
 		}
@@ -415,45 +241,13 @@ func FormatData(data map[string]interface{}, item string) (bool, bool) {
 			role = "其他-" + role
 		}
 	}
-	//线索名称为空用手机号代替
-	if cluename == "" && item != "message" {
+	if cluename == "" && item != "message" && item != "orders" {
 		cluename = phone
 	}
-	//域外用户和内部用户和没有手机号,不存线索
-	if source == 2 || strings.HasPrefix(belong_to, "02") || source == 6 || source == 11 || phone == "" {
+	isGroup, isCommerce := GetCompanyType(cluename) //判断是否集团公司、工商库
+	if source == "0104" || strings.HasPrefix(belong_to, "02") || source == "0102" || source == "0103" || phone == "" {
 		log.Println("线索分配失败,线索过滤!!", item, source, phone, userId)
-		if strings.HasPrefix(belong_to, "02") && item == "eventReg" {
-			saveMap := map[string]interface{}{
-				"unique_id":      phone,
-				"phone":          phone,
-				"username":       name,
-				"source":         sourceName,
-				"status999":      "status5",
-				"company":        cluename,
-				"job":            position,
-				"belongTo":       "市场部",
-				"createTime":     nowTime,
-				"lastUpdateTime": nowTime,
-			}
-			token := getToken()
-			updateData := map[string]interface{}{
-				"dbType":       "0001",
-				"customerList": []map[string]interface{}{saveMap},
-			}
-			dataByte, _ := json.Marshal(&updateData)
-			url := `https://a1.7x24cc.com/commonInte?flag=1007&account=N000000029739&accessToken=` + token + `&json=` + url.QueryEscape(string(dataByte))
-			bs, err := doGet(url)
-			if err != nil {
-				log.Println("调用接口失败")
-			} else {
-				resMap := common.StringToMap(string(bs))
-				if resMap["success"] != nil && resMap["success"].(bool) {
-					TiDbData.Insert("customer", saveMap)
-				} else {
-					log.Println("新增线索失败")
-				}
-			}
-		}
+		saveHlyj(belong_to, item, phone, name, sourceName, cluename, position, nowTime, isGroup, isCommerce)
 		return true, false
 	}
 	if uId == "" {
@@ -471,8 +265,7 @@ func FormatData(data map[string]interface{}, item string) (bool, bool) {
 		log.Println("线索分配失败,线索缺少信息", item, phone, userId)
 		return false, false
 	}
-	//不是留资的要查一遍留资
-	if item == "orders" {
+	if item == "orders" { //订单没信息再查一遍留资
 		qid := positionId
 		if qid == "" {
 			qid = userId
@@ -488,10 +281,7 @@ func FormatData(data map[string]interface{}, item string) (bool, bool) {
 			name = common.ObjToString(sdata["name"])
 		}
 	}
-
-	//top_cluetype
-	top_cluetype, sub_cluetype, level, topname, subname = getClueType(item, data, sourceCode)
-	//
+	top_cluetype, sub_cluetype, level, topname, subname = getClueType(item, data, sourceCode) //查留资来源名字
 	if topname == "市场活动" && item == "saleLeads" {
 		log.Println("市场活动留资过滤 ", userId, phone)
 		return true, false
@@ -503,16 +293,13 @@ func FormatData(data map[string]interface{}, item string) (bool, bool) {
 			return true, false
 		}
 	}
-	//
-	//follow_project_area --> follow_project_monitor
-	follow_project_area = getAreaCode(userId)
-	//seatNumber position_id
-	log.Println("data +++", top_cluetype, sub_cluetype, level, follow_project_area)
+	follow_project_area = getAreaCode(userId) //关注项目区域
+	log.Println("data +++", top_cluetype, sub_cluetype, level, follow_project_area, isGroup, isCommerce)
 	if top_cluetype == "" || sub_cluetype == "" || level == "" {
 		log.Println("线索分配失败,线索过滤top_cluetype!!", item, uId, phone, userId)
 		return true, true
 	}
-	position_id, seatNumber, saleName, saleData := autoDraw(level)
+	position_id, seatNumber, saleName, saleData, pIsOk := autoDraw(level, cluename, isGroup, isCommerce)
 	log.Println("data -------", position_id, seatNumber, saleName)
 	if position_id > 0 && seatNumber != "" {
 		uCount, oks := TiDb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"uid": uId}, "", ""), true
@@ -521,13 +308,14 @@ func FormatData(data map[string]interface{}, item string) (bool, bool) {
 			if batch_import != "" && item == "users" {
 				return true, true
 			}
-			oks = UpdateClue(*uCount, saleData, item, userId, uId, top_cluetype, sub_cluetype, topname, subname, cluename, name, saleName, phone, position, department, departments, industry, follow_project_area, role, seatNumber, position_id, source, sourceCode, keyword, belong_to)
+			oks = UpdateClue(*uCount, saleData, item, userId, uId, top_cluetype, sub_cluetype, topname, subname, cluename, name, saleName, phone, position, department, departments, industry, follow_project_area, role, seatNumber, position_id, source, sourceCode, keyword, belong_to, isGroup, isCommerce, pIsOk)
 		} else {
-			oks = SaveClue(item, userId, uId, top_cluetype, sub_cluetype, topname, subname, cluename, name, saleName, phone, position, department, departments, industry, follow_project_area, role, seatNumber, position_id, source, sourceCode, keyword, belong_to)
+			oks = SaveClue(item, userId, uId, top_cluetype, sub_cluetype, topname, subname, cluename, name, saleName, phone, position, department, departments, industry, follow_project_area, role, seatNumber, position_id, source, sourceCode, keyword, belong_to, isGroup, isCommerce)
+			if oks {
+				TiDb.UpdateOrDeleteBySql(`update dwd_f_crm_clue_autodraw_record set count = count + 1 where seatNumber = ? and clue_level = ?`, seatNumber, level)
+			}
 		}
-		if oks {
-			TiDb.UpdateOrDeleteBySql(`update dwd_f_crm_clue_autodraw_record set count = count + 1 where seatNumber = ? and clue_level = ?`, seatNumber, level)
-		} else {
+		if !oks {
 			log.Println("线索分配失败!!", item, position_id, seatNumber, uId, userId, phone)
 			return false, false
 		}
@@ -535,16 +323,10 @@ func FormatData(data map[string]interface{}, item string) (bool, bool) {
 	return true, true
 }
 
-func SaveClue(item, userId, uId, top_cluetype, sub_cluetype, topname, subname, cluename, name, saleName, phone, position, department, departments, industry, follow_project_area, role, seatNumber string, positionId int64, source int, sourceCode string, keyword []string, belong_to string) bool {
+func SaveClue(item, userId, uId, top_cluetype, sub_cluetype, topname, subname, cluename, name, saleName, phone, position, department, departments, industry, follow_project_area, role, seatNumber string, positionId int64, source, sourceCode string, keyword []string, belong_to string, isGroup, isCommerce int) bool {
 	nowTime := time.Now().Format("2006-01-02 15:04:05")
 	nowTimes := time.Unix(time.Now().Unix()+3600*12, 0).Format("2006-01-02 15:04:05")
-	//
-	if strings.HasPrefix(belong_to, "03") {
-		return false
-	}
-	//
 	clueId, uodateId1, uodateId2, uodateId3, uodateId4, uodateId5, uodateId6 := int64(0), int64(0), int64(0), int64(0), int64(0), int64(0), int64(0)
-	// BCPCID := common.GetRandom(32)
 	if TiDb.ExecTx("保存线索", func(tx *sql.Tx) bool {
 		keywords := ""
 		if sourceCode == "app_xzcyh" {
@@ -555,7 +337,6 @@ func SaveClue(item, userId, uId, top_cluetype, sub_cluetype, topname, subname, c
 		if cluename == "" {
 			cluename = phone
 		}
-		//线索
 		clueId = TiDb.InsertByTx(tx, "dwd_f_crm_clue_info", map[string]interface{}{
 			"userid":               userId,
 			"uid":                  uId,
@@ -583,8 +364,9 @@ func SaveClue(item, userId, uId, top_cluetype, sub_cluetype, topname, subname, c
 			"taskstatus":           0,
 			"tasksource":           "线索自动分配" + "-" + topname + "-" + subname,
 			"business_scope":       common.If(sourceCode == "app_xzcyh", keywords, nil),
+			"company_nature":       isGroup,
+			"company_verification": isCommerce,
 		})
-		//变更记录
 		uodateId1 = TiDb.InsertByTx(tx, "dwd_f_crm_clue_change_record", map[string]interface{}{
 			"clue_id":     clueId,
 			"position_id": positionId,
@@ -668,7 +450,7 @@ func SaveClue(item, userId, uId, top_cluetype, sub_cluetype, topname, subname, c
 	}
 }
 
-func UpdateClue(data map[string]interface{}, saleData []map[string]interface{}, item, userId, uId, top_cluetype, sub_cluetype, topname, subname, cluename, name, saleName, phone, position, department, departments, industry, follow_project_area, role, seatNumber string, positionId int64, source int, sourceCode string, keyword []string, belong_to string) bool {
+func UpdateClue(data map[string]interface{}, saleData []map[string]interface{}, item, userId, uId, top_cluetype, sub_cluetype, topname, subname, cluename, name, saleName, phone, position, department, departments, industry, follow_project_area, role, seatNumber string, positionId int64, source, sourceCode string, keyword []string, belong_to string, isGroup, isCommerce int, pIsOk bool) bool {
 	nowTime := time.Now().Format("2006-01-02 15:04:05")
 	nowTimes := time.Unix(time.Now().Unix()+3600*12, 0).Format("2006-01-02 15:04:05")
 	//trailstatus = 无意向 为变更线索状态
@@ -750,6 +532,8 @@ func UpdateClue(data map[string]interface{}, saleData []map[string]interface{},
 		"userid":               userId,
 		"comeinsource_private": 2,
 		"tasksource":           "线索来源自动更新" + "-" + topname + "-" + subname,
+		"company_nature":       isGroup,
+		"company_verification": isCommerce,
 	}
 	if cluename != "" {
 		clueUpdateData["cluename"] = cluename
@@ -788,7 +572,7 @@ func UpdateClue(data map[string]interface{}, saleData []map[string]interface{},
 			}
 		}
 	}
-	if trailstatus == "00" || old_position_id == 0 || is_assign != 1 {
+	if trailstatus == "00" || old_position_id == 0 || is_assign != 1 || pIsOk {
 		if trailstatus == "00" && trailstatusTime != "" && time.Now().Unix()-trailstatusTimes.Unix() < 86400 {
 		} else {
 			clueUpdateData["seatNumber"] = seatNumber
@@ -799,7 +583,7 @@ func UpdateClue(data map[string]interface{}, saleData []map[string]interface{},
 			clueUpdateData["level_open"] = nil
 			clueUpdateData["clue_level"] = nil
 			for _, v := range saleData {
-				if common.ObjToString(data["seatNumber"]) == common.ObjToString(v["seatNumber"]) {
+				if common.ObjToString(data["seatNumber"]) == common.ObjToString(v["seat_number"]) {
 					oldsaleName = common.ObjToString(v["name"])
 				}
 			}
@@ -869,7 +653,7 @@ func UpdateClue(data map[string]interface{}, saleData []map[string]interface{},
 		//线索
 		ok = TiDb.UpdateByTx(tx, "dwd_f_crm_clue_info", map[string]interface{}{"uid": uId}, clueUpdateData)
 		//变更记录
-		if (trailstatus == "00" || old_position_id == 0) && is_assign == 1 {
+		if (trailstatus == "00" || old_position_id == 0 || pIsOk) && is_assign == 1 {
 			if trailstatus == "00" && trailstatusTime != "" && time.Now().Unix()-trailstatusTimes.Unix() < 86400 {
 			} else if old_position_id == 0 {
 				updateId1 = TiDb.InsertByTx(tx, "dwd_f_crm_clue_change_record", map[string]interface{}{
@@ -1179,200 +963,3 @@ func UpdateClue(data map[string]interface{}, saleData []map[string]interface{},
 		return false
 	}
 }
-
-func getAreaCode(userId string) (code string) {
-	followData := Base.Find("follow_project_monitor", map[string]interface{}{"s_userid": userId}, "", "", -1, -1)
-	sidArr := []string{}
-	if followData != nil && len(*followData) > 0 {
-		for _, v := range *followData {
-			infoId := common.ObjToString(v["s_id"])
-			sidArr = append(sidArr, infoId)
-		}
-	}
-	if len(sidArr) > 0 {
-		query := `{"query": {"bool": {"must": [{"terms": {"_id": ["%s"]}}],"must_not": [],"should": []}}}`
-		query = fmt.Sprintf(query, strings.Join(sidArr, `","`))
-		biddingData := Es.Get("bidding", "bidding", query)
-		if biddingData != nil && len(*biddingData) > 0 {
-			codeMap := map[string]string{}
-			codeArr := []string{}
-			for _, v := range *biddingData {
-				area := common.ObjToString(v["area"])
-				address := common.ObjToString(v["city"])
-				if address == "" {
-					address = area
-				}
-				codeMap[address] = AreaCode[address]
-			}
-			if len(codeMap) > 0 {
-				for _, v := range codeMap {
-					codeArr = append(codeArr, v)
-				}
-			}
-			if len(codeArr) > 0 {
-				code = strings.Join(codeArr, ",")
-			}
-		}
-	}
-	log.Println("code ", code)
-	return
-}
-
-func getClueType(item string, data map[string]interface{}, sourceCode string) (pcode, code, level, topname, subname string) {
-	if item == "orders" {
-		productType := common.ObjToString(data["product_type"])
-		pcode = "1"
-		level = "A"
-		topname = "提交订单未支付"
-		if productType == "VIP订阅" {
-			code = "6"
-			subname = "超级订阅"
-		} else if productType == "大会员" {
-			code = "7"
-			subname = "大会员"
-		} else if productType == "数据流量包" {
-			code = "8"
-			subname = "数据流量包"
-		} else if productType == "历史数据" {
-			code = "9"
-			subname = "数据自助导出"
-		}
-	} else if item == "users" {
-		pcode = "4"
-		code = "154"
-		level = "C"
-		topname = "新增注册"
-		subname = "新增注册用户"
-	} else if item == "message" {
-		pcode = "532"
-		code = "477"
-		level = "B"
-		topname = "其他"
-		subname = "机器人客服主动咨询"
-	} else {
-		if sourceCode != "" {
-			codeData := TiDb.FindOne("dwd_d_crm_cluetype_code", map[string]interface{}{"source": sourceCode}, "", "")
-			if codeData != nil && len(*codeData) > 0 {
-				pcode = common.ObjToString((*codeData)["pcode"])
-				code = common.ObjToString((*codeData)["code"])
-				level = common.ObjToString((*codeData)["clue_level"])
-				subname = common.ObjToString((*codeData)["name"])
-				pcodeData := TiDb.FindOne("dwd_d_crm_cluetype_code", map[string]interface{}{"code": pcode}, "", "")
-				if pcodeData != nil && len(*pcodeData) > 0 {
-					topname = common.ObjToString((*pcodeData)["name"])
-				}
-			}
-		}
-	}
-	return
-}
-
-// 获取自动分配的人
-func autoDraw(mode string) (positionId int64, seatNumber, saleName string, saleData []map[string]interface{}) {
-	query := `select * from jy_salesperson_info where`
-	if mode == "A" || mode == "B" {
-		query += ` is_complete = 1`
-	} else {
-		query += ` is_complete = 1 or is_complete = 0`
-	}
-	data := TiDb.SelectBySql(query)
-	if data != nil && len(*data) > 0 {
-		saleData = *data
-		sql := "select * from dwd_f_crm_clue_autodraw_record where clue_level = ?"
-		countData := TiDb.SelectBySql(sql, mode)
-		if countData != nil && len(*countData) > 0 {
-			for _, v := range *data {
-				//判断是否有新员工
-				isOk := false
-				for _, vv := range *countData {
-					if common.ObjToString(v["seatNumber"]) == common.ObjToString(vv["seatNumber"]) {
-						if common.IntAll(v["status"]) == 0 {
-							vv["status"] = 1
-						} else {
-							vv["status"] = 2
-						}
-						isOk = true
-					}
-				}
-				//有新员工直接分给新员工
-				if !isOk {
-					seatNumber = common.ObjToString(v["seatNumber"])
-					saleName = common.ObjToString(v["name"])
-					rData := TiDb.FindOne("dwd_f_crm_clue_autodraw_record", map[string]interface{}{"clue_level": mode}, "", "count desc")
-					TiDb.Insert("dwd_f_crm_clue_autodraw_record", map[string]interface{}{
-						"seatNumber": seatNumber,
-						"clue_level": mode,
-						"count":      common.Int64All((*rData)["count"]),
-					})
-					break
-				}
-			}
-			if seatNumber == "" {
-				res := int64(0)
-				countres := 0
-				for _, v := range *countData {
-					if common.IntAll(v["status"]) == 1 {
-						if countres == 0 {
-							res = common.Int64All(v["count"])
-							seatNumber = common.ObjToString(v["seatNumber"])
-						} else {
-							if common.Int64All(v["count"]) <= res {
-								res = common.Int64All(v["count"])
-								seatNumber = common.ObjToString(v["seatNumber"])
-							}
-						}
-						countres++
-					}
-					// if k == 0 {
-					// 	res = common.Int64All(v["count"])
-					// 	seatNumber = common.ObjToString(v["seatNumber"])
-					// } else {
-					// 	if common.Int64All(v["count"]) <= res {
-					// 		res = common.Int64All(v["count"])
-					// 		seatNumber = common.ObjToString(v["seatNumber"])
-					// 	}
-					// }
-				}
-			}
-		} else {
-			seatNumber = common.ObjToString((*data)[0]["seatNumber"])
-			saleName = common.ObjToString((*data)[0]["name"])
-			rData := TiDb.FindOne("dwd_f_crm_clue_autodraw_record", map[string]interface{}{"clue_level": mode}, "", "count asc")
-			if rData != nil && len(*rData) > 0 {
-				TiDb.Insert("dwd_f_crm_clue_autodraw_record", map[string]interface{}{
-					"seatNumber": seatNumber,
-					"clue_level": mode,
-					"count":      common.Int64All((*rData)["count"]),
-				})
-			} else {
-				TiDb.Insert("dwd_f_crm_clue_autodraw_record", map[string]interface{}{
-					"seatNumber": seatNumber,
-					"clue_level": mode,
-					"count":      0,
-				})
-			}
-		}
-		for _, v := range *data {
-			if seatNumber == common.ObjToString(v["seatNumber"]) {
-				positionId = getPositionId(common.ObjToString(v["phone"]))
-				saleName = common.ObjToString(v["name"])
-			}
-		}
-		// if positionId > 0 {
-		// 	TiDb.UpdateOrDeleteBySql(`update dwd_f_crm_clue_autodraw_record set count = count + 1 where seatNumber = ? and clue_level = ?`, seatNumber, mode)
-		// }
-	}
-	return
-}
-
-func getPositionId(phone string) (positionId int64) {
-	userData, ok := Mgo.FindOne("user", map[string]interface{}{"s_phone": phone})
-	if ok && userData != nil && len(*userData) > 0 {
-		userId := common.Int64All((*userData)["base_user_id"])
-		positionData := Base.FindOne("base_position", map[string]interface{}{"type": 1, "ent_id": 25917, "user_id": userId}, "", "") //TODO ent_id
-		if positionData != nil && len(*positionData) > 0 {
-			positionId = common.Int64All((*positionData)["id"])
-		}
-	}
-	return
-}

+ 378 - 0
clueSync/jobutil.go

@@ -0,0 +1,378 @@
+package main
+
+import (
+	"fmt"
+	"log"
+	"strings"
+	"time"
+
+	"app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/date"
+)
+
+func userbase() {
+	log.Println("userbase定时任务开始")
+	selectTimeEnd := time.Unix(time.Now().Unix()-1800, 0).Format("2006-01-02 15:04:05")
+	sql := fmt.Sprintf(`select * from dwd_f_userbase_baseinfo where updatetime > "%s" and source != "0105" and source != "0104"`, selectTimeEnd)
+	data := TiDb.SelectBySql(sql)
+	if data != nil && *data != nil && len(*data) > 0 {
+		for _, v := range *data {
+			phone := common.ObjToString(v["phone"])
+			uId := common.ObjToString(v["uid"])
+			userId := common.ObjToString(v["userid"])
+			registedate := common.ObjToString(v["l_registedate"])
+			name := common.ObjToString(v["name"])
+			nowTime := time.Now().Format(date.Date_Full_Layout)
+			source := common.ObjToString(v["source"])
+			if phone != "" {
+				contactsData := TiDb.SelectBySql("select * from dwd_f_userbase_contacts where phone = ? and is_delete = 1", phone)
+				if contactsData == nil || len(*contactsData) == 0 {
+					contactsData2 := TiDb.SelectBySql("select * from dwd_f_userbase_contacts where baseinfo_id = ? and is_delete = 1", uId)
+					if contactsData2 != nil && len(*contactsData2) > 0 {
+						log.Println("userbase uid不为空 新增通讯录", uId)
+						TiDb.Insert("dwd_f_userbase_contacts", map[string]interface{}{
+							"status":      1,
+							"is_delete":   1,
+							"createtime":  nowTime,
+							"updatetime":  nowTime,
+							"phone":       phone,
+							"baseinfo_id": uId,
+							"SOURCE":      source,
+						})
+					} else {
+						registedates, _ := time.Parse(date.Date_Full_Layout, registedate)
+						count := TiDb.CountBySql("select count(1) as count from dwd_f_crm_clue_info where uid = ?", uId)
+						log.Println("userbase uid 线索数量 ", count)
+						log.Println("userbase uid 注册时间 ", registedates)
+						if time.Now().Unix()-registedates.Unix() > int64(cfg.RegTimes)*86400 {
+							if count == 0 {
+								// TiDb.Insert("dwd_f_crm_open_sea", map[string]interface{}{
+								// 	"clue_id":      clueId,
+								// 	"comeintime":   nowTime,
+								// 	"comeinsource": 2,
+								// })
+								clueId := TiDb.Insert("dwd_f_crm_clue_info", map[string]interface{}{
+									"userid":            userId,
+									"uid":               uId,
+									"is_assign":         0,
+									"comeintime":        nowTime,
+									"createtime":        nowTime,
+									"updatetime":        nowTime,
+									"cluename":          phone,
+									"top_cluetype":      "474",
+									"sub_cluetype":      "475",
+									"trailstatus":       "01",
+									"name":              name,
+									"phone":             phone,
+									"comeintime_open":   nowTime,
+									"comeinsource_open": 1,
+								})
+								if clueId > 0 {
+									TiDb.Insert("dwd_f_userbase_contacts", map[string]interface{}{
+										"status":      1,
+										"is_delete":   1,
+										"createtime":  nowTime,
+										"updatetime":  nowTime,
+										"phone":       phone,
+										"baseinfo_id": uId,
+										"SOURCE":      source,
+									})
+									TiDb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
+										"clue_id":     clueId,
+										"position_id": -1,
+										"change_type": "创建线索",
+										"new_value":   "系统自动创建",
+										"createtime":  nowTime,
+										"BCPCID":      common.GetRandom(32),
+										"operator_id": -1,
+									})
+								}
+							} else {
+								TiDb.Insert("dwd_f_userbase_contacts", map[string]interface{}{
+									"status":      1,
+									"is_delete":   1,
+									"createtime":  nowTime,
+									"updatetime":  nowTime,
+									"phone":       phone,
+									"baseinfo_id": uId,
+									"SOURCE":      source,
+								})
+							}
+						} else {
+							if count == 0 {
+								FormatData(v, "users")
+							} else {
+								TiDb.Insert("dwd_f_userbase_contacts", map[string]interface{}{
+									"status":      1,
+									"is_delete":   1,
+									"createtime":  nowTime,
+									"updatetime":  nowTime,
+									"phone":       phone,
+									"baseinfo_id": uId,
+									"SOURCE":      source,
+								})
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+	log.Println("userbase定时任务结束")
+}
+
+func getRunOk() bool {
+	currentTime, runOk := time.Now(), false
+	if currentTime.Weekday() == time.Sunday {
+		isok := false
+		for k, v := range DateMap {
+			if currentTime.Format(date.Date_Short_Layout) == k && v == 2 {
+				isok = true
+			}
+		}
+		if isok {
+			runOk = true
+		}
+	} else {
+		isok := true
+		for k, v := range DateMap {
+			if currentTime.Format(date.Date_Short_Layout) == k && v == 1 {
+				isok = false
+			}
+		}
+		if isok {
+			runOk = true
+		}
+	}
+	return runOk
+}
+
+func getAreaCode(userId string) (code string) {
+	followData := Base.Find("follow_project_monitor", map[string]interface{}{"s_userid": userId}, "", "", -1, -1)
+	sidArr := []string{}
+	if followData != nil && len(*followData) > 0 {
+		for _, v := range *followData {
+			infoId := common.ObjToString(v["s_id"])
+			sidArr = append(sidArr, infoId)
+		}
+	}
+	if len(sidArr) > 0 {
+		query := `{"query": {"bool": {"must": [{"terms": {"_id": ["%s"]}}],"must_not": [],"should": []}}}`
+		query = fmt.Sprintf(query, strings.Join(sidArr, `","`))
+		biddingData := Es.Get("bidding", "bidding", query)
+		if biddingData != nil && len(*biddingData) > 0 {
+			codeMap := map[string]string{}
+			codeArr := []string{}
+			for _, v := range *biddingData {
+				area := common.ObjToString(v["area"])
+				address := common.ObjToString(v["city"])
+				if address == "" {
+					address = area
+				}
+				codeMap[address] = AreaCode[address]
+			}
+			if len(codeMap) > 0 {
+				for _, v := range codeMap {
+					codeArr = append(codeArr, v)
+				}
+			}
+			if len(codeArr) > 0 {
+				code = strings.Join(codeArr, ",")
+			}
+		}
+	}
+	log.Println("code ", code)
+	return
+}
+
+func getClueType(item string, data map[string]interface{}, sourceCode string) (pcode, code, level, topname, subname string) {
+	if item == "orders" {
+		productType := common.ObjToString(data["product_type"])
+		pcode = "1"
+		level = "A"
+		topname = "提交订单未支付"
+		if productType == "VIP订阅" {
+			code = "6"
+			subname = "超级订阅"
+		} else if productType == "大会员" {
+			code = "7"
+			subname = "大会员"
+		} else if productType == "数据流量包" {
+			code = "8"
+			subname = "数据流量包"
+		} else if productType == "历史数据" {
+			code = "9"
+			subname = "数据自助导出"
+		}
+	} else if item == "users" {
+		pcode = "4"
+		code = "154"
+		level = "C"
+		topname = "新增注册"
+		subname = "新增注册用户"
+	} else if item == "message" {
+		pcode = "532"
+		code = "477"
+		level = "B"
+		topname = "其他"
+		subname = "机器人客服主动咨询"
+	} else {
+		if sourceCode != "" {
+			codeData := TiDb.FindOne("dwd_d_crm_cluetype_code", map[string]interface{}{"source": sourceCode}, "", "")
+			if codeData != nil && len(*codeData) > 0 {
+				pcode = common.ObjToString((*codeData)["pcode"])
+				code = common.ObjToString((*codeData)["code"])
+				level = common.ObjToString((*codeData)["clue_level"])
+				subname = common.ObjToString((*codeData)["name"])
+				pcodeData := TiDb.FindOne("dwd_d_crm_cluetype_code", map[string]interface{}{"code": pcode}, "", "")
+				if pcodeData != nil && len(*pcodeData) > 0 {
+					topname = common.ObjToString((*pcodeData)["name"])
+				}
+			}
+		}
+	}
+	return
+}
+
+// 获取自动分配的人
+func autoDraw(mode, cluename string, isGroup, isCommerce int) (positionId int64, seatNumber, saleName string, saleData []map[string]interface{}, isOk bool) {
+	isOk = false
+	if isGroup == 0 && isCommerce == 1 {
+		cdata := TiDb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"cluename": cluename, "is_assign": 1}, "", "")
+		if cdata != nil && len(*cdata) > 0 {
+			isOk = true
+			positionId = common.Int64All((*cdata)["position_id"])
+			seatNumber = common.ObjToString((*cdata)["seatNumber"])
+			log.Println("positionId seatNumber ", positionId, seatNumber)
+			if positionId > 0 {
+				pdata := TiDb.SelectBySql(`select * from dwd_f_crm_personnel_management where seat_number is not null and seat_number != ""`)
+				if pdata != nil {
+					saleData = *pdata
+					for _, v := range *pdata {
+						resign := common.IntAll(v["resign"])
+						if seatNumber == common.ObjToString(v["seat_number"]) {
+							if resign == 1 { //离职分配
+								sdata := TiDb.SelectBySql(`SELECT b.name,b.position_id,b.seat_number from dwd_d_crm_department_level_succbi a INNER JOIN dwd_f_crm_personnel_management b on a.position_id = b.position_id where a.bi_pcode = (SELECT bi_pcode from dwd_d_crm_department_level_succbi where position_id = ?) and b.role_id = 3`, positionId)
+								if sdata != nil && len(*sdata) > 0 {
+									positionId = common.Int64All((*sdata)[0]["position_id"])
+									seatNumber = common.ObjToString((*sdata)[0]["seat_number"])
+									saleName = common.ObjToString((*sdata)[0]["name"])
+								}
+							} else {
+								saleName = common.ObjToString(v["name"])
+							}
+						}
+					}
+				}
+				return
+			}
+		}
+	}
+	query := `select * from dwd_f_crm_personnel_management where assign_type = 1 and`
+	if mode == "A" {
+		query += ` assign_level like "%A%"`
+	} else if mode == "B" {
+		query += ` assign_level like "%B%"`
+	} else {
+		query += ` assign_level like "%C%"`
+	}
+	data := TiDb.SelectBySql(query)
+	if data != nil && len(*data) > 0 {
+		saleData = *data
+		sql := "select * from dwd_f_crm_clue_autodraw_record where clue_level = ?"
+		countData := TiDb.SelectBySql(sql, mode)
+		if countData != nil && len(*countData) > 0 {
+			for _, v := range *data {
+				isOk := false //判断是否有新员工
+				for _, vv := range *countData {
+					if common.ObjToString(v["seat_number"]) == common.ObjToString(vv["seatNumber"]) {
+						if common.IntAll(v["resign"]) == 0 {
+							vv["status"] = 1
+						} else {
+							vv["status"] = 2
+						}
+						isOk = true
+					}
+				}
+				if !isOk { //有新员工直接分给新员工
+					seatNumber = common.ObjToString(v["seat_number"])
+					saleName = common.ObjToString(v["name"])
+					rData := TiDb.FindOne("dwd_f_crm_clue_autodraw_record", map[string]interface{}{"clue_level": mode}, "", "count desc")
+					TiDb.Insert("dwd_f_crm_clue_autodraw_record", map[string]interface{}{
+						"seatNumber": seatNumber,
+						"clue_level": mode,
+						"count":      common.Int64All((*rData)["count"]),
+					})
+					break
+				}
+			}
+			if seatNumber == "" {
+				res := int64(0)
+				countres := 0
+				for _, v := range *countData {
+					if common.IntAll(v["status"]) == 1 {
+						if countres == 0 {
+							res = common.Int64All(v["count"])
+							seatNumber = common.ObjToString(v["seatNumber"])
+						} else {
+							if common.Int64All(v["count"]) <= res {
+								res = common.Int64All(v["count"])
+								seatNumber = common.ObjToString(v["seatNumber"])
+							}
+						}
+						countres++
+					}
+				}
+			}
+		} else {
+			seatNumber = common.ObjToString((*data)[0]["seat_number"])
+			saleName = common.ObjToString((*data)[0]["name"])
+			rData := TiDb.FindOne("dwd_f_crm_clue_autodraw_record", map[string]interface{}{"clue_level": mode}, "", "count desc")
+			if rData != nil && len(*rData) > 0 {
+				TiDb.Insert("dwd_f_crm_clue_autodraw_record", map[string]interface{}{
+					"seatNumber": seatNumber,
+					"clue_level": mode,
+					"count":      common.Int64All((*rData)["count"]),
+				})
+			} else {
+				TiDb.Insert("dwd_f_crm_clue_autodraw_record", map[string]interface{}{
+					"seatNumber": seatNumber,
+					"clue_level": mode,
+					"count":      0,
+				})
+			}
+		}
+		for _, v := range *data {
+			if seatNumber == common.ObjToString(v["seat_number"]) {
+				positionId = common.Int64All(v["position_id"])
+				saleName = common.ObjToString(v["name"])
+			}
+		}
+	}
+	return
+}
+
+func getPositionId(phone string) (positionId int64) {
+	userData, ok := Mgo.FindOne("user", map[string]interface{}{"s_phone": phone})
+	if ok && userData != nil && len(*userData) > 0 {
+		userId := common.Int64All((*userData)["base_user_id"])
+		positionData := Base.FindOne("base_position", map[string]interface{}{"type": 1, "ent_id": 25917, "user_id": userId}, "", "") //TODO ent_id
+		if positionData != nil && len(*positionData) > 0 {
+			positionId = common.Int64All((*positionData)["id"])
+		}
+	}
+	return
+}
+
+func GetCompanyType(companyName string) (int, int) {
+	//是否是集团
+	isGroup, isCommerce := 0, 0
+	if c := TiDb.CountBySql(`select count(1) from group_company_name where company_name=?`, companyName); c > 0 {
+		isGroup = 1
+	}
+	//是否在工商库
+	if c := MgoQyxy.Count("qyxy_std", map[string]interface{}{"company_name": companyName}); c > 0 {
+		isCommerce = 1
+	}
+	return isGroup, isCommerce
+}

+ 385 - 0
clueSync/jylog/2024_01_11_18_15_37.log

@@ -0,0 +1,385 @@
+2024/01/11 18:15:37 cfg  &{0 */30 * * * ? 0 */5 9,10,11,12,13,14,15,16,17 * * ? 0 30 8 * * ? 0 0 0 */1 * ?  0 */5 * * * ? 0 */10 * * * ? 0 */10 * * * ? 172508  644101e58b6d74a60a09aec7 6440faf7bd4ea1862af84c56 2023-04-25 00:00:00 2023-04-25 00:00:00 64473e36c572141d78ec7a03     1 1000 7 192.168.3.206:1712 {127.0.0.1 4001 Jianyu_subjectdb root Tibi#20211222 20 40 40} {127.0.0.1 4001 Call_Accounting root Tibi#20211222 20 40 40} {192.168.3.149 4000 Jianyu_subjectdb root Tibi#20211222 20 40 40} {192.168.3.149 4000 base_service root Tibi#20211222 20 40 40} {127.0.0.1 4001 thirdparty root Tibi#20211222 20 40 40} { 0    0 0 0} {192.168.3.149 4000 jianyu root Tibi#20211222 20 40 40} {192.168.3.206:27080 qfw 20} {192.168.3.206:27090 qfw 20 admin 123456} {http://192.168.3.206:9800 20 v7  }}
+2024/01/11 18:15:37 dial tcp 192.168.3.149:4000: connect: connection refused
+2024/01/11 18:15:37 dial tcp :0: connect: can't assign requested address
+2024/01/11 18:15:37 dial tcp 192.168.3.149:4000: connect: connection refused
+2024/01/11 18:15:37 dial tcp 192.168.3.149:4000: connect: connection refused
+2024/01/11 18:15:37 select * from d_area_code []
+2024/01/11 18:15:38 AreaCodeLen  3327
+2024/01/11 18:15:38 CodeAreaLen  3365
+2024/01/11 18:15:38 select * from dwd_d_crm_trailstatus_code []
+2024/01/11 18:15:38 select * from holiday_records []
+2024/01/11 18:15:38 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15289877475]
+2024/01/11 18:15:38 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [da3684dee69211ed972200163e3214c2]
+2024/01/11 18:15:38 第 1 条已有线索 15289877475 da3684dee69211ed972200163e3214c2
+2024/01/11 18:15:38 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15395023131]
+2024/01/11 18:15:38 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13022550866]
+2024/01/11 18:15:38 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [af3b0fe0e7e911edb72c00163e3214c2]
+2024/01/11 18:15:38 第 3 条已有线索 13022550866 af3b0fe0e7e911edb72c00163e3214c2
+2024/01/11 18:15:38 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18819321596]
+2024/01/11 18:15:38 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [c562957ce69511ed972200163e3214c2]
+2024/01/11 18:15:38 第 4 条已有线索 18819321596 c562957ce69511ed972200163e3214c2
+2024/01/11 18:15:38 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18928430779]
+2024/01/11 18:15:38 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13121282299]
+2024/01/11 18:15:38 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [1b19a0cce69c11ed972200163e3214c2]
+2024/01/11 18:15:38 第 6 条已有线索 13121282299 1b19a0cce69c11ed972200163e3214c2
+2024/01/11 18:15:38 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13930846687]
+2024/01/11 18:15:38 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [3b5b19bae69c11ed972200163e3214c2]
+2024/01/11 18:15:39 第 7 条已有线索 13930846687 3b5b19bae69c11ed972200163e3214c2
+2024/01/11 18:15:39 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18072812861]
+2024/01/11 18:15:39 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [5ca3e232e69c11ed972200163e3214c2]
+2024/01/11 18:15:39 第 8 条已有线索 18072812861 5ca3e232e69c11ed972200163e3214c2
+2024/01/11 18:15:39 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18695934666]
+2024/01/11 18:15:39 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18547776839]
+2024/01/11 18:15:39 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15566539185]
+2024/01/11 18:15:39 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [7d3c99dae69c11ed972200163e3214c2]
+2024/01/11 18:15:39 第 11 条已有线索 15566539185 7d3c99dae69c11ed972200163e3214c2
+2024/01/11 18:15:39 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18842685561]
+2024/01/11 18:15:39 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [8510cecee69c11ed972200163e3214c2]
+2024/01/11 18:15:39 第 12 条已有线索 18842685561 8510cecee69c11ed972200163e3214c2
+2024/01/11 18:15:39 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15037111167]
+2024/01/11 18:15:39 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [862efed4e69c11ed972200163e3214c2]
+2024/01/11 18:15:39 第 13 条已有线索 15037111167 862efed4e69c11ed972200163e3214c2
+2024/01/11 18:15:39 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18729281990]
+2024/01/11 18:15:39 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18717301387]
+2024/01/11 18:15:39 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [9fff9a30e69c11ed972200163e3214c2]
+2024/01/11 18:15:39 第 15 条已有线索 18717301387 9fff9a30e69c11ed972200163e3214c2
+2024/01/11 18:15:39 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18122995025]
+2024/01/11 18:15:39 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [9e8c0062e69c11ed972200163e3214c2]
+2024/01/11 18:15:39 第 16 条已有线索 18122995025 9e8c0062e69c11ed972200163e3214c2
+2024/01/11 18:15:39 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15550007486]
+2024/01/11 18:15:39 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [a349a8cae69c11ed972200163e3214c2]
+2024/01/11 18:15:39 第 17 条已有线索 15550007486 a349a8cae69c11ed972200163e3214c2
+2024/01/11 18:15:39 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13165521174]
+2024/01/11 18:15:39 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [d2e46738e69611ed972200163e3214c2]
+2024/01/11 18:15:39 第 18 条已有线索 13165521174 d2e46738e69611ed972200163e3214c2
+2024/01/11 18:15:39 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13520999567]
+2024/01/11 18:15:39 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [8119aad0874f11ee9adf00163e3214c2]
+2024/01/11 18:15:39 第 19 条已有线索 13520999567 8119aad0874f11ee9adf00163e3214c2
+2024/01/11 18:15:39 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15853182692]
+2024/01/11 18:15:39 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [19977137713]
+2024/01/11 18:15:39 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [119c373765ec40fc99315667677a01a8]
+2024/01/11 18:15:40 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [119c373765ec40fc99315667677a01a8]
+2024/01/11 18:15:40 mysql INSERT INTO dwd_f_crm_clue_info (name,phone,task_time,tasktime,userid,position_id,trailstatus,cluename,top_cluetype,seatNumber,comeintime,updatetime,comeinsource_private,is_task,taskstatus,uid,createtime,position,is_assign,sub_cluetype) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [曾总 19977137713 2024-01-11 18:15:38 2024-01-11 18:15:38 658a40d31c233d98a740e08c 1205321180 05 广西荣正信息 4 2646 2024-01-11 18:15:38 2024-01-11 18:15:38 2 1 0 119c373765ec40fc99315667677a01a8 2024-01-11 18:15:38  1 154]
+2024/01/11 18:15:40 第 21 条保存成功 19977137713 119c373765ec40fc99315667677a01a8
+2024/01/11 18:15:40 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [16631702171]
+2024/01/11 18:15:40 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [2e9671f8d2674ef090a4b50042b614d1]
+2024/01/11 18:15:40 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [2e9671f8d2674ef090a4b50042b614d1]
+2024/01/11 18:15:40 mysql INSERT INTO dwd_f_crm_clue_info (uid,seatNumber,comeintime,createtime,task_time,position_id,updatetime,name,phone,comeinsource_private,is_task,taskstatus,is_assign,cluename,top_cluetype,trailstatus,userid,sub_cluetype,position,tasktime) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [2e9671f8d2674ef090a4b50042b614d1 2646 2024-01-11 18:15:38 2024-01-11 18:15:38 2024-01-11 18:15:38 1205321180 2024-01-11 18:15:38 冯总 16631702171 2 1 0 1 荣丰环氧乙烷灭菌器厂 4 05  154  2024-01-11 18:15:38]
+2024/01/11 18:15:40 第 22 条保存成功 16631702171 2e9671f8d2674ef090a4b50042b614d1
+2024/01/11 18:15:40 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15056923580]
+2024/01/11 18:15:40 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [65fa73b6e67c11ed972200163e3214c2]
+2024/01/11 18:15:40 第 23 条已有线索 15056923580 65fa73b6e67c11ed972200163e3214c2
+2024/01/11 18:15:40 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13901480123]
+2024/01/11 18:15:40 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [3494a944883511eeb9a100163e3214c2]
+2024/01/11 18:15:40 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [3494a944883511eeb9a100163e3214c2]
+2024/01/11 18:15:40 mysql INSERT INTO dwd_f_crm_clue_info (seatNumber,tasktime,userid,position_id,top_cluetype,sub_cluetype,trailstatus,name,is_task,uid,is_assign,createtime,updatetime,phone,comeinsource_private,taskstatus,comeintime,cluename,position,task_time) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [8050 2024-01-11 18:15:38  1205321184 4 154 05 巫董 1 3494a944883511eeb9a100163e3214c2 1 2024-01-11 18:15:38 2024-01-11 18:15:38 13901480123 2 0 2024-01-11 18:15:38 南通市建筑设计研究院有限公司  2024-01-11 18:15:38]
+2024/01/11 18:15:40 第 24 条保存成功 13901480123 3494a944883511eeb9a100163e3214c2
+2024/01/11 18:15:40 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13922868104]
+2024/01/11 18:15:40 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [ecbcfd68e69c11ed972200163e3214c2]
+2024/01/11 18:15:40 第 25 条已有线索 13922868104 ecbcfd68e69c11ed972200163e3214c2
+2024/01/11 18:15:40 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15891300085]
+2024/01/11 18:15:40 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [fe1266f2e69c11ed972200163e3214c2]
+2024/01/11 18:15:40 第 26 条已有线索 15891300085 fe1266f2e69c11ed972200163e3214c2
+2024/01/11 18:15:40 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15666828666]
+2024/01/11 18:15:40 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [a9f193c2883611eeb9a100163e3214c2]
+2024/01/11 18:15:40 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [a9f193c2883611eeb9a100163e3214c2]
+2024/01/11 18:15:40 mysql INSERT INTO dwd_f_crm_clue_info (is_assign,updatetime,cluename,top_cluetype,sub_cluetype,taskstatus,userid,comeintime,is_task,task_time,uid,position_id,createtime,trailstatus,name,position,tasktime,seatNumber,comeinsource_private,phone) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [1 2024-01-11 18:15:38 南京新中安物联技术股份有限公司 4 154 0  2024-01-11 18:15:38 1 2024-01-11 18:15:38 a9f193c2883611eeb9a100163e3214c2 1205321184 2024-01-11 18:15:38 05 王总  2024-01-11 18:15:38 8050 2 15666828666]
+2024/01/11 18:15:40 第 27 条保存成功 15666828666 a9f193c2883611eeb9a100163e3214c2
+2024/01/11 18:15:40 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15721427815]
+2024/01/11 18:15:41 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15251765786]
+2024/01/11 18:15:41 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [f33e1d34eb1511ed9d8000163e3214c2]
+2024/01/11 18:15:41 第 29 条已有线索 15251765786 f33e1d34eb1511ed9d8000163e3214c2
+2024/01/11 18:15:41 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13862883200]
+2024/01/11 18:15:41 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [e4edff10a94c11eeb73800163e3214c2]
+2024/01/11 18:15:41 第 30 条已有线索 13862883200 e4edff10a94c11eeb73800163e3214c2
+2024/01/11 18:15:41 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18994004258]
+2024/01/11 18:15:41 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [4d270864ebb711ed8f5f00163e3214c2]
+2024/01/11 18:15:41 第 31 条已有线索 18994004258 4d270864ebb711ed8f5f00163e3214c2
+2024/01/11 18:15:41 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15395815401]
+2024/01/11 18:15:41 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13981818512]
+2024/01/11 18:15:41 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [2e091d5ae68511ed972200163e3214c2]
+2024/01/11 18:15:41 第 33 条已有线索 13981818512 2e091d5ae68511ed972200163e3214c2
+2024/01/11 18:15:41 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18245145622]
+2024/01/11 18:15:41 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [7c636dc8e69b11ed972200163e3214c2]
+2024/01/11 18:15:41 第 34 条已有线索 18245145622 7c636dc8e69b11ed972200163e3214c2
+2024/01/11 18:15:41 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18858119136]
+2024/01/11 18:15:41 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [9a056024f46611edb3f800163e3214c2]
+2024/01/11 18:15:41 第 35 条已有线索 18858119136 9a056024f46611edb3f800163e3214c2
+2024/01/11 18:15:41 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13330505020]
+2024/01/11 18:15:41 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [253253bce69011ed972200163e3214c2]
+2024/01/11 18:15:41 第 36 条已有线索 13330505020 253253bce69011ed972200163e3214c2
+2024/01/11 18:15:41 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13986241350]
+2024/01/11 18:15:41 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [d751be387ebc11eea5bf00163e3214c2]
+2024/01/11 18:15:41 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [d751be387ebc11eea5bf00163e3214c2]
+2024/01/11 18:15:41 mysql INSERT INTO dwd_f_crm_clue_info (userid,uid,comeintime,position,task_time,is_assign,updatetime,cluename,trailstatus,name,phone,is_task,seatNumber,comeinsource_private,position_id,createtime,top_cluetype,sub_cluetype,tasktime,taskstatus) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [654c64e693bf31ff0ee0ad79 d751be387ebc11eea5bf00163e3214c2 2024-01-11 18:15:38  2024-01-11 18:15:38 1 2024-01-11 18:15:38 中信建筑设计研究总院有限公司 05  13986241350 1 2646 2 1205321180 2024-01-11 18:15:38 4 154 2024-01-11 18:15:38 0]
+2024/01/11 18:15:41 第 37 条保存成功 13986241350 d751be387ebc11eea5bf00163e3214c2
+2024/01/11 18:15:41 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18033444710]
+2024/01/11 18:15:41 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [9379633a883711eeb9a100163e3214c2]
+2024/01/11 18:15:41 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [9379633a883711eeb9a100163e3214c2]
+2024/01/11 18:15:41 mysql INSERT INTO dwd_f_crm_clue_info (sub_cluetype,trailstatus,userid,seatNumber,is_assign,top_cluetype,comeinsource_private,task_time,taskstatus,uid,position_id,cluename,name,phone,position,is_task,comeintime,createtime,updatetime,tasktime) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [154 05  8050 1 4 2 2024-01-11 18:15:38 0 9379633a883711eeb9a100163e3214c2 1205321184 浙江普联  18033444710  1 2024-01-11 18:15:38 2024-01-11 18:15:38 2024-01-11 18:15:38 2024-01-11 18:15:38]
+2024/01/11 18:15:42 第 38 条保存成功 18033444710 9379633a883711eeb9a100163e3214c2
+2024/01/11 18:15:42 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18670707523]
+2024/01/11 18:15:42 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [3168a508ff7411ed974c00163e3214c2]
+2024/01/11 18:15:42 第 39 条已有线索 18670707523 3168a508ff7411ed974c00163e3214c2
+2024/01/11 18:15:42 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18100177200]
+2024/01/11 18:15:42 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [438f372c13f311eeb3ca00163e3214c2]
+2024/01/11 18:15:42 第 40 条已有线索 18100177200 438f372c13f311eeb3ca00163e3214c2
+2024/01/11 18:15:42 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13386380742]
+2024/01/11 18:15:42 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [3e6423da0b1e11eea57800163e3214c2]
+2024/01/11 18:15:42 第 41 条已有线索 13386380742 3e6423da0b1e11eea57800163e3214c2
+2024/01/11 18:15:42 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13755011761]
+2024/01/11 18:15:42 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [6be1b8cb2f694565909ad486e7494810]
+2024/01/11 18:15:42 第 42 条已有线索 13755011761 6be1b8cb2f694565909ad486e7494810
+2024/01/11 18:15:42 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18537129721]
+2024/01/11 18:15:42 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [331138b056a511eeaf7900163e3214c2]
+2024/01/11 18:15:42 第 43 条已有线索 18537129721 331138b056a511eeaf7900163e3214c2
+2024/01/11 18:15:42 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15010699626]
+2024/01/11 18:15:42 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15812490149]
+2024/01/11 18:15:42 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [6efea5d4e68d11ed972200163e3214c2]
+2024/01/11 18:15:42 第 45 条已有线索 15812490149 6efea5d4e68d11ed972200163e3214c2
+2024/01/11 18:15:42 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15662132046]
+2024/01/11 18:15:42 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13120834933]
+2024/01/11 18:15:42 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [52caa0ea521511ee999100163e3214c2]
+2024/01/11 18:15:42 第 47 条已有线索 13120834933 52caa0ea521511ee999100163e3214c2
+2024/01/11 18:15:42 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13928704891]
+2024/01/11 18:15:42 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [cf74afce2c4911ee9f9e00163e3214c2]
+2024/01/11 18:15:42 第 48 条已有线索 13928704891 cf74afce2c4911ee9f9e00163e3214c2
+2024/01/11 18:15:42 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15850538701]
+2024/01/11 18:15:42 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [ba3e7180e68511ed972200163e3214c2]
+2024/01/11 18:15:42 第 49 条已有线索 15850538701 ba3e7180e68511ed972200163e3214c2
+2024/01/11 18:15:42 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15639937163]
+2024/01/11 18:15:42 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [fe765862e69a11ed972200163e3214c2]
+2024/01/11 18:15:42 第 50 条已有线索 15639937163 fe765862e69a11ed972200163e3214c2
+2024/01/11 18:15:42 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [19962041193]
+2024/01/11 18:15:43 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [3421ca2a7e1511eebbe500163e3214c2]
+2024/01/11 18:15:43 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [3421ca2a7e1511eebbe500163e3214c2]
+2024/01/11 18:15:43 mysql INSERT INTO dwd_f_crm_clue_info (is_assign,position,taskstatus,userid,position_id,updatetime,trailstatus,comeinsource_private,is_task,task_time,uid,comeintime,sub_cluetype,name,phone,seatNumber,createtime,tasktime,cluename,top_cluetype) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [1 经理 0 654b4b4132268020e21ae831 1205321184 2024-01-11 18:15:38 05 2 1 2024-01-11 18:15:38 3421ca2a7e1511eebbe500163e3214c2 2024-01-11 18:15:38 154  19962041193 8050 2024-01-11 18:15:38 2024-01-11 18:15:38 南京柯麦道智能系统有限公司 4]
+2024/01/11 18:15:43 第 51 条保存成功 19962041193 3421ca2a7e1511eebbe500163e3214c2
+2024/01/11 18:15:43 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13261123732]
+2024/01/11 18:15:43 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [cca78bee84f611eea31f00163e3214c2]
+2024/01/11 18:15:43 第 52 条已有线索 13261123732 cca78bee84f611eea31f00163e3214c2
+2024/01/11 18:15:43 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15956987339]
+2024/01/11 18:15:43 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [4238939c8d2d11ee9b8900163e3214c2]
+2024/01/11 18:15:43 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [4238939c8d2d11ee9b8900163e3214c2]
+2024/01/11 18:15:43 mysql INSERT INTO dwd_f_crm_clue_info (position_id,is_assign,top_cluetype,is_task,seatNumber,createtime,phone,position,tasktime,taskstatus,comeintime,name,comeinsource_private,sub_cluetype,uid,updatetime,cluename,trailstatus,task_time,userid) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [1205321180 1 4 1 2646 2024-01-11 18:15:38 15956987339 主管 2024-01-11 18:15:38 0 2024-01-11 18:15:38  2 154 4238939c8d2d11ee9b8900163e3214c2 2024-01-11 18:15:38 安徽绿和农业科技有限公司 05 2024-01-11 18:15:38 65649e34bacb8f689b006da6]
+2024/01/11 18:15:43 第 53 条保存成功 15956987339 4238939c8d2d11ee9b8900163e3214c2
+2024/01/11 18:15:43 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13717024177]
+2024/01/11 18:15:43 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [05ea227c94d811ee802700163e3214c2]
+2024/01/11 18:15:43 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [05ea227c94d811ee802700163e3214c2]
+2024/01/11 18:15:43 mysql INSERT INTO dwd_f_crm_clue_info (task_time,tasktime,userid,uid,is_assign,updatetime,position,taskstatus,seatNumber,position_id,comeintime,sub_cluetype,comeinsource_private,is_task,trailstatus,name,phone,createtime,cluename,top_cluetype) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [2024-01-11 18:15:38 2024-01-11 18:15:38 65717a07491bbede71d175d9 05ea227c94d811ee802700163e3214c2 1 2024-01-11 18:15:38  0 8050 1205321184 2024-01-11 18:15:38 154 2 1 05  13717024177 2024-01-11 18:15:38 深圳市贝斯达医疗股份有限公司 4]
+2024/01/11 18:15:43 第 54 条保存成功 13717024177 05ea227c94d811ee802700163e3214c2
+2024/01/11 18:15:43 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [16600050902]
+2024/01/11 18:15:43 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18626869858]
+2024/01/11 18:15:43 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [54dacdf43d9f11eea77c00163e3214c2]
+2024/01/11 18:15:43 第 56 条已有线索 18626869858 54dacdf43d9f11eea77c00163e3214c2
+2024/01/11 18:15:43 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13651136323]
+2024/01/11 18:15:43 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [e4f9a3ae883311eeb9a100163e3214c2]
+2024/01/11 18:15:43 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [e4f9a3ae883311eeb9a100163e3214c2]
+2024/01/11 18:15:43 mysql INSERT INTO dwd_f_crm_clue_info (top_cluetype,comeinsource_private,task_time,seatNumber,position_id,comeintime,cluename,name,phone,position,is_task,userid,is_assign,createtime,taskstatus,updatetime,sub_cluetype,tasktime,uid,trailstatus) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [4 2 2024-01-11 18:15:38 8050 1205321184 2024-01-11 18:15:38 北京笔中文化科技产业集团有限公司  13651136323  1  1 2024-01-11 18:15:38 0 2024-01-11 18:15:38 154 2024-01-11 18:15:38 e4f9a3ae883311eeb9a100163e3214c2 08]
+2024/01/11 18:15:43 第 57 条保存成功 13651136323 e4f9a3ae883311eeb9a100163e3214c2
+2024/01/11 18:15:43 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18291004324]
+2024/01/11 18:15:43 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [eb063038883711eeb9a100163e3214c2]
+2024/01/11 18:15:43 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [eb063038883711eeb9a100163e3214c2]
+2024/01/11 18:15:44 mysql INSERT INTO dwd_f_crm_clue_info (trailstatus,comeinsource_private,tasktime,userid,uid,seatNumber,top_cluetype,sub_cluetype,taskstatus,createtime,updatetime,name,position,task_time,position_id,phone,is_task,is_assign,comeintime,cluename) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [05 2 2024-01-11 18:15:38  eb063038883711eeb9a100163e3214c2 2646 4 154 0 2024-01-11 18:15:38 2024-01-11 18:15:38 刘经理  2024-01-11 18:15:38 1205321180 18291004324 1 1 2024-01-11 18:15:38 优特斯智能控制(西安)有限公司]
+2024/01/11 18:15:44 第 58 条保存成功 18291004324 eb063038883711eeb9a100163e3214c2
+2024/01/11 18:15:44 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18038046148]
+2024/01/11 18:15:44 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15850747647]
+2024/01/11 18:15:44 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [8bc9f4eb667b4bcd857391c4d47f0de3]
+2024/01/11 18:15:44 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [8bc9f4eb667b4bcd857391c4d47f0de3]
+2024/01/11 18:15:44 mysql INSERT INTO dwd_f_crm_clue_info (top_cluetype,comeinsource_private,is_task,userid,uid,position_id,updatetime,createtime,position,name,phone,tasktime,sub_cluetype,trailstatus,task_time,taskstatus,seatNumber,is_assign,comeintime,cluename) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [4 2 1  8bc9f4eb667b4bcd857391c4d47f0de3 1205321180 2024-01-11 18:15:38 2024-01-11 18:15:38  张坤 15850747647 2024-01-11 18:15:38 154 05 2024-01-11 18:15:38 0 2646 1 2024-01-11 18:15:38 成奥声光]
+2024/01/11 18:15:44 第 60 条保存成功 15850747647 8bc9f4eb667b4bcd857391c4d47f0de3
+2024/01/11 18:15:44 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15389825275]
+2024/01/11 18:15:44 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [08205942b16148cc80076d4e27e7f311]
+2024/01/11 18:15:44 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [08205942b16148cc80076d4e27e7f311]
+2024/01/11 18:15:44 mysql INSERT INTO dwd_f_crm_clue_info (comeinsource_private,position_id,is_assign,top_cluetype,cluename,phone,uid,seatNumber,comeintime,task_time,tasktime,userid,createtime,name,position,is_task,taskstatus,updatetime,sub_cluetype,trailstatus) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [2 1205321180 1 4  伊利集团 15389825275 08205942b16148cc80076d4e27e7f311 2646 2024-01-11 18:15:38 2024-01-11 18:15:38 2024-01-11 18:15:38 6593c959975d3b1630832636 2024-01-11 18:15:38 孙雪彤  1 0 2024-01-11 18:15:38 154 05]
+2024/01/11 18:15:44 第 61 条保存成功 15389825275 08205942b16148cc80076d4e27e7f311
+2024/01/11 18:15:44 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15912533198]
+2024/01/11 18:15:44 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [95b544e2390c40018d2851e5cfe25683]
+2024/01/11 18:15:44 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [95b544e2390c40018d2851e5cfe25683]
+2024/01/11 18:15:44 mysql INSERT INTO dwd_f_crm_clue_info (userid,comeintime,createtime,updatetime,trailstatus,is_task,tasktime,position_id,is_assign,sub_cluetype,seatNumber,position,uid,cluename,top_cluetype,name,phone,comeinsource_private,task_time,taskstatus) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [ 2024-01-11 18:15:38 2024-01-11 18:15:38 2024-01-11 18:15:38 05 1 2024-01-11 18:15:38 1205321180 1 154 2646  95b544e2390c40018d2851e5cfe25683 昆明晨彩 4 李经理 15912533198 2 2024-01-11 18:15:38 0]
+2024/01/11 18:15:44 第 62 条保存成功 15912533198 95b544e2390c40018d2851e5cfe25683
+2024/01/11 18:15:44 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18673163888]
+2024/01/11 18:15:44 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [7719e8bfa8e24517ad00adfe6574dcdb]
+2024/01/11 18:15:44 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [7719e8bfa8e24517ad00adfe6574dcdb]
+2024/01/11 18:15:44 mysql INSERT INTO dwd_f_crm_clue_info (position_id,top_cluetype,is_task,cluename,trailstatus,position,userid,uid,seatNumber,is_assign,createtime,taskstatus,comeintime,sub_cluetype,phone,tasktime,updatetime,name,comeinsource_private,task_time) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [1205321180 4 1 湖南网型网秀大数据科技有限公司 08   7719e8bfa8e24517ad00adfe6574dcdb 2646 1 2024-01-11 18:15:38 0 2024-01-11 18:15:38 154 18673163888 2024-01-11 18:15:38 2024-01-11 18:15:38  2 2024-01-11 18:15:38]
+2024/01/11 18:15:44 第 63 条保存成功 18673163888 7719e8bfa8e24517ad00adfe6574dcdb
+2024/01/11 18:15:44 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15120078020]
+2024/01/11 18:15:44 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [a8e2f7e488714d73b0c3794f2e25f5ab]
+2024/01/11 18:15:44 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [a8e2f7e488714d73b0c3794f2e25f5ab]
+2024/01/11 18:15:44 mysql INSERT INTO dwd_f_crm_clue_info (name,updatetime,sub_cluetype,phone,comeinsource_private,userid,cluename,position,is_task,tasktime,position_id,top_cluetype,is_assign,comeintime,createtime,trailstatus,task_time,taskstatus,uid,seatNumber) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [陈总 2024-01-11 18:15:38 154 15120078020 2  北京环安工程检测有限责任公司  1 2024-01-11 18:15:38 1205321180 4 1 2024-01-11 18:15:38 2024-01-11 18:15:38 05 2024-01-11 18:15:38 0 a8e2f7e488714d73b0c3794f2e25f5ab 2646]
+2024/01/11 18:15:45 第 64 条保存成功 15120078020 a8e2f7e488714d73b0c3794f2e25f5ab
+2024/01/11 18:15:45 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13361475500]
+2024/01/11 18:15:45 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [40627605034f4080881b4321163d5f2a]
+2024/01/11 18:15:45 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [40627605034f4080881b4321163d5f2a]
+2024/01/11 18:15:45 mysql INSERT INTO dwd_f_crm_clue_info (position,tasktime,uid,position_id,is_assign,comeintime,trailstatus,seatNumber,top_cluetype,comeinsource_private,is_task,createtime,cluename,sub_cluetype,name,phone,userid,updatetime,task_time,taskstatus) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [ 2024-01-11 18:15:38 40627605034f4080881b4321163d5f2a 1205321180 1 2024-01-11 18:15:38 05 2646 4 2 1 2024-01-11 18:15:38 洛恒化工 154 李 13361475500  2024-01-11 18:15:38 2024-01-11 18:15:38 0]
+2024/01/11 18:15:45 第 65 条保存成功 13361475500 40627605034f4080881b4321163d5f2a
+2024/01/11 18:15:45 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15338896792]
+2024/01/11 18:15:45 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [421b5aa8a8154546bacaafd3b3aea3cc]
+2024/01/11 18:15:45 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [421b5aa8a8154546bacaafd3b3aea3cc]
+2024/01/11 18:15:45 mysql INSERT INTO dwd_f_crm_clue_info (position,comeinsource_private,tasktime,is_assign,updatetime,sub_cluetype,top_cluetype,name,phone,position_id,createtime,cluename,taskstatus,uid,comeintime,task_time,is_task,userid,seatNumber,trailstatus) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [ 2 2024-01-11 18:15:38 1 2024-01-11 18:15:38 154 4 夏总 15338896792 1205321180 2024-01-11 18:15:38 广东邮电职业技术学院 0 421b5aa8a8154546bacaafd3b3aea3cc 2024-01-11 18:15:38 2024-01-11 18:15:38 1  2646 05]
+2024/01/11 18:15:45 第 66 条保存成功 15338896792 421b5aa8a8154546bacaafd3b3aea3cc
+2024/01/11 18:15:45 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13910132217]
+2024/01/11 18:15:45 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [5a1fbac763114f1287133e7665e9fed6]
+2024/01/11 18:15:45 第 67 条已有线索 13910132217 5a1fbac763114f1287133e7665e9fed6
+2024/01/11 18:15:45 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18600366811]
+2024/01/11 18:15:45 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [7ef939cee69011ed972200163e3214c2]
+2024/01/11 18:15:45 第 68 条已有线索 18600366811 7ef939cee69011ed972200163e3214c2
+2024/01/11 18:15:45 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18710641939]
+2024/01/11 18:15:45 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [c6bce6e0e69811ed972200163e3214c2]
+2024/01/11 18:15:45 第 69 条已有线索 18710641939 c6bce6e0e69811ed972200163e3214c2
+2024/01/11 18:15:45 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18075152150]
+2024/01/11 18:15:45 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [3c5b48d0e67911ed972200163e3214c2]
+2024/01/11 18:15:45 第 70 条已有线索 18075152150 3c5b48d0e67911ed972200163e3214c2
+2024/01/11 18:15:45 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13611139527]
+2024/01/11 18:15:45 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [48919556e68711ed972200163e3214c2]
+2024/01/11 18:15:45 第 71 条已有线索 13611139527 48919556e68711ed972200163e3214c2
+2024/01/11 18:15:45 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13609380971]
+2024/01/11 18:15:45 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [103faebae67111ed972200163e3214c2]
+2024/01/11 18:15:45 第 72 条已有线索 13609380971 103faebae67111ed972200163e3214c2
+2024/01/11 18:15:45 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18628183214]
+2024/01/11 18:15:45 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13930164907]
+2024/01/11 18:15:45 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13397412558]
+2024/01/11 18:15:46 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [a61f8ee0e7e911edb72c00163e3214c2]
+2024/01/11 18:15:46 第 75 条已有线索 13397412558 a61f8ee0e7e911edb72c00163e3214c2
+2024/01/11 18:15:46 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13901510397]
+2024/01/11 18:15:46 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [d6dd0a783d9b11ee8a8200163e3214c2]
+2024/01/11 18:15:46 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [d6dd0a783d9b11ee8a8200163e3214c2]
+2024/01/11 18:15:46 mysql INSERT INTO dwd_f_crm_clue_info (tasktime,updatetime,cluename,seatNumber,createtime,sub_cluetype,trailstatus,userid,uid,top_cluetype,name,comeinsource_private,is_task,task_time,position_id,is_assign,position,taskstatus,comeintime,phone) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [2024-01-11 18:15:38 2024-01-11 18:15:38 善能(南京)数字技术有限公司 8050 2024-01-11 18:15:38 154 05 64df211ce61451b2b172acaf d6dd0a783d9b11ee8a8200163e3214c2 4 何总 2 1 2024-01-11 18:15:38 1205321184 1  0 2024-01-11 18:15:38 13901510397]
+2024/01/11 18:15:46 第 76 条保存成功 13901510397 d6dd0a783d9b11ee8a8200163e3214c2
+2024/01/11 18:15:46 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18049152417]
+2024/01/11 18:15:46 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [41ddc264e68e11ed972200163e3214c2]
+2024/01/11 18:15:46 第 77 条已有线索 18049152417 41ddc264e68e11ed972200163e3214c2
+2024/01/11 18:15:46 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13196758819]
+2024/01/11 18:15:46 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18799177643]
+2024/01/11 18:15:46 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [5e7eb5d2785a11eea06500163e3214c2]
+2024/01/11 18:15:46 第 79 条已有线索 18799177643 5e7eb5d2785a11eea06500163e3214c2
+2024/01/11 18:15:46 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18794984310]
+2024/01/11 18:15:46 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18279172576]
+2024/01/11 18:15:46 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [ee7944f253e011ee8ca800163e3214c2]
+2024/01/11 18:15:46 第 81 条已有线索 18279172576 ee7944f253e011ee8ca800163e3214c2
+2024/01/11 18:15:46 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18935188295]
+2024/01/11 18:15:46 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [abf7aaee579911eeb62c00163e3214c2]
+2024/01/11 18:15:46 第 82 条已有线索 18935188295 abf7aaee579911eeb62c00163e3214c2
+2024/01/11 18:15:46 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15222667030]
+2024/01/11 18:15:46 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [2f04e8e65c1a11eea4ce00163e3214c2]
+2024/01/11 18:15:46 第 83 条已有线索 15222667030 2f04e8e65c1a11eea4ce00163e3214c2
+2024/01/11 18:15:46 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [19930550227]
+2024/01/11 18:15:46 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [617e7426658511ee978a00163e3214c2]
+2024/01/11 18:15:46 第 84 条已有线索 19930550227 617e7426658511ee978a00163e3214c2
+2024/01/11 18:15:46 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18633182753]
+2024/01/11 18:15:46 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [c69f2584658611eeb75d00163e3214c2]
+2024/01/11 18:15:46 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [c69f2584658611eeb75d00163e3214c2]
+2024/01/11 18:15:46 mysql INSERT INTO dwd_f_crm_clue_info (uid,cluename,sub_cluetype,task_time,position_id,createtime,position,updatetime,top_cluetype,comeinsource_private,is_task,tasktime,userid,seatNumber,is_assign,taskstatus,phone,comeintime,trailstatus,name) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [c69f2584658611eeb75d00163e3214c2 河北银行 154 2024-01-11 18:15:38 1205321180 2024-01-11 18:15:38  2024-01-11 18:15:38 4 2 1 2024-01-11 18:15:38 652218b81bb53f7939e44fa5 2646 1 0 18633182753 2024-01-11 18:15:38 08 ]
+2024/01/11 18:15:47 第 85 条保存成功 18633182753 c69f2584658611eeb75d00163e3214c2
+2024/01/11 18:15:47 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13363079236]
+2024/01/11 18:15:47 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [5d1dfc6a658c11eea1f700163e3214c2]
+2024/01/11 18:15:47 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [5d1dfc6a658c11eea1f700163e3214c2]
+2024/01/11 18:15:47 mysql INSERT INTO dwd_f_crm_clue_info (phone,position,comeinsource_private,updatetime,cluename,trailstatus,taskstatus,is_assign,comeintime,createtime,top_cluetype,uid,position_id,sub_cluetype,name,is_task,task_time,tasktime,userid,seatNumber) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [13363079236  2 2024-01-11 18:15:38 河北银行 08 0 1 2024-01-11 18:15:38 2024-01-11 18:15:38 4 5d1dfc6a658c11eea1f700163e3214c2 1205321180 154  1 2024-01-11 18:15:38 2024-01-11 18:15:38 65221ff41bb53f7939e44fa6 2646]
+2024/01/11 18:15:47 第 86 条保存成功 13363079236 5d1dfc6a658c11eea1f700163e3214c2
+2024/01/11 18:15:47 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18920823975]
+2024/01/11 18:15:47 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [5d27e66c658c11eea1f700163e3214c2]
+2024/01/11 18:15:47 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [5d27e66c658c11eea1f700163e3214c2]
+2024/01/11 18:15:47 mysql INSERT INTO dwd_f_crm_clue_info (createtime,phone,tasktime,taskstatus,seatNumber,comeintime,cluename,is_task,userid,uid,comeinsource_private,is_assign,top_cluetype,sub_cluetype,trailstatus,name,position,task_time,position_id,updatetime) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [2024-01-11 18:15:38 18920823975 2024-01-11 18:15:38 0 2646 2024-01-11 18:15:38 河北银行 1 65221ffd1bb53f7939e44fa7 5d27e66c658c11eea1f700163e3214c2 2 1 4 154 08   2024-01-11 18:15:38 1205321180 2024-01-11 18:15:38]
+2024/01/11 18:15:47 第 87 条保存成功 18920823975 5d27e66c658c11eea1f700163e3214c2
+2024/01/11 18:15:47 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18226728792]
+2024/01/11 18:15:47 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [d7db7cf2883711eeb9a100163e3214c2]
+2024/01/11 18:15:47 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [d7db7cf2883711eeb9a100163e3214c2]
+2024/01/11 18:15:47 mysql INSERT INTO dwd_f_crm_clue_info (seatNumber,position_id,tasktime,userid,cluename,top_cluetype,sub_cluetype,trailstatus,name,position,is_task,taskstatus,uid,is_assign,comeintime,createtime,updatetime,phone,comeinsource_private,task_time) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [2646 1205321180 2024-01-11 18:15:38  杭州首新网络科技有限公司 4 154 06 木木 其他- 1 0 d7db7cf2883711eeb9a100163e3214c2 1 2024-01-11 18:15:38 2024-01-11 18:15:38 2024-01-11 18:15:38 18226728792 2 2024-01-11 18:15:38]
+2024/01/11 18:15:47 第 88 条保存成功 18226728792 d7db7cf2883711eeb9a100163e3214c2
+2024/01/11 18:15:47 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13964251202]
+2024/01/11 18:15:47 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [c089a9ea883511eeb9a100163e3214c2]
+2024/01/11 18:15:47 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [c089a9ea883511eeb9a100163e3214c2]
+2024/01/11 18:15:47 mysql INSERT INTO dwd_f_crm_clue_info (sub_cluetype,phone,taskstatus,userid,seatNumber,createtime,trailstatus,name,is_task,uid,comeintime,top_cluetype,comeinsource_private,task_time,position_id,updatetime,cluename,is_assign,position,tasktime) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [154 13964251202 0  2646 2024-01-11 18:15:38 05 吴风乐 1 c089a9ea883511eeb9a100163e3214c2 2024-01-11 18:15:38 4 2 2024-01-11 18:15:38 1205321180 2024-01-11 18:15:38 13964251202 1  2024-01-11 18:15:38]
+2024/01/11 18:15:47 第 89 条保存成功 13964251202 c089a9ea883511eeb9a100163e3214c2
+2024/01/11 18:15:47 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18958950148]
+2024/01/11 18:15:47 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [7c2626b6e69b11ed972200163e3214c2]
+2024/01/11 18:15:47 第 90 条已有线索 18958950148 7c2626b6e69b11ed972200163e3214c2
+2024/01/11 18:15:47 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15616167295]
+2024/01/11 18:15:47 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [8354c8426e5511ee8fef00163e3214c2]
+2024/01/11 18:15:47 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [8354c8426e5511ee8fef00163e3214c2]
+2024/01/11 18:15:47 mysql INSERT INTO dwd_f_crm_clue_info (comeintime,createtime,trailstatus,sub_cluetype,name,phone,is_task,task_time,position_id,updatetime,top_cluetype,taskstatus,userid,position,comeinsource_private,cluename,tasktime,uid,seatNumber,is_assign) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [2024-01-11 18:15:38 2024-01-11 18:15:38 08 154  15616167295 1 2024-01-11 18:15:38 1205321180 2024-01-11 18:15:38 4 0 6530df7df9f1552eeee2139d  2 湖南浪潮科技有限公司 2024-01-11 18:15:38 8354c8426e5511ee8fef00163e3214c2 2646 1]
+2024/01/11 18:15:47 第 91 条保存成功 15616167295 8354c8426e5511ee8fef00163e3214c2
+2024/01/11 18:15:47 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13301589385]
+2024/01/11 18:15:47 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [2938a1e86ef611eea0d700163e3214c2]
+2024/01/11 18:15:48 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [2938a1e86ef611eea0d700163e3214c2]
+2024/01/11 18:15:48 mysql INSERT INTO dwd_f_crm_clue_info (phone,comeinsource_private,is_task,task_time,userid,is_assign,comeintime,top_cluetype,sub_cluetype,seatNumber,cluename,tasktime,taskstatus,uid,createtime,updatetime,trailstatus,name,position,position_id) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [13301589385 2 1 2024-01-11 18:15:38 6531ec0b3d61976f20717538 1 2024-01-11 18:15:38 4 154 2646 江苏腾彩光电科技有限公司 2024-01-11 18:15:38 0 2938a1e86ef611eea0d700163e3214c2 2024-01-11 18:15:38 2024-01-11 18:15:38 05 姬雪  1205321180]
+2024/01/11 18:15:48 第 92 条保存成功 13301589385 2938a1e86ef611eea0d700163e3214c2
+2024/01/11 18:15:48 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [021-52558112]
+2024/01/11 18:15:48 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13523567588]
+2024/01/11 18:15:48 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [6cc3ecaa883311eeb9a100163e3214c2]
+2024/01/11 18:15:48 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [6cc3ecaa883311eeb9a100163e3214c2]
+2024/01/11 18:15:48 mysql INSERT INTO dwd_f_crm_clue_info (is_task,taskstatus,comeintime,position,cluename,top_cluetype,task_time,uid,seatNumber,name,phone,comeinsource_private,is_assign,createtime,updatetime,sub_cluetype,trailstatus,tasktime,userid,position_id) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [1 0 2024-01-11 18:15:38  巩义市大成水处理材料有限公司 4 2024-01-11 18:15:38 6cc3ecaa883311eeb9a100163e3214c2 2646 张鹏 13523567588 2 1 2024-01-11 18:15:38 2024-01-11 18:15:38 154 05 2024-01-11 18:15:38  1205321180]
+2024/01/11 18:15:48 第 94 条保存成功 13523567588 6cc3ecaa883311eeb9a100163e3214c2
+2024/01/11 18:15:48 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18229947913]
+2024/01/11 18:15:48 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [d91081ee883711eeb9a100163e3214c2]
+2024/01/11 18:15:48 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [d91081ee883711eeb9a100163e3214c2]
+2024/01/11 18:15:48 mysql INSERT INTO dwd_f_crm_clue_info (userid,tasktime,createtime,name,taskstatus,seatNumber,position_id,is_assign,trailstatus,phone,position,is_task,uid,comeintime,updatetime,comeinsource_private,task_time,cluename,top_cluetype,sub_cluetype) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [ 2024-01-11 18:15:38 2024-01-11 18:15:38 薛刚 0 2646 1205321180 1 05 18229947913  1 d91081ee883711eeb9a100163e3214c2 2024-01-11 18:15:38 2024-01-11 18:15:38 2 2024-01-11 18:15:38 18229947913 4 154]
+2024/01/11 18:15:48 第 95 条保存成功 18229947913 d91081ee883711eeb9a100163e3214c2
+2024/01/11 18:15:48 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [17789175947]
+2024/01/11 18:15:48 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [a603e842720f11ee961d00163e3214c2]
+2024/01/11 18:15:48 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [a603e842720f11ee961d00163e3214c2]
+2024/01/11 18:15:48 mysql INSERT INTO dwd_f_crm_clue_info (position_id,createtime,sub_cluetype,task_time,comeinsource_private,userid,seatNumber,is_assign,updatetime,trailstatus,name,position,uid,top_cluetype,phone,taskstatus,comeintime,cluename,is_task,tasktime) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [1205321184 2024-01-11 18:15:38 154 2024-01-11 18:15:38 2 65371fdc55282c8f48d5f44e 8050 1 2024-01-11 18:15:38 05  经理 a603e842720f11ee961d00163e3214c2 4 17789175947 0 2024-01-11 18:15:38 西安联升时代科技有限公司 1 2024-01-11 18:15:38]
+2024/01/11 18:15:48 第 96 条保存成功 17789175947 a603e842720f11ee961d00163e3214c2
+2024/01/11 18:15:48 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13806115662]
+2024/01/11 18:15:48 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [15f08ffe835c11ee863400163e3214c2]
+2024/01/11 18:15:48 第 97 条已有线索 13806115662 15f08ffe835c11ee863400163e3214c2
+2024/01/11 18:15:48 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13235191726]
+2024/01/11 18:15:48 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [bcf3ff2c883211eeb9a100163e3214c2]
+2024/01/11 18:15:48 select * from dwd_f_userbase_baseinfo where uid=? limit 0,1 [bcf3ff2c883211eeb9a100163e3214c2]
+2024/01/11 18:15:48 mysql INSERT INTO dwd_f_crm_clue_info (createtime,cluename,top_cluetype,trailstatus,is_task,userid,seatNumber,position_id,is_assign,sub_cluetype,name,phone,comeinsource_private,task_time,tasktime,uid,position,comeintime,updatetime,taskstatus) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [2024-01-11 18:15:38 13235191726 4 06 1  2646 1205321180 1 154  13235191726 2 2024-01-11 18:15:38 2024-01-11 18:15:38 bcf3ff2c883211eeb9a100163e3214c2  2024-01-11 18:15:38 2024-01-11 18:15:38 0]
+2024/01/11 18:15:49 第 98 条保存成功 13235191726 bcf3ff2c883211eeb9a100163e3214c2
+2024/01/11 18:15:49 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18813088595]
+2024/01/11 18:15:49 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [0c569860e69711ed972200163e3214c2]
+2024/01/11 18:15:49 第 99 条已有线索 18813088595 0c569860e69711ed972200163e3214c2
+2024/01/11 18:15:49 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18066750856]
+2024/01/11 18:15:49 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [68c15772e68611ed972200163e3214c2]
+2024/01/11 18:15:49 第 100 条已有线索 18066750856 68c15772e68611ed972200163e3214c2
+2024/01/11 18:15:49 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13105262172]
+2024/01/11 18:15:49 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [8340c22ae68311ed972200163e3214c2]
+2024/01/11 18:15:49 第 101 条已有线索 13105262172 8340c22ae68311ed972200163e3214c2
+2024/01/11 18:15:49 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18151699011]
+2024/01/11 18:15:49 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [5469de4ee69911ed972200163e3214c2]
+2024/01/11 18:15:49 第 102 条已有线索 18151699011 5469de4ee69911ed972200163e3214c2
+2024/01/11 18:15:49 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18681820392]
+2024/01/11 18:15:49 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [e2878660e67411ed972200163e3214c2]
+2024/01/11 18:15:49 第 103 条已有线索 18681820392 e2878660e67411ed972200163e3214c2
+2024/01/11 18:15:49 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18092040580]
+2024/01/11 18:15:49 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [be27b0a4e69911ed972200163e3214c2]
+2024/01/11 18:15:49 第 104 条已有线索 18092040580 be27b0a4e69911ed972200163e3214c2
+2024/01/11 18:15:49 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15903028766]
+2024/01/11 18:15:49 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [de55b228e69311ed972200163e3214c2]
+2024/01/11 18:15:49 第 105 条已有线索 15903028766 de55b228e69311ed972200163e3214c2
+2024/01/11 18:15:49 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15029208030]
+2024/01/11 18:15:49 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [083f1dc6e69a11ed972200163e3214c2]
+2024/01/11 18:15:49 第 106 条已有线索 15029208030 083f1dc6e69a11ed972200163e3214c2
+2024/01/11 18:15:49 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18729313507]
+2024/01/11 18:15:49 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [1a3cba8ce69b11ed972200163e3214c2]
+2024/01/11 18:15:49 第 107 条已有线索 18729313507 1a3cba8ce69b11ed972200163e3214c2
+2024/01/11 18:15:49 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18798700206]
+2024/01/11 18:15:49 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [de5db422e67111ed972200163e3214c2]
+2024/01/11 18:15:49 第 108 条已有线索 18798700206 de5db422e67111ed972200163e3214c2
+2024/01/11 18:15:49 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15079097473]
+2024/01/11 18:15:49 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [f0fd3198e67111ed972200163e3214c2]
+2024/01/11 18:15:49 第 109 条已有线索 15079097473 f0fd3198e67111ed972200163e3214c2
+2024/01/11 18:15:49 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13393393377]
+2024/01/11 18:15:49 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [6fa4e71ce68011ed972200163e3214c2]
+2024/01/11 18:15:50 第 110 条已有线索 13393393377 6fa4e71ce68011ed972200163e3214c2
+2024/01/11 18:15:50 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15136188339]
+2024/01/11 18:15:50 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [7f883384e69711ed972200163e3214c2]
+2024/01/11 18:15:50 第 111 条已有线索 15136188339 7f883384e69711ed972200163e3214c2
+2024/01/11 18:15:50 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18820147029]
+2024/01/11 18:15:50 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [a1a97374e69711ed972200163e3214c2]
+2024/01/11 18:15:50 第 112 条已有线索 18820147029 a1a97374e69711ed972200163e3214c2
+2024/01/11 18:15:50 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18705153610]
+2024/01/11 18:15:50 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [2f96902ee69b11ed972200163e3214c2]
+2024/01/11 18:15:50 第 113 条已有线索 18705153610 2f96902ee69b11ed972200163e3214c2
+2024/01/11 18:15:50 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13545234402]
+2024/01/11 18:15:50 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [16495d0ce68e11ed972200163e3214c2]
+2024/01/11 18:15:50 第 114 条已有线索 13545234402 16495d0ce68e11ed972200163e3214c2
+2024/01/11 18:15:50 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15028804666]
+2024/01/11 18:15:50 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [b1186b48e69811ed972200163e3214c2]
+2024/01/11 18:15:50 第 115 条已有线索 15028804666 b1186b48e69811ed972200163e3214c2
+2024/01/11 18:15:50 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15204690369]
+2024/01/11 18:15:50 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [33248b2ee67811ed972200163e3214c2]
+2024/01/11 18:15:50 第 116 条已有线索 15204690369 33248b2ee67811ed972200163e3214c2
+2024/01/11 18:15:50 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18603048881]

+ 383 - 0
clueSync/jylog/2024_01_11_18_21_35.log

@@ -0,0 +1,383 @@
+2024/01/11 18:21:35 cfg  &{0 */30 * * * ? 0 */5 9,10,11,12,13,14,15,16,17 * * ? 0 30 8 * * ? 0 0 0 */1 * ?  0 */5 * * * ? 0 */10 * * * ? 0 */10 * * * ? 172508  644101e58b6d74a60a09aec7 6440faf7bd4ea1862af84c56 2023-04-25 00:00:00 2023-04-25 00:00:00 64473e36c572141d78ec7a03     1 1000 7 192.168.3.206:1712 {127.0.0.1 4001 Jianyu_subjectdb root Tibi#20211222 20 40 40} {127.0.0.1 4001 Call_Accounting root Tibi#20211222 20 40 40} {192.168.3.149 4000 Jianyu_subjectdb root Tibi#20211222 20 40 40} {192.168.3.149 4000 base_service root Tibi#20211222 20 40 40} {127.0.0.1 4001 thirdparty root Tibi#20211222 20 40 40} { 0    0 0 0} {192.168.3.149 4000 jianyu root Tibi#20211222 20 40 40} {192.168.3.206:27080 qfw 20} {192.168.3.206:27090 qfw 20 admin 123456} {http://192.168.3.206:9800 20 v7  }}
+2024/01/11 18:21:36 dial tcp 192.168.3.149:4000: connect: connection refused
+2024/01/11 18:21:36 dial tcp :0: connect: can't assign requested address
+2024/01/11 18:21:36 dial tcp 192.168.3.149:4000: connect: connection refused
+2024/01/11 18:21:36 dial tcp 192.168.3.149:4000: connect: connection refused
+2024/01/11 18:21:36 select * from d_area_code []
+2024/01/11 18:21:36 AreaCodeLen  3327
+2024/01/11 18:21:36 CodeAreaLen  3365
+2024/01/11 18:21:36 select * from dwd_d_crm_trailstatus_code []
+2024/01/11 18:21:36 select * from holiday_records []
+2024/01/11 18:21:37 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15289877475]
+2024/01/11 18:21:37 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [da3684dee69211ed972200163e3214c2]
+2024/01/11 18:21:37 第 1 条已有线索 15289877475 da3684dee69211ed972200163e3214c2
+2024/01/11 18:21:37 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15395023131]
+2024/01/11 18:21:37 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13022550866]
+2024/01/11 18:21:37 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [af3b0fe0e7e911edb72c00163e3214c2]
+2024/01/11 18:21:37 第 3 条已有线索 13022550866 af3b0fe0e7e911edb72c00163e3214c2
+2024/01/11 18:21:37 update dwd_f_crm_clue_info set seatNumber=?,position_id=?,comeintime=?,updatetime=?,trailstatus=?,task_time=?,is_assign=?,is_task=?,tasktime=?,taskstatus=?,comeinsource_private=? where uid=? [2646 1205321180 2024-01-11 18:21:36 2024-01-11 18:21:36 05 2024-01-11 18:21:36 1 1 2024-01-11 18:21:36 0 2 af3b0fe0e7e911edb72c00163e3214c2]
+2024/01/11 18:21:37 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18819321596]
+2024/01/11 18:21:37 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [c562957ce69511ed972200163e3214c2]
+2024/01/11 18:21:37 第 4 条已有线索 18819321596 c562957ce69511ed972200163e3214c2
+2024/01/11 18:21:37 update dwd_f_crm_clue_info set updatetime=?,trailstatus=?,tasktime=?,taskstatus=?,seatNumber=?,is_assign=?,comeintime=?,comeinsource_private=?,position_id=?,is_task=?,task_time=? where uid=? [2024-01-11 18:21:36 07 2024-01-11 18:21:36 0 2646 1 2024-01-11 18:21:36 2 1205321180 1 2024-01-11 18:21:36 c562957ce69511ed972200163e3214c2]
+2024/01/11 18:21:37 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18928430779]
+2024/01/11 18:21:37 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13121282299]
+2024/01/11 18:21:37 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [1b19a0cce69c11ed972200163e3214c2]
+2024/01/11 18:21:37 第 6 条已有线索 13121282299 1b19a0cce69c11ed972200163e3214c2
+2024/01/11 18:21:37 update dwd_f_crm_clue_info set seatNumber=?,is_assign=?,task_time=?,taskstatus=?,comeinsource_private=?,position_id=?,comeintime=?,updatetime=?,trailstatus=?,is_task=?,tasktime=? where uid=? [8050 1 2024-01-11 18:21:36 0 2 1205321184 2024-01-11 18:21:36 2024-01-11 18:21:36 05 1 2024-01-11 18:21:36 1b19a0cce69c11ed972200163e3214c2]
+2024/01/11 18:21:37 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13930846687]
+2024/01/11 18:21:37 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [3b5b19bae69c11ed972200163e3214c2]
+2024/01/11 18:21:37 第 7 条已有线索 13930846687 3b5b19bae69c11ed972200163e3214c2
+2024/01/11 18:21:37 update dwd_f_crm_clue_info set trailstatus=?,comeintime=?,updatetime=?,is_task=?,task_time=?,tasktime=?,seatNumber=?,position_id=?,is_assign=?,taskstatus=?,comeinsource_private=? where uid=? [08 2024-01-11 18:21:36 2024-01-11 18:21:36 1 2024-01-11 18:21:36 2024-01-11 18:21:36 8050 1205321184 1 0 2 3b5b19bae69c11ed972200163e3214c2]
+2024/01/11 18:21:37 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18072812861]
+2024/01/11 18:21:37 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [5ca3e232e69c11ed972200163e3214c2]
+2024/01/11 18:21:37 第 8 条已有线索 18072812861 5ca3e232e69c11ed972200163e3214c2
+2024/01/11 18:21:37 update dwd_f_crm_clue_info set seatNumber=?,position_id=?,updatetime=?,trailstatus=?,comeinsource_private=?,is_assign=?,comeintime=?,is_task=?,task_time=?,tasktime=?,taskstatus=? where uid=? [8050 1205321184 2024-01-11 18:21:36 05 2 1 2024-01-11 18:21:36 1 2024-01-11 18:21:36 2024-01-11 18:21:36 0 5ca3e232e69c11ed972200163e3214c2]
+2024/01/11 18:21:37 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18695934666]
+2024/01/11 18:21:37 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18547776839]
+2024/01/11 18:21:38 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15566539185]
+2024/01/11 18:21:38 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [7d3c99dae69c11ed972200163e3214c2]
+2024/01/11 18:21:38 第 11 条已有线索 15566539185 7d3c99dae69c11ed972200163e3214c2
+2024/01/11 18:21:38 update dwd_f_crm_clue_info set position_id=?,trailstatus=?,tasktime=?,taskstatus=?,comeinsource_private=?,seatNumber=?,is_assign=?,comeintime=?,updatetime=?,is_task=?,task_time=? where uid=? [1205321184 05 2024-01-11 18:21:36 0 2 8050 1 2024-01-11 18:21:36 2024-01-11 18:21:36 1 2024-01-11 18:21:36 7d3c99dae69c11ed972200163e3214c2]
+2024/01/11 18:21:38 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18842685561]
+2024/01/11 18:21:38 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [8510cecee69c11ed972200163e3214c2]
+2024/01/11 18:21:38 第 12 条已有线索 18842685561 8510cecee69c11ed972200163e3214c2
+2024/01/11 18:21:38 update dwd_f_crm_clue_info set task_time=?,tasktime=?,taskstatus=?,seatNumber=?,trailstatus=?,is_task=?,updatetime=?,comeinsource_private=?,position_id=?,is_assign=?,comeintime=? where uid=? [2024-01-11 18:21:36 2024-01-11 18:21:36 0 8050 05 1 2024-01-11 18:21:36 2 1205321184 1 2024-01-11 18:21:36 8510cecee69c11ed972200163e3214c2]
+2024/01/11 18:21:38 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15037111167]
+2024/01/11 18:21:38 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [862efed4e69c11ed972200163e3214c2]
+2024/01/11 18:21:38 第 13 条已有线索 15037111167 862efed4e69c11ed972200163e3214c2
+2024/01/11 18:21:38 update dwd_f_crm_clue_info set seatNumber=?,position_id=?,is_assign=?,comeintime=?,trailstatus=?,is_task=?,task_time=?,tasktime=?,taskstatus=?,comeinsource_private=?,updatetime=? where uid=? [8050 1205321184 1 2024-01-11 18:21:36 05 1 2024-01-11 18:21:36 2024-01-11 18:21:36 0 2 2024-01-11 18:21:36 862efed4e69c11ed972200163e3214c2]
+2024/01/11 18:21:38 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18729281990]
+2024/01/11 18:21:38 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18717301387]
+2024/01/11 18:21:38 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [9fff9a30e69c11ed972200163e3214c2]
+2024/01/11 18:21:39 第 15 条已有线索 18717301387 9fff9a30e69c11ed972200163e3214c2
+2024/01/11 18:21:39 update dwd_f_crm_clue_info set updatetime=?,trailstatus=?,is_task=?,task_time=?,seatNumber=?,position_id=?,is_assign=?,comeintime=?,tasktime=?,taskstatus=?,comeinsource_private=? where uid=? [2024-01-11 18:21:36 07 1 2024-01-11 18:21:36 2646 1205321180 1 2024-01-11 18:21:36 2024-01-11 18:21:36 0 2 9fff9a30e69c11ed972200163e3214c2]
+2024/01/11 18:21:39 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18122995025]
+2024/01/11 18:21:39 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [9e8c0062e69c11ed972200163e3214c2]
+2024/01/11 18:21:39 第 16 条已有线索 18122995025 9e8c0062e69c11ed972200163e3214c2
+2024/01/11 18:21:39 update dwd_f_crm_clue_info set taskstatus=?,seatNumber=?,is_assign=?,trailstatus=?,task_time=?,tasktime=?,position_id=?,comeintime=?,updatetime=?,is_task=?,comeinsource_private=? where uid=? [0 2646 1 07 2024-01-11 18:21:36 2024-01-11 18:21:36 1205321180 2024-01-11 18:21:36 2024-01-11 18:21:36 1 2 9e8c0062e69c11ed972200163e3214c2]
+2024/01/11 18:21:39 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15550007486]
+2024/01/11 18:21:39 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [a349a8cae69c11ed972200163e3214c2]
+2024/01/11 18:21:39 第 17 条已有线索 15550007486 a349a8cae69c11ed972200163e3214c2
+2024/01/11 18:21:39 update dwd_f_crm_clue_info set seatNumber=?,trailstatus=?,tasktime=?,taskstatus=?,position_id=?,is_assign=?,comeintime=?,updatetime=?,is_task=?,task_time=?,comeinsource_private=? where uid=? [2646 07 2024-01-11 18:21:36 0 1205321180 1 2024-01-11 18:21:36 2024-01-11 18:21:36 1 2024-01-11 18:21:36 2 a349a8cae69c11ed972200163e3214c2]
+2024/01/11 18:21:39 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13165521174]
+2024/01/11 18:21:39 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [d2e46738e69611ed972200163e3214c2]
+2024/01/11 18:21:39 第 18 条已有线索 13165521174 d2e46738e69611ed972200163e3214c2
+2024/01/11 18:21:39 update dwd_f_crm_clue_info set comeinsource_private=?,position_id=?,is_assign=?,comeintime=?,trailstatus=?,task_time=?,seatNumber=?,updatetime=?,is_task=?,tasktime=?,taskstatus=? where uid=? [2 1205321180 1 2024-01-11 18:21:36 07 2024-01-11 18:21:36 2646 2024-01-11 18:21:36 1 2024-01-11 18:21:36 0 d2e46738e69611ed972200163e3214c2]
+2024/01/11 18:21:39 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13520999567]
+2024/01/11 18:21:39 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [8119aad0874f11ee9adf00163e3214c2]
+2024/01/11 18:21:39 第 19 条已有线索 13520999567 8119aad0874f11ee9adf00163e3214c2
+2024/01/11 18:21:39 update dwd_f_crm_clue_info set is_assign=?,trailstatus=?,is_task=?,taskstatus=?,comeinsource_private=?,seatNumber=?,position_id=?,comeintime=?,updatetime=?,task_time=?,tasktime=? where uid=? [1 08 1 0 2 2646 1205321180 2024-01-11 18:21:36 2024-01-11 18:21:36 2024-01-11 18:21:36 2024-01-11 18:21:36 8119aad0874f11ee9adf00163e3214c2]
+2024/01/11 18:21:39 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15853182692]
+2024/01/11 18:21:39 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [19977137713]
+2024/01/11 18:21:39 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [119c373765ec40fc99315667677a01a8]
+2024/01/11 18:21:39 第 21 条已有线索 19977137713 119c373765ec40fc99315667677a01a8
+2024/01/11 18:21:39 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [16631702171]
+2024/01/11 18:21:39 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [2e9671f8d2674ef090a4b50042b614d1]
+2024/01/11 18:21:39 第 22 条已有线索 16631702171 2e9671f8d2674ef090a4b50042b614d1
+2024/01/11 18:21:39 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15056923580]
+2024/01/11 18:21:39 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [65fa73b6e67c11ed972200163e3214c2]
+2024/01/11 18:21:40 第 23 条已有线索 15056923580 65fa73b6e67c11ed972200163e3214c2
+2024/01/11 18:21:40 update dwd_f_crm_clue_info set comeinsource_private=?,seatNumber=?,position_id=?,updatetime=?,is_task=?,task_time=?,is_assign=?,comeintime=?,trailstatus=?,tasktime=?,taskstatus=? where uid=? [2 8050 1205321184 2024-01-11 18:21:36 1 2024-01-11 18:21:36 1 2024-01-11 18:21:36 08 2024-01-11 18:21:36 0 65fa73b6e67c11ed972200163e3214c2]
+2024/01/11 18:21:40 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13901480123]
+2024/01/11 18:21:40 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [3494a944883511eeb9a100163e3214c2]
+2024/01/11 18:21:40 第 24 条已有线索 13901480123 3494a944883511eeb9a100163e3214c2
+2024/01/11 18:21:40 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13922868104]
+2024/01/11 18:21:40 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [ecbcfd68e69c11ed972200163e3214c2]
+2024/01/11 18:21:40 第 25 条已有线索 13922868104 ecbcfd68e69c11ed972200163e3214c2
+2024/01/11 18:21:40 update dwd_f_crm_clue_info set taskstatus=?,position_id=?,is_assign=?,updatetime=?,trailstatus=?,tasktime=?,seatNumber=?,comeintime=?,is_task=?,task_time=?,comeinsource_private=? where uid=? [0 1205321180 1 2024-01-11 18:21:36 06 2024-01-11 18:21:36 2646 2024-01-11 18:21:36 1 2024-01-11 18:21:36 2 ecbcfd68e69c11ed972200163e3214c2]
+2024/01/11 18:21:40 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15891300085]
+2024/01/11 18:21:40 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [fe1266f2e69c11ed972200163e3214c2]
+2024/01/11 18:21:40 第 26 条已有线索 15891300085 fe1266f2e69c11ed972200163e3214c2
+2024/01/11 18:21:40 update dwd_f_crm_clue_info set seatNumber=?,comeintime=?,updatetime=?,is_task=?,task_time=?,tasktime=?,taskstatus=?,position_id=?,is_assign=?,trailstatus=?,comeinsource_private=? where uid=? [2646 2024-01-11 18:21:36 2024-01-11 18:21:36 1 2024-01-11 18:21:36 2024-01-11 18:21:36 0 1205321180 1 08 2 fe1266f2e69c11ed972200163e3214c2]
+2024/01/11 18:21:40 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18600366811]
+2024/01/11 18:21:40 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [7ef939cee69011ed972200163e3214c2]
+2024/01/11 18:21:40 第 27 条已有线索 18600366811 7ef939cee69011ed972200163e3214c2
+2024/01/11 18:21:40 update dwd_f_crm_clue_info set is_assign=?,updatetime=?,trailstatus=?,is_task=?,task_time=?,taskstatus=?,seatNumber=?,position_id=?,comeinsource_private=?,comeintime=?,tasktime=? where uid=? [1 2024-01-11 18:21:36 08 1 2024-01-11 18:21:36 0 2646 1205321180 2 2024-01-11 18:21:36 2024-01-11 18:21:36 7ef939cee69011ed972200163e3214c2]
+2024/01/11 18:21:40 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18710641939]
+2024/01/11 18:21:40 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [c6bce6e0e69811ed972200163e3214c2]
+2024/01/11 18:21:40 第 28 条已有线索 18710641939 c6bce6e0e69811ed972200163e3214c2
+2024/01/11 18:21:40 update dwd_f_crm_clue_info set updatetime=?,comeinsource_private=?,tasktime=?,seatNumber=?,position_id=?,is_assign=?,comeintime=?,trailstatus=?,is_task=?,task_time=?,taskstatus=? where uid=? [2024-01-11 18:21:36 2 2024-01-11 18:21:36 2646 1205321180 1 2024-01-11 18:21:36 06 1 2024-01-11 18:21:36 0 c6bce6e0e69811ed972200163e3214c2]
+2024/01/11 18:21:40 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18075152150]
+2024/01/11 18:21:40 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [3c5b48d0e67911ed972200163e3214c2]
+2024/01/11 18:21:40 第 29 条已有线索 18075152150 3c5b48d0e67911ed972200163e3214c2
+2024/01/11 18:21:40 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13611139527]
+2024/01/11 18:21:40 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [48919556e68711ed972200163e3214c2]
+2024/01/11 18:21:40 第 30 条已有线索 13611139527 48919556e68711ed972200163e3214c2
+2024/01/11 18:21:40 update dwd_f_crm_clue_info set seatNumber=?,is_assign=?,comeintime=?,updatetime=?,tasktime=?,comeinsource_private=?,position_id=?,trailstatus=?,is_task=?,task_time=?,taskstatus=? where uid=? [8050 1 2024-01-11 18:21:36 2024-01-11 18:21:36 2024-01-11 18:21:36 2 1205321184 05 1 2024-01-11 18:21:36 0 48919556e68711ed972200163e3214c2]
+2024/01/11 18:21:40 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13609380971]
+2024/01/11 18:21:40 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [103faebae67111ed972200163e3214c2]
+2024/01/11 18:21:40 第 31 条已有线索 13609380971 103faebae67111ed972200163e3214c2
+2024/01/11 18:21:40 update dwd_f_crm_clue_info set is_assign=?,updatetime=?,is_task=?,task_time=?,tasktime=?,taskstatus=?,seatNumber=?,position_id=?,comeintime=?,trailstatus=?,comeinsource_private=? where uid=? [1 2024-01-11 18:21:36 1 2024-01-11 18:21:36 2024-01-11 18:21:36 0 2646 1205321180 2024-01-11 18:21:36 06 2 103faebae67111ed972200163e3214c2]
+2024/01/11 18:21:41 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18628183214]
+2024/01/11 18:21:41 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13930164907]
+2024/01/11 18:21:41 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13397412558]
+2024/01/11 18:21:41 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [a61f8ee0e7e911edb72c00163e3214c2]
+2024/01/11 18:21:41 第 34 条已有线索 13397412558 a61f8ee0e7e911edb72c00163e3214c2
+2024/01/11 18:21:41 update dwd_f_crm_clue_info set trailstatus=?,taskstatus=?,seatNumber=?,position_id=?,is_assign=?,updatetime=?,comeinsource_private=?,comeintime=?,is_task=?,task_time=?,tasktime=? where uid=? [05 0 2646 1205321180 1 2024-01-11 18:21:36 2 2024-01-11 18:21:36 1 2024-01-11 18:21:36 2024-01-11 18:21:36 a61f8ee0e7e911edb72c00163e3214c2]
+2024/01/11 18:21:41 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13901510397]
+2024/01/11 18:21:41 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [d6dd0a783d9b11ee8a8200163e3214c2]
+2024/01/11 18:21:41 第 35 条已有线索 13901510397 d6dd0a783d9b11ee8a8200163e3214c2
+2024/01/11 18:21:41 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18049152417]
+2024/01/11 18:21:41 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [41ddc264e68e11ed972200163e3214c2]
+2024/01/11 18:21:41 第 36 条已有线索 18049152417 41ddc264e68e11ed972200163e3214c2
+2024/01/11 18:21:41 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13196758819]
+2024/01/11 18:21:41 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18799177643]
+2024/01/11 18:21:41 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [5e7eb5d2785a11eea06500163e3214c2]
+2024/01/11 18:21:41 第 38 条已有线索 18799177643 5e7eb5d2785a11eea06500163e3214c2
+2024/01/11 18:21:41 update dwd_f_crm_clue_info set tasktime=?,seatNumber=?,position_id=?,is_assign=?,comeintime=?,trailstatus=?,is_task=?,task_time=?,taskstatus=?,updatetime=?,comeinsource_private=? where uid=? [2024-01-11 18:21:36 2646 1205321180 1 2024-01-11 18:21:36 08 1 2024-01-11 18:21:36 0 2024-01-11 18:21:36 2 5e7eb5d2785a11eea06500163e3214c2]
+2024/01/11 18:21:41 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18794984310]
+2024/01/11 18:21:41 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18279172576]
+2024/01/11 18:21:41 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [ee7944f253e011ee8ca800163e3214c2]
+2024/01/11 18:21:41 第 40 条已有线索 18279172576 ee7944f253e011ee8ca800163e3214c2
+2024/01/11 18:21:41 update dwd_f_crm_clue_info set taskstatus=?,comeinsource_private=?,seatNumber=?,is_task=?,task_time=?,updatetime=?,trailstatus=?,tasktime=?,position_id=?,is_assign=?,comeintime=? where uid=? [0 2 8050 1 2024-01-11 18:21:36 2024-01-11 18:21:36 05 2024-01-11 18:21:36 1205321184 1 2024-01-11 18:21:36 ee7944f253e011ee8ca800163e3214c2]
+2024/01/11 18:21:41 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18935188295]
+2024/01/11 18:21:41 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [abf7aaee579911eeb62c00163e3214c2]
+2024/01/11 18:21:41 第 41 条已有线索 18935188295 abf7aaee579911eeb62c00163e3214c2
+2024/01/11 18:21:41 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15222667030]
+2024/01/11 18:21:41 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [2f04e8e65c1a11eea4ce00163e3214c2]
+2024/01/11 18:21:41 第 42 条已有线索 15222667030 2f04e8e65c1a11eea4ce00163e3214c2
+2024/01/11 18:21:41 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [19930550227]
+2024/01/11 18:21:42 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [617e7426658511ee978a00163e3214c2]
+2024/01/11 18:21:42 第 43 条已有线索 19930550227 617e7426658511ee978a00163e3214c2
+2024/01/11 18:21:42 update dwd_f_crm_clue_info set updatetime=?,is_task=?,tasktime=?,taskstatus=?,seatNumber=?,position_id=?,is_assign=?,comeinsource_private=?,comeintime=?,trailstatus=?,task_time=? where uid=? [2024-01-11 18:21:36 1 2024-01-11 18:21:36 0 2646 1205321180 1 2 2024-01-11 18:21:36 08 2024-01-11 18:21:36 617e7426658511ee978a00163e3214c2]
+2024/01/11 18:21:42 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18633182753]
+2024/01/11 18:21:42 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [c69f2584658611eeb75d00163e3214c2]
+2024/01/11 18:21:42 第 44 条已有线索 18633182753 c69f2584658611eeb75d00163e3214c2
+2024/01/11 18:21:42 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13363079236]
+2024/01/11 18:21:42 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [5d1dfc6a658c11eea1f700163e3214c2]
+2024/01/11 18:21:42 第 45 条已有线索 13363079236 5d1dfc6a658c11eea1f700163e3214c2
+2024/01/11 18:21:42 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18920823975]
+2024/01/11 18:21:42 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [5d27e66c658c11eea1f700163e3214c2]
+2024/01/11 18:21:42 第 46 条已有线索 18920823975 5d27e66c658c11eea1f700163e3214c2
+2024/01/11 18:21:42 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18226728792]
+2024/01/11 18:21:42 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [d7db7cf2883711eeb9a100163e3214c2]
+2024/01/11 18:21:42 第 47 条已有线索 18226728792 d7db7cf2883711eeb9a100163e3214c2
+2024/01/11 18:21:42 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13964251202]
+2024/01/11 18:21:42 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [c089a9ea883511eeb9a100163e3214c2]
+2024/01/11 18:21:42 第 48 条已有线索 13964251202 c089a9ea883511eeb9a100163e3214c2
+2024/01/11 18:21:42 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18958950148]
+2024/01/11 18:21:42 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [7c2626b6e69b11ed972200163e3214c2]
+2024/01/11 18:21:42 第 49 条已有线索 18958950148 7c2626b6e69b11ed972200163e3214c2
+2024/01/11 18:21:42 update dwd_f_crm_clue_info set seatNumber=?,comeintime=?,trailstatus=?,tasktime=?,taskstatus=?,comeinsource_private=?,position_id=?,is_assign=?,updatetime=?,is_task=?,task_time=? where uid=? [2646 2024-01-11 18:21:36 05 2024-01-11 18:21:36 0 2 1205321180 1 2024-01-11 18:21:36 1 2024-01-11 18:21:36 7c2626b6e69b11ed972200163e3214c2]
+2024/01/11 18:21:42 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15616167295]
+2024/01/11 18:21:42 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [8354c8426e5511ee8fef00163e3214c2]
+2024/01/11 18:21:42 第 50 条已有线索 15616167295 8354c8426e5511ee8fef00163e3214c2
+2024/01/11 18:21:42 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13301589385]
+2024/01/11 18:21:42 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [2938a1e86ef611eea0d700163e3214c2]
+2024/01/11 18:21:42 第 51 条已有线索 13301589385 2938a1e86ef611eea0d700163e3214c2
+2024/01/11 18:21:42 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [021-52558112]
+2024/01/11 18:21:42 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13523567588]
+2024/01/11 18:21:42 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [6cc3ecaa883311eeb9a100163e3214c2]
+2024/01/11 18:21:43 第 53 条已有线索 13523567588 6cc3ecaa883311eeb9a100163e3214c2
+2024/01/11 18:21:43 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18229947913]
+2024/01/11 18:21:43 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [d91081ee883711eeb9a100163e3214c2]
+2024/01/11 18:21:43 第 54 条已有线索 18229947913 d91081ee883711eeb9a100163e3214c2
+2024/01/11 18:21:43 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [17789175947]
+2024/01/11 18:21:43 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [a603e842720f11ee961d00163e3214c2]
+2024/01/11 18:21:43 第 55 条已有线索 17789175947 a603e842720f11ee961d00163e3214c2
+2024/01/11 18:21:43 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13806115662]
+2024/01/11 18:21:43 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [15f08ffe835c11ee863400163e3214c2]
+2024/01/11 18:21:43 第 56 条已有线索 13806115662 15f08ffe835c11ee863400163e3214c2
+2024/01/11 18:21:43 update dwd_f_crm_clue_info set task_time=?,taskstatus=?,comeinsource_private=?,updatetime=?,trailstatus=?,is_assign=?,comeintime=?,is_task=?,tasktime=?,seatNumber=?,position_id=? where uid=? [2024-01-11 18:21:36 0 2 2024-01-11 18:21:36 08 1 2024-01-11 18:21:36 1 2024-01-11 18:21:36 2646 1205321180 15f08ffe835c11ee863400163e3214c2]
+2024/01/11 18:21:43 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13235191726]
+2024/01/11 18:21:43 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [bcf3ff2c883211eeb9a100163e3214c2]
+2024/01/11 18:21:43 第 57 条已有线索 13235191726 bcf3ff2c883211eeb9a100163e3214c2
+2024/01/11 18:21:43 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18813088595]
+2024/01/11 18:21:43 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [0c569860e69711ed972200163e3214c2]
+2024/01/11 18:21:43 第 58 条已有线索 18813088595 0c569860e69711ed972200163e3214c2
+2024/01/11 18:21:43 update dwd_f_crm_clue_info set task_time=?,tasktime=?,taskstatus=?,comeintime=?,updatetime=?,is_assign=?,trailstatus=?,is_task=?,comeinsource_private=?,seatNumber=?,position_id=? where uid=? [2024-01-11 18:21:36 2024-01-11 18:21:36 0 2024-01-11 18:21:36 2024-01-11 18:21:36 1 07 1 2 2646 1205321180 0c569860e69711ed972200163e3214c2]
+2024/01/11 18:21:43 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18066750856]
+2024/01/11 18:21:43 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [68c15772e68611ed972200163e3214c2]
+2024/01/11 18:21:43 第 59 条已有线索 18066750856 68c15772e68611ed972200163e3214c2
+2024/01/11 18:21:43 update dwd_f_crm_clue_info set comeintime=?,updatetime=?,task_time=?,taskstatus=?,comeinsource_private=?,seatNumber=?,position_id=?,is_assign=?,trailstatus=?,is_task=?,tasktime=? where uid=? [2024-01-11 18:21:36 2024-01-11 18:21:36 2024-01-11 18:21:36 0 2 2646 1205321180 1 07 1 2024-01-11 18:21:36 68c15772e68611ed972200163e3214c2]
+2024/01/11 18:21:43 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13105262172]
+2024/01/11 18:21:43 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [8340c22ae68311ed972200163e3214c2]
+2024/01/11 18:21:43 第 60 条已有线索 13105262172 8340c22ae68311ed972200163e3214c2
+2024/01/11 18:21:43 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18151699011]
+2024/01/11 18:21:43 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [5469de4ee69911ed972200163e3214c2]
+2024/01/11 18:21:43 第 61 条已有线索 18151699011 5469de4ee69911ed972200163e3214c2
+2024/01/11 18:21:43 update dwd_f_crm_clue_info set comeintime=?,task_time=?,comeinsource_private=?,is_assign=?,position_id=?,updatetime=?,trailstatus=?,is_task=?,tasktime=?,taskstatus=?,seatNumber=? where uid=? [2024-01-11 18:21:36 2024-01-11 18:21:36 2 1 1205321180 2024-01-11 18:21:36 07 1 2024-01-11 18:21:36 0 2646 5469de4ee69911ed972200163e3214c2]
+2024/01/11 18:21:43 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15666828666]
+2024/01/11 18:21:44 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [a9f193c2883611eeb9a100163e3214c2]
+2024/01/11 18:21:44 第 62 条已有线索 15666828666 a9f193c2883611eeb9a100163e3214c2
+2024/01/11 18:21:44 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15721427815]
+2024/01/11 18:21:44 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15251765786]
+2024/01/11 18:21:44 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [f33e1d34eb1511ed9d8000163e3214c2]
+2024/01/11 18:21:44 第 64 条已有线索 15251765786 f33e1d34eb1511ed9d8000163e3214c2
+2024/01/11 18:21:44 update dwd_f_crm_clue_info set seatNumber=?,position_id=?,comeintime=?,updatetime=?,task_time=?,comeinsource_private=?,is_assign=?,trailstatus=?,is_task=?,tasktime=?,taskstatus=? where uid=? [2646 1205321180 2024-01-11 18:21:36 2024-01-11 18:21:36 2024-01-11 18:21:36 2 1 05 1 2024-01-11 18:21:36 0 f33e1d34eb1511ed9d8000163e3214c2]
+2024/01/11 18:21:44 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13862883200]
+2024/01/11 18:21:44 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [e4edff10a94c11eeb73800163e3214c2]
+2024/01/11 18:21:44 第 65 条已有线索 13862883200 e4edff10a94c11eeb73800163e3214c2
+2024/01/11 18:21:44 update dwd_f_crm_clue_info set task_time=?,comeinsource_private=?,seatNumber=?,comeintime=?,trailstatus=?,is_task=?,taskstatus=?,position_id=?,is_assign=?,updatetime=?,tasktime=? where uid=? [2024-01-11 18:21:36 2 2646 2024-01-11 18:21:36 05 1 0 1205321180 1 2024-01-11 18:21:36 2024-01-11 18:21:36 e4edff10a94c11eeb73800163e3214c2]
+2024/01/11 18:21:44 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18994004258]
+2024/01/11 18:21:44 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [4d270864ebb711ed8f5f00163e3214c2]
+2024/01/11 18:21:44 第 66 条已有线索 18994004258 4d270864ebb711ed8f5f00163e3214c2
+2024/01/11 18:21:44 update dwd_f_crm_clue_info set taskstatus=?,seatNumber=?,position_id=?,trailstatus=?,is_task=?,task_time=?,tasktime=?,is_assign=?,comeintime=?,updatetime=?,comeinsource_private=? where uid=? [0 2646 1205321180 08 1 2024-01-11 18:21:36 2024-01-11 18:21:36 1 2024-01-11 18:21:36 2024-01-11 18:21:36 2 4d270864ebb711ed8f5f00163e3214c2]
+2024/01/11 18:21:44 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15395815401]
+2024/01/11 18:21:44 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13981818512]
+2024/01/11 18:21:44 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [2e091d5ae68511ed972200163e3214c2]
+2024/01/11 18:21:44 第 68 条已有线索 13981818512 2e091d5ae68511ed972200163e3214c2
+2024/01/11 18:21:44 update dwd_f_crm_clue_info set is_assign=?,updatetime=?,is_task=?,task_time=?,tasktime=?,seatNumber=?,position_id=?,comeintime=?,trailstatus=?,taskstatus=?,comeinsource_private=? where uid=? [1 2024-01-11 18:21:36 1 2024-01-11 18:21:36 2024-01-11 18:21:36 2646 1205321180 2024-01-11 18:21:36 05 0 2 2e091d5ae68511ed972200163e3214c2]
+2024/01/11 18:21:44 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18245145622]
+2024/01/11 18:21:44 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [7c636dc8e69b11ed972200163e3214c2]
+2024/01/11 18:21:44 第 69 条已有线索 18245145622 7c636dc8e69b11ed972200163e3214c2
+2024/01/11 18:21:44 update dwd_f_crm_clue_info set taskstatus=?,comeintime=?,updatetime=?,is_task=?,task_time=?,tasktime=?,seatNumber=?,position_id=?,is_assign=?,trailstatus=?,comeinsource_private=? where uid=? [0 2024-01-11 18:21:36 2024-01-11 18:21:36 1 2024-01-11 18:21:36 2024-01-11 18:21:36 2646 1205321180 1 05 2 7c636dc8e69b11ed972200163e3214c2]
+2024/01/11 18:21:44 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18858119136]
+2024/01/11 18:21:44 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [9a056024f46611edb3f800163e3214c2]
+2024/01/11 18:21:44 第 70 条已有线索 18858119136 9a056024f46611edb3f800163e3214c2
+2024/01/11 18:21:44 update dwd_f_crm_clue_info set comeintime=?,is_task=?,tasktime=?,taskstatus=?,seatNumber=?,position_id=?,is_assign=?,updatetime=?,trailstatus=?,task_time=?,comeinsource_private=? where uid=? [2024-01-11 18:21:36 1 2024-01-11 18:21:36 0 2646 1205321180 1 2024-01-11 18:21:36 06 2024-01-11 18:21:36 2 9a056024f46611edb3f800163e3214c2]
+2024/01/11 18:21:44 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13330505020]
+2024/01/11 18:21:45 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [253253bce69011ed972200163e3214c2]
+2024/01/11 18:21:45 第 71 条已有线索 13330505020 253253bce69011ed972200163e3214c2
+2024/01/11 18:21:45 update dwd_f_crm_clue_info set seatNumber=?,position_id=?,comeintime=?,trailstatus=?,is_task=?,tasktime=?,comeinsource_private=?,is_assign=?,updatetime=?,task_time=?,taskstatus=? where uid=? [2646 1205321180 2024-01-11 18:21:36 05 1 2024-01-11 18:21:36 2 1 2024-01-11 18:21:36 2024-01-11 18:21:36 0 253253bce69011ed972200163e3214c2]
+2024/01/11 18:21:45 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13986241350]
+2024/01/11 18:21:45 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [d751be387ebc11eea5bf00163e3214c2]
+2024/01/11 18:21:45 第 72 条已有线索 13986241350 d751be387ebc11eea5bf00163e3214c2
+2024/01/11 18:21:45 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18033444710]
+2024/01/11 18:21:45 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [9379633a883711eeb9a100163e3214c2]
+2024/01/11 18:21:45 第 73 条已有线索 18033444710 9379633a883711eeb9a100163e3214c2
+2024/01/11 18:21:45 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18670707523]
+2024/01/11 18:21:45 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [3168a508ff7411ed974c00163e3214c2]
+2024/01/11 18:21:45 第 74 条已有线索 18670707523 3168a508ff7411ed974c00163e3214c2
+2024/01/11 18:21:45 update dwd_f_crm_clue_info set task_time=?,tasktime=?,seatNumber=?,position_id=?,comeintime=?,updatetime=?,trailstatus=?,is_assign=?,is_task=?,taskstatus=?,comeinsource_private=? where uid=? [2024-01-11 18:21:36 2024-01-11 18:21:36 2646 1205321180 2024-01-11 18:21:36 2024-01-11 18:21:36 05 1 1 0 2 3168a508ff7411ed974c00163e3214c2]
+2024/01/11 18:21:45 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18100177200]
+2024/01/11 18:21:45 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [438f372c13f311eeb3ca00163e3214c2]
+2024/01/11 18:21:45 第 75 条已有线索 18100177200 438f372c13f311eeb3ca00163e3214c2
+2024/01/11 18:21:45 update dwd_f_crm_clue_info set seatNumber=?,position_id=?,is_assign=?,comeintime=?,is_task=?,comeinsource_private=?,updatetime=?,trailstatus=?,task_time=?,tasktime=?,taskstatus=? where uid=? [2646 1205321180 1 2024-01-11 18:21:36 1 2 2024-01-11 18:21:36 05 2024-01-11 18:21:36 2024-01-11 18:21:36 0 438f372c13f311eeb3ca00163e3214c2]
+2024/01/11 18:21:45 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13386380742]
+2024/01/11 18:21:45 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [3e6423da0b1e11eea57800163e3214c2]
+2024/01/11 18:21:45 第 76 条已有线索 13386380742 3e6423da0b1e11eea57800163e3214c2
+2024/01/11 18:21:45 update dwd_f_crm_clue_info set trailstatus=?,is_task=?,task_time=?,tasktime=?,position_id=?,updatetime=?,comeintime=?,taskstatus=?,comeinsource_private=?,seatNumber=?,is_assign=? where uid=? [05 1 2024-01-11 18:21:36 2024-01-11 18:21:36 1205321180 2024-01-11 18:21:36 2024-01-11 18:21:36 0 2 2646 1 3e6423da0b1e11eea57800163e3214c2]
+2024/01/11 18:21:45 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13755011761]
+2024/01/11 18:21:45 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [6be1b8cb2f694565909ad486e7494810]
+2024/01/11 18:21:45 第 77 条已有线索 13755011761 6be1b8cb2f694565909ad486e7494810
+2024/01/11 18:21:45 update dwd_f_crm_clue_info set comeintime=?,updatetime=?,trailstatus=?,tasktime=?,taskstatus=?,seatNumber=?,position_id=?,is_assign=?,is_task=?,task_time=?,comeinsource_private=? where uid=? [2024-01-11 18:21:36 2024-01-11 18:21:36 05 2024-01-11 18:21:36 0 2646 1205321180 1 1 2024-01-11 18:21:36 2 6be1b8cb2f694565909ad486e7494810]
+2024/01/11 18:21:45 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18537129721]
+2024/01/11 18:21:45 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [331138b056a511eeaf7900163e3214c2]
+2024/01/11 18:21:45 第 78 条已有线索 18537129721 331138b056a511eeaf7900163e3214c2
+2024/01/11 18:21:45 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15010699626]
+2024/01/11 18:21:45 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15812490149]
+2024/01/11 18:21:46 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [6efea5d4e68d11ed972200163e3214c2]
+2024/01/11 18:21:46 第 80 条已有线索 15812490149 6efea5d4e68d11ed972200163e3214c2
+2024/01/11 18:21:46 update dwd_f_crm_clue_info set updatetime=?,trailstatus=?,is_task=?,seatNumber=?,position_id=?,task_time=?,tasktime=?,taskstatus=?,comeinsource_private=?,is_assign=?,comeintime=? where uid=? [2024-01-11 18:21:36 08 1 8050 1205321184 2024-01-11 18:21:36 2024-01-11 18:21:36 0 2 1 2024-01-11 18:21:36 6efea5d4e68d11ed972200163e3214c2]
+2024/01/11 18:21:46 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15662132046]
+2024/01/11 18:21:46 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13120834933]
+2024/01/11 18:21:46 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [52caa0ea521511ee999100163e3214c2]
+2024/01/11 18:21:46 第 82 条已有线索 13120834933 52caa0ea521511ee999100163e3214c2
+2024/01/11 18:21:46 update dwd_f_crm_clue_info set updatetime=?,is_task=?,comeinsource_private=?,is_assign=?,comeintime=?,trailstatus=?,task_time=?,tasktime=?,taskstatus=?,seatNumber=?,position_id=? where uid=? [2024-01-11 18:21:36 1 2 1 2024-01-11 18:21:36 08 2024-01-11 18:21:36 2024-01-11 18:21:36 0 2646 1205321180 52caa0ea521511ee999100163e3214c2]
+2024/01/11 18:21:46 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13928704891]
+2024/01/11 18:21:46 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [cf74afce2c4911ee9f9e00163e3214c2]
+2024/01/11 18:21:46 第 83 条已有线索 13928704891 cf74afce2c4911ee9f9e00163e3214c2
+2024/01/11 18:21:46 update dwd_f_crm_clue_info set position_id=?,is_assign=?,updatetime=?,task_time=?,tasktime=?,comeinsource_private=?,seatNumber=?,comeintime=?,trailstatus=?,is_task=?,taskstatus=? where uid=? [1205321180 1 2024-01-11 18:21:36 2024-01-11 18:21:36 2024-01-11 18:21:36 2 2646 2024-01-11 18:21:36 05 1 0 cf74afce2c4911ee9f9e00163e3214c2]
+2024/01/11 18:21:46 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15850538701]
+2024/01/11 18:21:46 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [ba3e7180e68511ed972200163e3214c2]
+2024/01/11 18:21:46 第 84 条已有线索 15850538701 ba3e7180e68511ed972200163e3214c2
+2024/01/11 18:21:46 update dwd_f_crm_clue_info set seatNumber=?,position_id=?,is_assign=?,updatetime=?,taskstatus=?,comeinsource_private=?,comeintime=?,trailstatus=?,is_task=?,task_time=?,tasktime=? where uid=? [2646 1205321180 1 2024-01-11 18:21:36 0 2 2024-01-11 18:21:36 08 1 2024-01-11 18:21:36 2024-01-11 18:21:36 ba3e7180e68511ed972200163e3214c2]
+2024/01/11 18:21:46 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15639937163]
+2024/01/11 18:21:46 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [fe765862e69a11ed972200163e3214c2]
+2024/01/11 18:21:46 第 85 条已有线索 15639937163 fe765862e69a11ed972200163e3214c2
+2024/01/11 18:21:46 update dwd_f_crm_clue_info set updatetime=?,trailstatus=?,tasktime=?,taskstatus=?,seatNumber=?,position_id=?,is_assign=?,comeinsource_private=?,comeintime=?,is_task=?,task_time=? where uid=? [2024-01-11 18:21:36 07 2024-01-11 18:21:36 0 2646 1205321180 1 2 2024-01-11 18:21:36 1 2024-01-11 18:21:36 fe765862e69a11ed972200163e3214c2]
+2024/01/11 18:21:46 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [19962041193]
+2024/01/11 18:21:46 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [3421ca2a7e1511eebbe500163e3214c2]
+2024/01/11 18:21:46 第 86 条已有线索 19962041193 3421ca2a7e1511eebbe500163e3214c2
+2024/01/11 18:21:46 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13261123732]
+2024/01/11 18:21:46 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [cca78bee84f611eea31f00163e3214c2]
+2024/01/11 18:21:46 第 87 条已有线索 13261123732 cca78bee84f611eea31f00163e3214c2
+2024/01/11 18:21:46 update dwd_f_crm_clue_info set position_id=?,is_assign=?,trailstatus=?,is_task=?,taskstatus=?,seatNumber=?,comeintime=?,updatetime=?,task_time=?,tasktime=?,comeinsource_private=? where uid=? [1205321180 1 08 1 0 2646 2024-01-11 18:21:36 2024-01-11 18:21:36 2024-01-11 18:21:36 2024-01-11 18:21:36 2 cca78bee84f611eea31f00163e3214c2]
+2024/01/11 18:21:46 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15956987339]
+2024/01/11 18:21:46 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [4238939c8d2d11ee9b8900163e3214c2]
+2024/01/11 18:21:47 第 88 条已有线索 15956987339 4238939c8d2d11ee9b8900163e3214c2
+2024/01/11 18:21:47 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13717024177]
+2024/01/11 18:21:47 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [05ea227c94d811ee802700163e3214c2]
+2024/01/11 18:21:47 第 89 条已有线索 13717024177 05ea227c94d811ee802700163e3214c2
+2024/01/11 18:21:47 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [16600050902]
+2024/01/11 18:21:47 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18626869858]
+2024/01/11 18:21:47 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [54dacdf43d9f11eea77c00163e3214c2]
+2024/01/11 18:21:47 第 91 条已有线索 18626869858 54dacdf43d9f11eea77c00163e3214c2
+2024/01/11 18:21:47 update dwd_f_crm_clue_info set tasktime=?,taskstatus=?,position_id=?,is_task=?,task_time=?,updatetime=?,trailstatus=?,comeinsource_private=?,seatNumber=?,is_assign=?,comeintime=? where uid=? [2024-01-11 18:21:36 0 1205321180 1 2024-01-11 18:21:36 2024-01-11 18:21:36 05 2 2646 1 2024-01-11 18:21:36 54dacdf43d9f11eea77c00163e3214c2]
+2024/01/11 18:21:47 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13651136323]
+2024/01/11 18:21:47 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [e4f9a3ae883311eeb9a100163e3214c2]
+2024/01/11 18:21:47 第 92 条已有线索 13651136323 e4f9a3ae883311eeb9a100163e3214c2
+2024/01/11 18:21:47 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18291004324]
+2024/01/11 18:21:47 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [eb063038883711eeb9a100163e3214c2]
+2024/01/11 18:21:47 第 93 条已有线索 18291004324 eb063038883711eeb9a100163e3214c2
+2024/01/11 18:21:47 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18038046148]
+2024/01/11 18:21:47 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15850747647]
+2024/01/11 18:21:47 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [8bc9f4eb667b4bcd857391c4d47f0de3]
+2024/01/11 18:21:47 第 95 条已有线索 15850747647 8bc9f4eb667b4bcd857391c4d47f0de3
+2024/01/11 18:21:47 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15389825275]
+2024/01/11 18:21:47 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [08205942b16148cc80076d4e27e7f311]
+2024/01/11 18:21:47 第 96 条已有线索 15389825275 08205942b16148cc80076d4e27e7f311
+2024/01/11 18:21:47 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15912533198]
+2024/01/11 18:21:47 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [95b544e2390c40018d2851e5cfe25683]
+2024/01/11 18:21:47 第 97 条已有线索 15912533198 95b544e2390c40018d2851e5cfe25683
+2024/01/11 18:21:47 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18673163888]
+2024/01/11 18:21:47 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [7719e8bfa8e24517ad00adfe6574dcdb]
+2024/01/11 18:21:47 第 98 条已有线索 18673163888 7719e8bfa8e24517ad00adfe6574dcdb
+2024/01/11 18:21:47 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15120078020]
+2024/01/11 18:21:47 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [a8e2f7e488714d73b0c3794f2e25f5ab]
+2024/01/11 18:21:47 第 99 条已有线索 15120078020 a8e2f7e488714d73b0c3794f2e25f5ab
+2024/01/11 18:21:47 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13361475500]
+2024/01/11 18:21:48 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [40627605034f4080881b4321163d5f2a]
+2024/01/11 18:21:48 第 100 条已有线索 13361475500 40627605034f4080881b4321163d5f2a
+2024/01/11 18:21:48 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15338896792]
+2024/01/11 18:21:48 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [421b5aa8a8154546bacaafd3b3aea3cc]
+2024/01/11 18:21:48 第 101 条已有线索 15338896792 421b5aa8a8154546bacaafd3b3aea3cc
+2024/01/11 18:21:48 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13910132217]
+2024/01/11 18:21:48 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [5a1fbac763114f1287133e7665e9fed6]
+2024/01/11 18:21:48 第 102 条已有线索 13910132217 5a1fbac763114f1287133e7665e9fed6
+2024/01/11 18:21:48 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18681820392]
+2024/01/11 18:21:48 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [e2878660e67411ed972200163e3214c2]
+2024/01/11 18:21:48 第 103 条已有线索 18681820392 e2878660e67411ed972200163e3214c2
+2024/01/11 18:21:48 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18092040580]
+2024/01/11 18:21:48 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [be27b0a4e69911ed972200163e3214c2]
+2024/01/11 18:21:48 第 104 条已有线索 18092040580 be27b0a4e69911ed972200163e3214c2
+2024/01/11 18:21:48 update dwd_f_crm_clue_info set trailstatus=?,task_time=?,taskstatus=?,comeinsource_private=?,position_id=?,comeintime=?,updatetime=?,is_task=?,tasktime=?,seatNumber=?,is_assign=? where uid=? [06 2024-01-11 18:21:36 0 2 1205321180 2024-01-11 18:21:36 2024-01-11 18:21:36 1 2024-01-11 18:21:36 2646 1 be27b0a4e69911ed972200163e3214c2]
+2024/01/11 18:21:48 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15903028766]
+2024/01/11 18:21:48 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [de55b228e69311ed972200163e3214c2]
+2024/01/11 18:21:48 第 105 条已有线索 15903028766 de55b228e69311ed972200163e3214c2
+2024/01/11 18:21:48 update dwd_f_crm_clue_info set taskstatus=?,comeinsource_private=?,seatNumber=?,position_id=?,comeintime=?,updatetime=?,tasktime=?,is_assign=?,trailstatus=?,is_task=?,task_time=? where uid=? [0 2 8050 1205321184 2024-01-11 18:21:36 2024-01-11 18:21:36 2024-01-11 18:21:36 1 08 1 2024-01-11 18:21:36 de55b228e69311ed972200163e3214c2]
+2024/01/11 18:21:48 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15029208030]
+2024/01/11 18:21:48 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [083f1dc6e69a11ed972200163e3214c2]
+2024/01/11 18:21:48 第 106 条已有线索 15029208030 083f1dc6e69a11ed972200163e3214c2
+2024/01/11 18:21:48 update dwd_f_crm_clue_info set position_id=?,comeintime=?,trailstatus=?,is_task=?,task_time=?,taskstatus=?,comeinsource_private=?,seatNumber=?,is_assign=?,updatetime=?,tasktime=? where uid=? [1205321180 2024-01-11 18:21:36 07 1 2024-01-11 18:21:36 0 2 2646 1 2024-01-11 18:21:36 2024-01-11 18:21:36 083f1dc6e69a11ed972200163e3214c2]
+2024/01/11 18:21:48 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18729313507]
+2024/01/11 18:21:48 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [1a3cba8ce69b11ed972200163e3214c2]
+2024/01/11 18:21:48 第 107 条已有线索 18729313507 1a3cba8ce69b11ed972200163e3214c2
+2024/01/11 18:21:48 update dwd_f_crm_clue_info set trailstatus=?,is_task=?,task_time=?,taskstatus=?,comeinsource_private=?,seatNumber=?,position_id=?,is_assign=?,comeintime=?,updatetime=?,tasktime=? where uid=? [07 1 2024-01-11 18:21:36 0 2 2646 1205321180 1 2024-01-11 18:21:36 2024-01-11 18:21:36 2024-01-11 18:21:36 1a3cba8ce69b11ed972200163e3214c2]
+2024/01/11 18:21:48 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18798700206]
+2024/01/11 18:21:48 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [de5db422e67111ed972200163e3214c2]
+2024/01/11 18:21:48 第 108 条已有线索 18798700206 de5db422e67111ed972200163e3214c2
+2024/01/11 18:21:48 update dwd_f_crm_clue_info set taskstatus=?,seatNumber=?,comeintime=?,is_task=?,task_time=?,tasktime=?,comeinsource_private=?,position_id=?,is_assign=?,updatetime=?,trailstatus=? where uid=? [0 2646 2024-01-11 18:21:36 1 2024-01-11 18:21:36 2024-01-11 18:21:36 2 1205321180 1 2024-01-11 18:21:36 07 de5db422e67111ed972200163e3214c2]
+2024/01/11 18:21:49 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15079097473]
+2024/01/11 18:21:49 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [f0fd3198e67111ed972200163e3214c2]
+2024/01/11 18:21:49 第 109 条已有线索 15079097473 f0fd3198e67111ed972200163e3214c2
+2024/01/11 18:21:49 update dwd_f_crm_clue_info set position_id=?,trailstatus=?,taskstatus=?,comeinsource_private=?,task_time=?,tasktime=?,seatNumber=?,is_assign=?,comeintime=?,updatetime=?,is_task=? where uid=? [1205321180 07 0 2 2024-01-11 18:21:36 2024-01-11 18:21:36 2646 1 2024-01-11 18:21:36 2024-01-11 18:21:36 1 f0fd3198e67111ed972200163e3214c2]
+2024/01/11 18:21:49 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13393393377]
+2024/01/11 18:21:49 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [6fa4e71ce68011ed972200163e3214c2]
+2024/01/11 18:21:49 第 110 条已有线索 13393393377 6fa4e71ce68011ed972200163e3214c2
+2024/01/11 18:21:49 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15136188339]
+2024/01/11 18:21:49 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [7f883384e69711ed972200163e3214c2]
+2024/01/11 18:21:49 第 111 条已有线索 15136188339 7f883384e69711ed972200163e3214c2
+2024/01/11 18:21:49 update dwd_f_crm_clue_info set position_id=?,comeintime=?,trailstatus=?,task_time=?,tasktime=?,taskstatus=?,comeinsource_private=?,seatNumber=?,is_assign=?,updatetime=?,is_task=? where uid=? [1205321180 2024-01-11 18:21:36 05 2024-01-11 18:21:36 2024-01-11 18:21:36 0 2 2646 1 2024-01-11 18:21:36 1 7f883384e69711ed972200163e3214c2]
+2024/01/11 18:21:49 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18820147029]
+2024/01/11 18:21:49 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [a1a97374e69711ed972200163e3214c2]
+2024/01/11 18:21:49 第 112 条已有线索 18820147029 a1a97374e69711ed972200163e3214c2
+2024/01/11 18:21:49 update dwd_f_crm_clue_info set trailstatus=?,tasktime=?,taskstatus=?,comeinsource_private=?,updatetime=?,position_id=?,is_assign=?,comeintime=?,is_task=?,task_time=?,seatNumber=? where uid=? [07 2024-01-11 18:21:36 0 2 2024-01-11 18:21:36 1205321180 1 2024-01-11 18:21:36 1 2024-01-11 18:21:36 2646 a1a97374e69711ed972200163e3214c2]
+2024/01/11 18:21:49 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18705153610]
+2024/01/11 18:21:49 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [2f96902ee69b11ed972200163e3214c2]
+2024/01/11 18:21:49 第 113 条已有线索 18705153610 2f96902ee69b11ed972200163e3214c2
+2024/01/11 18:21:49 update dwd_f_crm_clue_info set is_assign=?,comeintime=?,trailstatus=?,tasktime=?,taskstatus=?,comeinsource_private=?,seatNumber=?,position_id=?,updatetime=?,is_task=?,task_time=? where uid=? [1 2024-01-11 18:21:36 08 2024-01-11 18:21:36 0 2 8050 1205321184 2024-01-11 18:21:36 1 2024-01-11 18:21:36 2f96902ee69b11ed972200163e3214c2]
+2024/01/11 18:21:49 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [13545234402]
+2024/01/11 18:21:49 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [16495d0ce68e11ed972200163e3214c2]
+2024/01/11 18:21:49 第 114 条已有线索 13545234402 16495d0ce68e11ed972200163e3214c2
+2024/01/11 18:21:49 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15028804666]
+2024/01/11 18:21:49 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [b1186b48e69811ed972200163e3214c2]
+2024/01/11 18:21:49 第 115 条已有线索 15028804666 b1186b48e69811ed972200163e3214c2
+2024/01/11 18:21:49 update dwd_f_crm_clue_info set comeinsource_private=?,is_assign=?,updatetime=?,trailstatus=?,tasktime=?,task_time=?,taskstatus=?,seatNumber=?,position_id=?,comeintime=?,is_task=? where uid=? [2 1 2024-01-11 18:21:36 06 2024-01-11 18:21:36 2024-01-11 18:21:36 0 2646 1205321180 2024-01-11 18:21:36 1 b1186b48e69811ed972200163e3214c2]
+2024/01/11 18:21:50 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [15204690369]
+2024/01/11 18:21:50 select * from dwd_f_crm_clue_info where uid=? limit 0,1 [33248b2ee67811ed972200163e3214c2]
+2024/01/11 18:21:50 第 116 条已有线索 15204690369 33248b2ee67811ed972200163e3214c2
+2024/01/11 18:21:50 update dwd_f_crm_clue_info set taskstatus=?,seatNumber=?,comeintime=?,trailstatus=?,task_time=?,tasktime=?,position_id=?,is_assign=?,updatetime=?,is_task=?,comeinsource_private=? where uid=? [0 2646 2024-01-11 18:21:36 07 2024-01-11 18:21:36 2024-01-11 18:21:36 1205321180 1 2024-01-11 18:21:36 1 2 33248b2ee67811ed972200163e3214c2]
+2024/01/11 18:21:50 select * from dwd_f_userbase_contacts where phone=? limit 0,1 [18603048881]

+ 98 - 24
clueSync/kc.go

@@ -5,6 +5,7 @@ import (
 	"encoding/json"
 	"fmt"
 	"log"
+	"strconv"
 	"strings"
 	"time"
 
@@ -44,6 +45,9 @@ func kcJob(data map[string]interface{}) int {
 	clueData := TiDb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"uid": uId}, "", "")
 	if clueData != nil && len(*clueData) > 0 {
 		clueId = common.Int64All((*clueData)["id"])
+		if cicount := TiDb.Count("dwd_f_csm_customer_info", map[string]interface{}{"clue_id": clueId}); cicount > 0 {
+			return 1
+		}
 		starttime := common.ObjToString(data["vip_starttime"])
 		endtime := common.ObjToString(data["vip_endtime"])
 		// user_role := common.IntAll(data["user_role"])
@@ -156,7 +160,7 @@ func kcJob(data map[string]interface{}) int {
 				"intended_products":   wantGoods,
 				"customer_budget":     customerBudget,
 				"contact_type":        isPolicymaker,
-				"positon":             job,
+				"position":            job,
 				"industry":            belongToIndustry,
 				"follow_project_area": areaCode,
 			})
@@ -245,7 +249,7 @@ func kcJob(data map[string]interface{}) int {
 }
 
 func cAutoDraw(entId int) (positionId int64, name string) {
-	query := `select * from jy_salesperson_info where status = 0 and groupname = "客户成功组"`
+	query := `SELECT name,position_id FROM dwd_d_crm_department_level_succbi WHERE bi_pcode = (SELECT bi_code FROM dwd_d_crm_department_level_succbi WHERE name = "客户成功组") and resign = 0`
 	data := TiDb.SelectBySql(query)
 	if data != nil && len(*data) > 0 {
 		if entId > 0 {
@@ -256,7 +260,7 @@ func cAutoDraw(entId int) (positionId int64, name string) {
 				return
 			}
 		}
-		sql := `select a.name,a.count from dwd_f_csm_customer_autodraw_record a INNER JOIN jy_salesperson_info b on (a.name = b.name) where b.status = 0 and b.groupname = "客户成功组"`
+		sql := `select a.name,a.count from dwd_f_csm_customer_autodraw_record a INNER JOIN dwd_d_crm_department_level_succbi b on (a.name = b.name) where b.resign = 0`
 		countData := TiDb.SelectBySql(sql)
 		if countData != nil && len(*countData) > 0 {
 			for _, v := range *data {
@@ -270,7 +274,7 @@ func cAutoDraw(entId int) (positionId int64, name string) {
 				//有新员工直接分给新员工
 				if !isOk {
 					name = common.ObjToString(v["name"])
-					rData := TiDb.FindOne("dwd_f_csm_customer_autodraw_record", map[string]interface{}{}, "", "count asc")
+					rData := TiDb.FindOne("dwd_f_csm_customer_autodraw_record", map[string]interface{}{}, "", "count desc")
 					TiDb.Insert("dwd_f_csm_customer_autodraw_record", map[string]interface{}{
 						"name":  name,
 						"count": common.Int64All((*rData)["count"]),
@@ -295,7 +299,7 @@ func cAutoDraw(entId int) (positionId int64, name string) {
 		}
 		for _, v := range *data {
 			if name == common.ObjToString(v["name"]) {
-				positionId = getPositionId(common.ObjToString(v["phone"]))
+				positionId = common.Int64All(v["position_id"])
 			}
 		}
 	}
@@ -375,6 +379,8 @@ func ordersClue() {
 			saleDep := common.ObjToString(v["saleDep"])
 			salesperson := common.ObjToString(v["salesperson"])
 			user_phone := common.ObjToString(v["user_phone"])
+			createperson := common.ObjToString(v["create_person"])
+			saleMoney := common.ObjToString(v["saleMoney"])
 			userId, uId, cluename, seatNumber, positionId, trailstatus, clueId := common.ObjToString(v["user_id"]), "", "", "", int64(0), "", int64(0)
 			product_type_str2 := `"大会员","企业商机管理","VIP订阅"`
 			product_type := common.ObjToString(v["product_type"])
@@ -416,13 +422,76 @@ func ordersClue() {
 				} else {
 					trailstatus = "01"
 				}
+				isGroup, isCommerce := GetCompanyType(cluename) //判断是否集团公司、工商库
 				clueData := TiDb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"uid": uId}, "", "")
 				if clueData == nil || len(*clueData) == 0 {
-					if strings.HasPrefix(saleDep, "01") {
-						saleData := TiDb.FindOne("jy_salesperson_info", map[string]interface{}{"name": salesperson}, "", "")
+					log.Println("saleDep", saleDep)
+					if strings.HasPrefix(saleDep, "01") || strings.HasPrefix(saleDep, "05") {
+						//撞单
+						log.Println("销售部订单", saleDep)
+						if strings.Contains(salesperson, ",") {
+							log.Println("销售部撞单 ", salesperson)
+							if saleMoney != "" {
+								var saleMoneyStu = struct {
+									Data []struct {
+										Name  string
+										Money interface{}
+									}
+								}{}
+								json.Unmarshal([]byte(saleMoney), &saleMoneyStu)
+								areAllEqual := true
+								if firstMoney, ok := saleMoneyStu.Data[0].Money.(string); ok {
+									maxMoney := "0"
+									log.Println("销售部订单firstMoney", saleMoneyStu, saleMoneyStu.Data[0].Money)
+									for _, item := range saleMoneyStu.Data {
+										if item.Name != "合计" && item.Money != firstMoney {
+											areAllEqual = false
+											break
+										}
+									}
+									log.Println("销售部订单areAllEqual", areAllEqual)
+									if areAllEqual {
+										salesperson = createperson
+									} else {
+										for _, item := range saleMoneyStu.Data {
+											money1, _ := strconv.ParseFloat(item.Money.(string), 64)
+											money2, _ := strconv.ParseFloat(maxMoney, 64)
+											if item.Name != "合计" && money1 > money2 {
+												maxMoney = item.Money.(string)
+												salesperson = item.Name
+											}
+										}
+									}
+								} else {
+									maxMoney := 0.0
+									log.Println("销售部订单firstMoney222", saleMoneyStu, saleMoneyStu.Data[0].Money)
+									for _, item := range saleMoneyStu.Data {
+										if item.Name != "合计" && item.Money != firstMoney {
+											areAllEqual = false
+											break
+										}
+									}
+									log.Println("销售部订单areAllEqual222", areAllEqual)
+									if areAllEqual {
+										salesperson = createperson
+									} else {
+										for _, item := range saleMoneyStu.Data {
+											if item.Name != "合计" && item.Money.(float64) > maxMoney {
+												maxMoney = item.Money.(float64)
+												salesperson = item.Name
+											}
+										}
+									}
+								}
+							} else {
+								salesperson = createperson
+							}
+						}
+						log.Println("销售部订单salesperson", salesperson)
+						saleData := TiDb.FindOne("dwd_f_crm_personnel_management", map[string]interface{}{"name": salesperson}, "", "")
 						if saleData != nil {
-							seatNumber = common.ObjToString((*saleData)["seatNumber"])
-							positionId = getPositionId(common.ObjToString((*saleData)["phone"]))
+							seatNumber = common.ObjToString((*saleData)["seat_number"])
+							positionId = common.Int64All((*saleData)["position_id"])
 						}
 						clueId = TiDb.Insert("dwd_f_crm_clue_info", map[string]interface{}{
 							"userid":               userId,
@@ -442,22 +511,27 @@ func ordersClue() {
 							"comeinsource_private": 2,
 							"is_task":              0,
 							"taskstatus":           0,
+							"company_nature":       isGroup,
+							"company_verification": isCommerce,
 						})
 					} else if strings.HasPrefix(saleDep, "03") {
+						log.Println("市场部订单", saleDep)
 						clueId = TiDb.Insert("dwd_f_crm_clue_info", map[string]interface{}{
-							"userid":       userId,
-							"uid":          uId,
-							"is_assign":    -2,
-							"createtime":   nowTime,
-							"updatetime":   nowTime,
-							"cluename":     cluename,
-							"top_cluetype": "4",
-							"sub_cluetype": "154",
-							"trailstatus":  trailstatus,
-							"name":         user_phone,
-							"phone":        user_phone,
-							"is_task":      0,
-							"taskstatus":   0,
+							"userid":               userId,
+							"uid":                  uId,
+							"is_assign":            -2,
+							"createtime":           nowTime,
+							"updatetime":           nowTime,
+							"cluename":             cluename,
+							"top_cluetype":         "4",
+							"sub_cluetype":         "154",
+							"trailstatus":          trailstatus,
+							"name":                 user_phone,
+							"phone":                user_phone,
+							"is_task":              0,
+							"taskstatus":           0,
+							"company_nature":       isGroup,
+							"company_verification": isCommerce,
 						})
 					}
 					if clueId > 0 {
@@ -812,8 +886,8 @@ func kcHistorySync() {
 					}
 					saleData := TiDb.FindOne("jy_salesperson_info", map[string]interface{}{"name": salesperson}, "", "")
 					if saleData != nil {
-						seatNumber = common.ObjToString((*saleData)["seatNumber"])
-						salePositionId = getPositionId(common.ObjToString((*saleData)["phone"]))
+						seatNumber = common.ObjToString((*saleData)["seat_number"])
+						salePositionId = common.Int64All((*saleData)["position_id"])
 					}
 					clueId = TiDb.Insert("dwd_f_crm_clue_info", map[string]interface{}{
 						"userid":               userId,

+ 4 - 0
clueSync/main.go

@@ -25,6 +25,7 @@ var (
 	Es           elastic.Es
 	Mgo          *mongodb.MongodbSim
 	MgoLog       *mongodb.MongodbSim
+	MgoQyxy      *mongodb.MongodbSim
 	// configFile = flag.String("c", "./config.yaml", "配置文件")
 	mode = flag.Int("m", 1, "")
 )
@@ -101,6 +102,7 @@ func main() {
 	redis.InitRedis(cfg.RedisServer)
 	Mgo = mongodb.NewMgo(cfg.Mgo.Address, cfg.Mgo.DbName, cfg.Mgo.DbSize)
 	MgoLog = mongodb.NewMgoWithUser(cfg.MgoLog.Address, cfg.MgoLog.DbName, cfg.MgoLog.User, cfg.MgoLog.Password, cfg.MgoLog.DbSize)
+	MgoQyxy = mongodb.NewMgoWithUser(cfg.MgoQyxy.Address, cfg.MgoQyxy.DbName, cfg.MgoQyxy.User, cfg.MgoQyxy.Password, cfg.MgoQyxy.DbSize)
 	InitArea()
 	if *mode == 1 {
 		// 未支付订单 30分钟一次
@@ -192,5 +194,7 @@ func main() {
 		clueSync1()
 	} else if *mode == 29 {
 		hlyjSync4()
+	} else if *mode == 30 {
+		lzhSync()
 	}
 }

+ 1 - 0
clueSync/nohup.out

@@ -1912205,3 +1912205,4 @@ main.hlyjSync()
 	/Users/xuzhiheng/jianyu/works/datatools/clueSync/hlyj.go:37 +0x96
 main.main()
 	/Users/xuzhiheng/jianyu/works/datatools/clueSync/main.go:213 +0xe54
+./clueSync: ./clueSync: cannot execute binary file

+ 94 - 22
clueSync/trailContent.go

@@ -67,17 +67,9 @@ func trail() {
 }
 
 func getSale(name, phone string) (positionId, clueId int64) {
-	saleData := TiDb.FindOne("jy_salesperson_info", map[string]interface{}{"name": name, "status": 0}, "", "")
+	saleData := TiDb.FindOne("dwd_f_crm_personnel_management", map[string]interface{}{"name": name, "resign": 0}, "", "")
 	if saleData != nil && len(*saleData) > 0 {
-		salePhone := common.ObjToString((*saleData)["phone"])
-		userInfo := TiDb.FindOne("dwd_f_userbase_baseinfo", map[string]interface{}{"phone": salePhone}, "", "")
-		if userInfo != nil && len(*userInfo) > 0 {
-			base_user_id := common.Int64All((*userInfo)["base_user_id"])
-			positionData := Base.FindOne("base_position", map[string]interface{}{"type": 1, "user_id": base_user_id, "ent_id": 25917}, "", "")
-			if positionData != nil && len(*positionData) > 0 {
-				positionId = common.Int64All((*positionData)["id"])
-			}
-		}
+		positionId = common.Int64All((*saleData)["position_id"])
 	} else {
 		positionId = -1
 	}
@@ -92,17 +84,9 @@ func getSale(name, phone string) (positionId, clueId int64) {
 }
 
 func getSeatNumberPositionId(seatNumber string) (positionId int64) {
-	saleData := TiDb.FindOne("jy_salesperson_info", map[string]interface{}{"seatNumber": seatNumber}, "", "")
+	saleData := TiDb.FindOne("dwd_f_crm_personnel_management", map[string]interface{}{"seat_number": seatNumber}, "", "")
 	if saleData != nil && len(*saleData) > 0 {
-		salePhone := common.ObjToString((*saleData)["phone"])
-		userInfo := TiDb.FindOne("dwd_f_userbase_baseinfo", map[string]interface{}{"phone": salePhone}, "", "")
-		if userInfo != nil && len(*userInfo) > 0 {
-			base_user_id := common.Int64All((*userInfo)["base_user_id"])
-			positionData := Base.FindOne("base_position", map[string]interface{}{"type": 1, "user_id": base_user_id, "ent_id": 25917}, "", "")
-			if positionData != nil && len(*positionData) > 0 {
-				positionId = common.Int64All((*positionData)["id"])
-			}
-		}
+		positionId = common.Int64All((*saleData)["position_id"])
 	}
 	return
 }
@@ -152,7 +136,7 @@ func getXlsx() {
 						})
 					} else {
 						//在公海
-						positionId, seatNumber, _, _ := autoDraw("C")
+						positionId, seatNumber, _, _, _ := autoDraw("C", "", 0, 0)
 						TiDb.Update("dwd_f_crm_clue_info", map[string]interface{}{"id": clueId}, map[string]interface{}{
 							"seatNumber":   seatNumber,
 							"position_id":  positionId,
@@ -183,7 +167,7 @@ func getXlsx() {
 					if base != nil && len(*base) > 0 {
 						uId := common.ObjToString((*base)["uid"])
 						userId := common.ObjToString((*base)["userid"])
-						positionId, seatNumber, _, _ := autoDraw("C")
+						positionId, seatNumber, _, _, _ := autoDraw("C", "", 0, 0)
 						clueId := TiDb.Insert("dwd_f_crm_clue_info", map[string]interface{}{
 							"userid":       userId,
 							"uid":          uId,
@@ -426,3 +410,91 @@ func app_xzcyh_sync() {
 		}
 	}
 }
+
+func lzhSync() {
+	nowTime, count := time.Now().Format("2006-01-02 15:04:05"), 0
+	data := TiDbData.SelectBySql(`SELECT * FROM customer where owner in (2646,8050) and status999 in ("status0","status1","status2","status3")`)
+	if data != nil {
+		for _, v := range *data {
+			count++
+			owner := common.ObjToString(v["owner"])
+			positionId, seatNumber, trailstatus, uId, userId := int64(0), "", "", "", ""
+			if owner == "2646" {
+				positionId = 1205321180
+				seatNumber = "2646"
+			} else {
+				positionId = 1205321184
+				seatNumber = "8050"
+			}
+			phone := common.ObjToString(v["phone"])
+			status := common.ObjToString(v["status999"])
+			cluename := common.ObjToString(v["company"])
+			name := common.ObjToString(v["username"])
+			position := common.ObjToString(v["job"])
+			if status == "status0" {
+				trailstatus = "08"
+			} else if status == "status1" {
+				trailstatus = "07"
+			} else if status == "status2" {
+				trailstatus = "06"
+			} else {
+				trailstatus = "05"
+			}
+			cdata := TiDb.FindOne("dwd_f_userbase_contacts", map[string]interface{}{"phone": phone}, "", "")
+			if cdata != nil {
+				uId = common.ObjToString((*cdata)["baseinfo_id"])
+				cluedata := TiDb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"uid": uId}, "", "")
+				if cluedata != nil {
+					log.Println("第", count, "条已有线索", phone, uId)
+					seatNumbersss := common.ObjToString((*cluedata)["seatNumber"])
+					if seatNumbersss == "" {
+						TiDb.Update("dwd_f_crm_clue_info", map[string]interface{}{"uid": uId}, map[string]interface{}{
+							"seatNumber":           seatNumber,
+							"position_id":          positionId,
+							"is_assign":            1,
+							"comeintime":           nowTime,
+							"updatetime":           nowTime,
+							"trailstatus":          trailstatus,
+							"is_task":              1,
+							"task_time":            nowTime,
+							"tasktime":             nowTime,
+							"taskstatus":           0,
+							"comeinsource_private": 2,
+						})
+					}
+				} else {
+					udata := TiDb.FindOne("dwd_f_userbase_baseinfo", map[string]interface{}{"uid": uId}, "", "")
+					if udata != nil {
+						userId = common.ObjToString((*udata)["userid"])
+						clueId := TiDb.Insert("dwd_f_crm_clue_info", map[string]interface{}{
+							"userid":               userId,
+							"uid":                  uId,
+							"seatNumber":           seatNumber,
+							"position_id":          positionId,
+							"is_assign":            1,
+							"comeintime":           nowTime,
+							"createtime":           nowTime,
+							"updatetime":           nowTime,
+							"cluename":             cluename,
+							"top_cluetype":         "4",
+							"sub_cluetype":         "154",
+							"trailstatus":          trailstatus,
+							"name":                 name,
+							"phone":                phone,
+							"position":             position,
+							"comeinsource_private": 2,
+							"is_task":              1,
+							"task_time":            nowTime,
+							"tasktime":             nowTime,
+							"taskstatus":           0,
+						})
+						if clueId > 0 {
+							log.Println("第", count, "条保存成功", phone, uId)
+						}
+					}
+				}
+			}
+
+		}
+	}
+}

BIN
esUpdate/esUpdate


BIN
infoCenter.zip


BIN
lt_etl/lt_etl


BIN
lt_json/lt_json


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
lt_json/main.go


BIN
telemarketingEtl/.DS_Store


+ 2 - 2
telemarketingEtl/entity/dwd_f_crm_open_sea.go

@@ -124,7 +124,7 @@ func GetOpenSea() {
 			continue
 		}
 		if !mongodb.IsObjectIdHex(userid) {
-			userid = GetUserIdByPositionId(userid)
+			userid, _ = GetUserIdByPositionId(userid)
 		}
 		if userid == "" {
 			continue
@@ -179,7 +179,7 @@ func GetOpenSea() {
 			continue
 		}
 		if !mongodb.IsObjectIdHex(userid) {
-			userid = GetUserIdByPositionId(userid)
+			userid, _ = GetUserIdByPositionId(userid)
 		}
 		if userid == "" {
 			continue

+ 2 - 2
telemarketingEtl/entity/dwd_f_userbase_event_info.go

@@ -156,7 +156,7 @@ func EventInfoAdd(start, end int64) {
 				}
 				//职位id转换userid
 				if !mongodb.IsObjectIdHex(userid) {
-					userid = GetUserIdByPositionId(userid)
+					userid, _ = GetUserIdByPositionId(userid)
 				}
 				if userid == "" {
 					continue
@@ -293,7 +293,7 @@ func Collection(start, end int64, fields []string) {
 		for _, v := range *l {
 			userid := gconv.String(v["userid"])
 			if !mongodb.IsObjectIdHex(userid) {
-				userid = GetUserIdByPositionId(userid)
+				userid, _ = GetUserIdByPositionId(userid)
 			}
 			createtime := gconv.String(v["createdate"])
 			bid := gconv.String(v["bid"])

+ 1 - 1
telemarketingEtl/entity/dwd_f_userbase_search_info.go

@@ -112,7 +112,7 @@ func SearchInfoAdd(start, end int64) {
 				return
 			}
 			if !mongodb.IsObjectIdHex(userid) {
-				userid = GetUserIdByPositionId(userid)
+				userid, _ = GetUserIdByPositionId(userid)
 			}
 			if userid == "" {
 				return

+ 17 - 3
telemarketingEtl/entity/dwd_f_userbase_visit_info.go

@@ -62,12 +62,17 @@ func VisitInfoAdd(start, end int64) {
 					// 	<-sPool
 					// 	sWait.Done()
 					// }()
-					userid := gconv.String(thisData["userid"])
+					userid, uid := gconv.String(thisData["userid"]), ""
 					if userid == "" {
 						return
 					}
 					if !mongodb.IsObjectIdHex(userid) {
-						userid = GetUserIdByPositionId(userid)
+						userid, uid = GetUserIdByPositionId(userid)
+					} else {
+						idmdata := config.JianyuSubjectdb.SelectBySql(`select uid from dwd_f_userbase_id_mapping where userid = "` + userid + `"`)
+						if idmdata != nil {
+							uid = gconv.String((*idmdata)[0]["uid"])
+						}
 					}
 					if userid == "" {
 						return
@@ -103,7 +108,16 @@ func VisitInfoAdd(start, end int64) {
 														(userid,DATE, number, platform,createtime,contentnum)
 														VALUES (?,?,?,?,?,?)`, userid, craetetimeStr, 1, platform, craetetimeStr, contentnum)
 					}
-					//
+					if uid != "" {
+						if config.JianyuSubjectdb.CountBySql(`select count(1) from dwd_f_crm_attribute_label where uid = ?`, uid) > 0 {
+							config.JianyuSubjectdb.Update("dwd_f_crm_attribute_label", map[string]interface{}{"uid": uid}, map[string]interface{}{"last_login_time": craetetimeStr})
+						} else {
+							config.JianyuSubjectdb.Insert("dwd_f_crm_attribute_label", map[string]interface{}{
+								"uid":             uid,
+								"last_login_time": craetetimeStr,
+							})
+						}
+					}
 				}(thisData)
 				count++
 				if count%5000 == 0 {

+ 3 - 2
telemarketingEtl/entity/entity.go

@@ -29,7 +29,7 @@ const (
 )
 
 // 根据职位id获取mongodb userid
-func GetUserIdByPositionId(positionId string) (userId string) {
+func GetUserIdByPositionId(positionId string) (userId, uid string) {
 	if positionId == "" || positionId == "0" {
 		return
 	}
@@ -37,10 +37,11 @@ func GetUserIdByPositionId(positionId string) (userId string) {
 	if i_positionId == 0 {
 		return
 	}
-	data := config.JianyuSubjectdb.SelectBySql(`select userid from dwd_f_userbase_id_mapping where position_id =? limit 1`, i_positionId)
+	data := config.JianyuSubjectdb.SelectBySql(`select userid,uid from dwd_f_userbase_id_mapping where position_id =? limit 1`, i_positionId)
 	if data == nil || len(*data) <= 0 {
 		return
 	}
 	userId = gconv.String((*data)[0]["userid"])
+	uid = gconv.String((*data)[0]["uid"])
 	return
 }

+ 1 - 1
telemarketingEtl/entity/old.go

@@ -62,7 +62,7 @@ func VisitInfoAddOld(start, end int64) {
 							return
 						}
 						if !mongodb.IsObjectIdHex(userid) {
-							userid = GetUserIdByPositionId(userid)
+							userid, _ = GetUserIdByPositionId(userid)
 						}
 						if userid == "" {
 							return

BIN
telemarketingEtl/telemarketingEtl


BIN
tmp_projectId/tmp_projectId


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels