Browse Source

标签处理

WH01243 7 months ago
parent
commit
2a0295278f
1 changed files with 6 additions and 5 deletions
  1. 6 5
      service/clue.go

+ 6 - 5
service/clue.go

@@ -1297,7 +1297,7 @@ func LabelHandel(tx *sql.Tx, oldlabelType, labelType, clueId int64, level, oldTr
 		//查询以前是什么数据
 		if labelChangeTime == nowStr {
 			//同一天修改过
-			if oldlabelType != 0 {
+			if oldlabelType != 1 {
 				updateLabelType = labelType
 			}
 		} else {
@@ -1317,19 +1317,20 @@ func LabelHandel(tx *sql.Tx, oldlabelType, labelType, clueId int64, level, oldTr
 	if updateLabelType > 0 {
 		ok := false
 		if tx == nil {
-			ok = TiDb.Update("dwd_f_crm_clue_info", map[string]interface{}{
-				"uid": uId,
+			ok = JyBiTidb.Update("dwd_f_crm_clue_info", map[string]interface{}{
+				"id": clueId,
 			}, map[string]interface{}{
 				"label":           updateLabelType,
 				"labelChangeTime": nowStr,
 			})
 		} else {
-			ok = TiDb.UpdateByTx(tx, "dwd_f_crm_clue_info", map[string]interface{}{
-				"uid": uId,
+			ok = JyBiTidb.UpdateByTx(tx, "dwd_f_crm_clue_info", map[string]interface{}{
+				"id": clueId,
 			}, map[string]interface{}{
 				"label":           updateLabelType,
 				"labelChangeTime": nowStr,
 			})
 		}
+		log.Println("线索标签修改:", ok)
 	}
 }