|
@@ -601,20 +601,22 @@ func ClueImportSync(this *biservice.ClueImportReq) (string, int) {
|
|
if clueData == nil || len(*clueData) == 0 {
|
|
if clueData == nil || len(*clueData) == 0 {
|
|
countAdd++
|
|
countAdd++
|
|
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"],
|
|
|
|
- "uid": v["uId"],
|
|
|
|
- "is_assign": 0,
|
|
|
|
- "comeintime": nowTime,
|
|
|
|
- "createtime": nowTime,
|
|
|
|
- "updatetime": nowTime,
|
|
|
|
- "cluename": cluename,
|
|
|
|
- "top_cluetype": v["top_cluetype"],
|
|
|
|
- "sub_cluetype": v["sub_cluetype"],
|
|
|
|
- "trailstatus": "01",
|
|
|
|
- "name": name,
|
|
|
|
- "phone": phone,
|
|
|
|
- "position": position,
|
|
|
|
- "batch_import": this.Pcbh,
|
|
|
|
|
|
+ "userid": v["userId"],
|
|
|
|
+ "uid": v["uId"],
|
|
|
|
+ "is_assign": 0,
|
|
|
|
+ "comeintime": nowTime,
|
|
|
|
+ "createtime": nowTime,
|
|
|
|
+ "updatetime": nowTime,
|
|
|
|
+ "cluename": cluename,
|
|
|
|
+ "top_cluetype": v["top_cluetype"],
|
|
|
|
+ "sub_cluetype": v["sub_cluetype"],
|
|
|
|
+ "trailstatus": "01",
|
|
|
|
+ "name": name,
|
|
|
|
+ "phone": phone,
|
|
|
|
+ "position": position,
|
|
|
|
+ "batch_import": this.Pcbh,
|
|
|
|
+ "comeintime_open": nowTime,
|
|
|
|
+ "comeinsource_open": 1,
|
|
})
|
|
})
|
|
JyBiTidb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
|
|
JyBiTidb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
|
|
"clue_id": clueId,
|
|
"clue_id": clueId,
|
|
@@ -858,6 +860,11 @@ func ClueImportSync(this *biservice.ClueImportReq) (string, int) {
|
|
}
|
|
}
|
|
return result, status
|
|
return result, status
|
|
} else {
|
|
} else {
|
|
|
|
+ JyBiTidb.Update("dwd_f_crm_bulk_import_record", map[string]interface{}{"PCBH": this.Pcbh}, map[string]interface{}{
|
|
|
|
+ "DRJSSJ": time.Now().Format(date.Date_Full_Layout), //结束时间
|
|
|
|
+ "SBYY": "有正在进行的导入任务", //失败原因
|
|
|
|
+ "DRZT": "导入失败",
|
|
|
|
+ })
|
|
return "有正在进行的导入任务", 2
|
|
return "有正在进行的导入任务", 2
|
|
}
|
|
}
|
|
}
|
|
}
|