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