WH01243 преди 4 месеца
родител
ревизия
43e3fce78d
променени са 1 файла, в които са добавени 10 реда и са изтрити 5 реда
  1. 10 5
      clueSync/job.go

+ 10 - 5
clueSync/job.go

@@ -552,7 +552,7 @@ func SaveClue(item, userId, uId, top_cluetype, sub_cluetype, topname, subname, c
 			"label":                1,
 			"labelChangeTime":      time.Now().Format("2006-01-02"),
 		})
-		Ehandle(clueId, uId, userId, cluename, "01")
+		Ehandle(clueId, uId, userId, cluename, "01", "E")
 		uodateId1 = TiDb.InsertByTx(tx, "dwd_f_crm_clue_change_record", map[string]interface{}{
 			"clue_id":     clueId,
 			"position_id": positionId,
@@ -678,7 +678,7 @@ func SaveClue0(item, userId, uId, top_cluetype, sub_cluetype, topname, subname,
 			"label":                1,
 			"labelChangeTime":      time.Now().Format("2006-01-02"),
 		})
-		Ehandle(clueId, uId, userId, cluename, "01")
+		Ehandle(clueId, uId, userId, cluename, "01", "E")
 		uodateId1 = TiDb.InsertByTx(tx, "dwd_f_crm_clue_change_record", map[string]interface{}{
 			"clue_id":     clueId,
 			"position_id": positionId,
@@ -757,8 +757,9 @@ func WorkUpdateClue(data map[string]interface{}, saleData []map[string]interface
 	old_top_cluetype := gconv.String(data["top_cluetype"])
 	old_sub_cluetype := gconv.String(data["sub_cluetype"])
 	label := gconv.Int64(data["label"])
+	e_label := gconv.String(data["e_label"])
 	old_topname, old_subname := "", ""
-	Ehandle(clueId, uId, userId, cluename, trailstatus)
+	Ehandle(clueId, uId, userId, cluename, trailstatus, e_label)
 	is_transfer := common.IntAll(data["is_transfer"])
 	if taskstatus == 1 || is_task == 0 {
 		taskTime = gconv.String(common.If(item != "users", nowTime, nowTimes)) //任务时间,正常的是当前时间,新用户是当前时间+12个小时
@@ -1353,7 +1354,8 @@ func UpdateClue(data map[string]interface{}, saleData []map[string]interface{},
 	is_transfer := common.IntAll(data["is_transfer"])
 	oldLabelChangeTime := gconv.String(data["labelChangeTime"])
 	label := gconv.Int64(data["label"])
-	Ehandle(clueId, uId, userId, cluename, trailstatus)
+	e_label := gconv.String(data["e_label"])
+	Ehandle(clueId, uId, userId, cluename, trailstatus, e_label)
 	if taskstatus == 1 || is_task == 0 {
 		taskTime = gconv.String(common.If(item != "users", nowTime, nowTimes)) //任务时间,正常的是当前时间,新用户是当前时间+12个小时
 	} else {
@@ -2202,7 +2204,10 @@ func LabelHandel(tx *sql.Tx, oldlabelType, labelType int64, uId, level, oldTrail
 		log.Println("线索标签修改", ok)
 	}
 }
-func Ehandle(clueId int64, uid, userId, clueName, trailstatus string) {
+func Ehandle(clueId int64, uid, userId, clueName, trailstatus, e_label string) {
+	if e_label != "" {
+		return
+	}
 	//  最近访问时间:最近1天内
 	beforeTime := time.Now().AddDate(0, 0, -1).Format("2006-01-02 15:04:05")
 	if TiDb.CountBySql("select  count(1) as  count  from  dwd_f_userbase_visit_info where userid=? and    date>=? and  number>0 ", userId, beforeTime) <= 0 {