Эх сурвалжийг харах

Merge branch 'dev/v1.0.7' of BaseService/biService into feature/v1.0.7

xuzhiheng 2 жил өмнө
parent
commit
a52bdda3f1
1 өөрчлөгдсөн 21 нэмэгдсэн , 14 устгасан
  1. 21 14
      service/clue.go

+ 21 - 14
service/clue.go

@@ -601,20 +601,22 @@ func ClueImportSync(this *biservice.ClueImportReq) (string, int) {
 					if clueData == nil || len(*clueData) == 0 {
 						countAdd++
 						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{}{
 							"clue_id":     clueId,
@@ -858,6 +860,11 @@ func ClueImportSync(this *biservice.ClueImportReq) (string, int) {
 		}
 		return result, status
 	} 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
 	}
 }