Browse Source

Merge branch 'dev_v1.5.24_wh' of jianyu/datatools into feature/v1.5.24

王浩 6 months ago
parent
commit
5b6bd0da1e
1 changed files with 15 additions and 11 deletions
  1. 15 11
      clueSync/kc.go

+ 15 - 11
clueSync/kc.go

@@ -206,17 +206,21 @@ func kcJob(data map[string]interface{}) int {
 			log.Println("移交客成positionId", customerPositionId, customerName, saleDep, orderPositionId, salesperson, true)
 			oldName := gconv.String((*csmdata)["name"])
 			updateMap := map[string]interface{}{
-				"is_transfer":           0,
-				"is_renewal_protection": 0,
-				"product_access":        product,
-				"buy_subject":           buy_subject,
-				"transfertime":          nowTime,
-				"service_starttime":     starttime,
-				"service_endtime":       endtime,
-				"ent_id":                entId,
-				"company_name":          company_name,
-				"name":                  customerName,
-				"position_id":           customerPositionId,
+				"is_transfer":               0,
+				"is_renewal_protection":     0,
+				"product_access":            product,
+				"buy_subject":               buy_subject,
+				"transfertime":              nowTime,
+				"service_starttime":         starttime,
+				"service_endtime":           endtime,
+				"ent_id":                    entId,
+				"company_name":              company_name,
+				"name":                      customerName,
+				"position_id":               customerPositionId,
+				"relationship_building_way": 1,
+			}
+			if is_transfer == 0 {
+				delete(updateMap, "relationship_building_way")
 			}
 			TiDb.Update("dwd_f_csm_customer_info", map[string]interface{}{"clue_id": clueId}, updateMap)
 			TiDb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{