|
@@ -537,17 +537,7 @@ func ClueImportSync(this *biservice.ClueImportReq) (string, int) {
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
dataMap["uId"] = common.GetRandom(32)
|
|
dataMap["uId"] = common.GetRandom(32)
|
|
- JyBiTidb.Insert("dwd_f_userbase_baseinfo", map[string]interface{}{
|
|
|
|
- "userid": v["userId"],
|
|
|
|
- "uid": dataMap["uId"],
|
|
|
|
- "name": name,
|
|
|
|
- "phone": phone,
|
|
|
|
- "source": 4,
|
|
|
|
- "company_name": companyName,
|
|
|
|
- "status": 3,
|
|
|
|
- "createtime": nowTime,
|
|
|
|
- "updatetime": nowTime,
|
|
|
|
- })
|
|
|
|
|
|
+ dataMap["isOk"] = "0"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -600,6 +590,19 @@ func ClueImportSync(this *biservice.ClueImportReq) (string, int) {
|
|
clueData := JyBiTidb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"phone": phone}, "", "")
|
|
clueData := JyBiTidb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"phone": phone}, "", "")
|
|
if clueData == nil || len(*clueData) == 0 {
|
|
if clueData == nil || len(*clueData) == 0 {
|
|
countAdd++
|
|
countAdd++
|
|
|
|
+ if v["isOk"] != nil {
|
|
|
|
+ JyBiTidb.Insert("dwd_f_userbase_baseinfo", map[string]interface{}{
|
|
|
|
+ "userid": v["userId"],
|
|
|
|
+ "uid": v["uId"],
|
|
|
|
+ "name": name,
|
|
|
|
+ "phone": phone,
|
|
|
|
+ "source": 4,
|
|
|
|
+ "company_name": cluename,
|
|
|
|
+ "status": 3,
|
|
|
|
+ "createtime": nowTime,
|
|
|
|
+ "updatetime": nowTime,
|
|
|
|
+ })
|
|
|
|
+ }
|
|
clueId := JyBiTidb.Insert("dwd_f_crm_clue_info", map[string]interface{}{
|
|
clueId := JyBiTidb.Insert("dwd_f_crm_clue_info", map[string]interface{}{
|
|
"userid": v["userId"],
|
|
"userid": v["userId"],
|
|
"uid": v["uId"],
|
|
"uid": v["uId"],
|