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

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

王浩 11 сар өмнө
parent
commit
db663b6ca1
1 өөрчлөгдсөн 4 нэмэгдсэн , 26 устгасан
  1. 4 26
      clueSync/job.go

+ 4 - 26
clueSync/job.go

@@ -1046,18 +1046,8 @@ func WorkUpdateClue(data map[string]interface{}, saleData []map[string]interface
 		if recordCount <= 0 || is_assign == 0 {
 			if trailstatus == "00" && trailstatusTime != "" && time.Now().Unix()-trailstatusTimes.Unix() < 86400 {
 			} else {
-				if old_sub_cluetype != sub_cluetype && !is_ok {
-					if is_transfer != 1 {
-						updateId5 = TiDb.InsertByTx(tx, "dwd_f_crm_clue_change_record", map[string]interface{}{
-							"clue_id":     clueId,
-							"position_id": common.If(trailstatus == "00" || is_assign == 0 || is_assign == -1, positionId, common.If(is_assign == 1, positionId, common.Int64All(data["position_id"]))),
-							"change_type": "加入任务车",
-							"new_value":   gconv.String(common.If(gconv.Int64(data["position_id"]) == 0, "线索自动分配", "线索来源自动更新")) + "-" + topname + "-" + subname,
-							"createtime":  nowTime,
-							"BCPCID":      common.GetRandom(32),
-							"operator_id": -1,
-						})
-					} else {
+				if is_transfer == 1 {
+					if old_sub_cluetype != sub_cluetype && !is_ok {
 						cdata := TiDb.FindOne("dwd_f_csm_customer_info", map[string]interface{}{"clue_id": clueId}, "", "")
 						if cdata != nil && len(*cdata) > 0 {
 							kcpositionId := common.Int64All((*cdata)["position_id"])
@@ -1091,7 +1081,6 @@ func WorkUpdateClue(data map[string]interface{}, saleData []map[string]interface
 							})
 						}
 					}
-
 				} else if gconv.Int64(clueUpdateData["is_task"]) == 1 && gconv.Int64(data["is_task"]) == 0 && !is_ok {
 					updateId5 = TiDb.InsertByTx(tx, "dwd_f_crm_clue_change_record", map[string]interface{}{
 						"clue_id":     clueId,
@@ -1622,18 +1611,8 @@ func UpdateClue(data map[string]interface{}, saleData []map[string]interface{},
 			if trailstatus == "00" && trailstatusTime != "" && time.Now().Unix()-trailstatusTimes.Unix() < 86400 {
 			} else if trailstatus == "09" && (topname != "付费产品落地页主动留资" || topname != "受理系统") {
 			} else {
-				if old_sub_cluetype != sub_cluetype && !is_ok {
-					if is_transfer != 1 {
-						updateId5 = TiDb.InsertByTx(tx, "dwd_f_crm_clue_change_record", map[string]interface{}{
-							"clue_id":     clueId,
-							"position_id": common.If(trailstatus == "00" || is_assign == 0 || is_assign == -1, positionId, common.Int64All(data["position_id"])),
-							"change_type": "加入任务车",
-							"new_value":   gconv.String(common.If(gconv.Int64(data["position_id"]) == 0, "线索自动分配", "线索来源自动更新")) + "-" + topname + "-" + subname,
-							"createtime":  nowTime,
-							"BCPCID":      common.GetRandom(32),
-							"operator_id": -1,
-						})
-					} else {
+				if is_transfer == 1 {
+					if old_sub_cluetype != sub_cluetype && !is_ok {
 						cdata := TiDb.FindOne("dwd_f_csm_customer_info", map[string]interface{}{"clue_id": clueId}, "", "")
 						if cdata != nil && len(*cdata) > 0 {
 							kcpositionId := common.Int64All((*cdata)["position_id"])
@@ -1678,7 +1657,6 @@ func UpdateClue(data map[string]interface{}, saleData []map[string]interface{},
 						"operator_id": -1,
 					})
 				}
-
 			}
 		}
 		if old_top_cluetype != "" {