xuzhiheng 2 år sedan
förälder
incheckning
c03672862d
1 ändrade filer med 4 tillägg och 3 borttagningar
  1. 4 3
      clueSync/autoTask.go

+ 4 - 3
clueSync/autoTask.go

@@ -18,13 +18,13 @@ func autoTask() {
 		"05": 5, //意向客户
 		"04": 7, //潜在客户
 	}
+	// statusMaps := map[string]int{}
 	//判断节假日
 	for status, statusInt := range statusMap {
 		count, counts := 0, 0
 		for {
 			count++
 			currentTime := t.AddDate(0, 0, -count)
-			currentTime.Format(date.Date_Short_Layout)
 			if currentTime.Weekday() == time.Sunday || currentTime.Weekday() == time.Saturday {
 				isok := false
 				for k, v := range DateMap {
@@ -50,8 +50,9 @@ func autoTask() {
 				break
 			}
 		}
-		statusMap[status] = counts
+		statusMap[status] = count
 	}
+	log.Println(statusMap)
 	for trailstatus, _ := range map[string]string{
 		"07": "", //待签署客户
 		"06": "", //高意向客户
@@ -84,7 +85,7 @@ func autoTask() {
 					args2 = append(args2, intime)
 					args2 = append(args2, position_id)
 				}
-				log.Println("intime", intime, position_id, sql2)
+				log.Println("intime", intime, clueId, sql2)
 				//保留未跟进线索
 				// if c1, c2 := TiDb.CountBySql(sql1, clueId), TiDb.CountBySql(sql2, args2...); (c1 != 0 && c2 > 0) || out_task_status == 1 {
 				// 	log.Println("不满足线索过滤", clueId)