Przeglądaj źródła

定时任务修改

WH01243 11 miesięcy temu
rodzic
commit
59eb6fe59b
1 zmienionych plików z 7 dodań i 2 usunięć
  1. 7 2
      clueSync/job.go

+ 7 - 2
clueSync/job.go

@@ -201,7 +201,7 @@ func FormatData(data map[string]interface{}, item string) (bool, bool) {
 		phone = common.ObjToString(data["phone"])
 		sourceId = common.Int64All(data["sourceId"])
 	}
-	if cluename == "" && item != "message" && item != "orders" && item != "readClue" {
+	if cluename == "" && item != "message" && item != "orders" && item != "readClue" && item != "rebind" {
 		cluename = phone //没有线索名,手机号代替
 	}
 	cluename = strings.ReplaceAll(cluename, " ", "")
@@ -264,7 +264,12 @@ func FormatData(data map[string]interface{}, item string) (bool, bool) {
 	log.Println("data -------", position_id, seatNumber, saleName, pIsOk, isFreeze, noticePositionId)
 	if position_id > 0 && seatNumber != "" {
 		uCount, oks := TiDb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"uid": uId}, "", ""), true //查当前线索是否已存在
-		if uCount != nil && len(*uCount) > 0 {                                                               //已存在,走更新
+		if uCount != nil && len(*uCount) > 0 {
+			isUpdate := gconv.Int64((*uCount)["is_artificially_modified"])
+			if isUpdate == 1 {
+				cluename = ""
+			}
+			//已存在,走更新
 			batch_import := common.ObjToString((*uCount)["batch_import"])
 			if batch_import != "" && item == "users" { //有导入批次号还是新用户,不执行
 				return true, true