|
@@ -25,7 +25,7 @@ func autoTask() {
|
|
count++
|
|
count++
|
|
currentTime := t.AddDate(0, 0, -count)
|
|
currentTime := t.AddDate(0, 0, -count)
|
|
currentTime.Format(date.Date_Short_Layout)
|
|
currentTime.Format(date.Date_Short_Layout)
|
|
- if currentTime.Weekday() == time.Sunday || currentTime.Weekday() == time.Sunday {
|
|
|
|
|
|
+ if currentTime.Weekday() == time.Sunday || currentTime.Weekday() == time.Saturday {
|
|
isok := false
|
|
isok := false
|
|
for k, v := range DateMap {
|
|
for k, v := range DateMap {
|
|
if currentTime.Format(date.Date_Short_Layout) == k && v == 2 {
|
|
if currentTime.Format(date.Date_Short_Layout) == k && v == 2 {
|
|
@@ -65,7 +65,7 @@ func autoTask() {
|
|
intime := ""
|
|
intime := ""
|
|
sql += " AND a.comeintime <?"
|
|
sql += " AND a.comeintime <?"
|
|
nt := t.AddDate(0, 0, -statusMap[trailstatus])
|
|
nt := t.AddDate(0, 0, -statusMap[trailstatus])
|
|
- intime = nt.Format(date.Date_Short_Layout) + " 00:00:00"
|
|
|
|
|
|
+ intime = nt.Format(date.Date_Full_Layout)
|
|
argsSelect = append(argsSelect, intime)
|
|
argsSelect = append(argsSelect, intime)
|
|
log.Println(sql)
|
|
log.Println(sql)
|
|
log.Println(argsSelect)
|
|
log.Println(argsSelect)
|
|
@@ -84,6 +84,7 @@ func autoTask() {
|
|
args2 = append(args2, intime)
|
|
args2 = append(args2, intime)
|
|
args2 = append(args2, position_id)
|
|
args2 = append(args2, position_id)
|
|
}
|
|
}
|
|
|
|
+ log.Println("intime", intime, position_id, sql2)
|
|
//保留未跟进线索
|
|
//保留未跟进线索
|
|
// if c1, c2 := TiDb.CountBySql(sql1, clueId), TiDb.CountBySql(sql2, args2...); (c1 != 0 && c2 > 0) || out_task_status == 1 {
|
|
// if c1, c2 := TiDb.CountBySql(sql1, clueId), TiDb.CountBySql(sql2, args2...); (c1 != 0 && c2 > 0) || out_task_status == 1 {
|
|
// log.Println("不满足线索过滤", clueId)
|
|
// log.Println("不满足线索过滤", clueId)
|