|
@@ -31,7 +31,7 @@ func getTime() (string, string) {
|
|
|
startTime := time.Date(twoDaysAgo.Year(), twoDaysAgo.Month(), twoDaysAgo.Day(), 0, 0, 0, 0, twoDaysAgo.Location())
|
|
|
|
|
|
// 设置时间为 24 点
|
|
|
- endTime := startTime.Add(24 * time.Hour)
|
|
|
+ endTime := startTime.Add(time.Duration(cm.Push.DueDay) * 24 * time.Hour)
|
|
|
return startTime.Format(date.Date_Full_Layout), endTime.Format(date.Date_Full_Layout)
|
|
|
}
|
|
|
|
|
@@ -67,6 +67,7 @@ func sendMess() {
|
|
|
u := &service.User{}
|
|
|
resp := u.IdentityByPositionId(positionId)
|
|
|
if resp == nil {
|
|
|
+ log.Println("%v未找到身份", positionId)
|
|
|
continue
|
|
|
}
|
|
|
user := &service.User{
|
|
@@ -81,7 +82,7 @@ func sendMess() {
|
|
|
}, `select a.id,a.name,b.position_id,a.source,a.source_id from task a left join task_team b on (a.id =b.task_id and b.role=1)
|
|
|
where a.status!=3 and a.next_follow_time >= ? and a.next_follow_time < ?`, st, et)
|
|
|
|
|
|
- log.Println("end cron")
|
|
|
+ log.Println("end cron", st, et)
|
|
|
}, "sendMsg")
|
|
|
if err != nil {
|
|
|
log.Println("cron err:", err)
|