dootask
dootask copied to clipboard
邮件通知中对未开始任务与已取消任务未做过滤
$taskLists1 = ProjectTask::whereNull('complete_at') ->where('end_at', '>=', Carbon::now()->addMinutes($hours * 60 - 3)->rawFormat('Y-m-d H:i:s')) ->where('end_at', '<=', Carbon::now()->addMinutes($hours * 60 + 3)->rawFormat('Y-m-d H:i:s')) ->whereNull('archived_at') ->take(100) ->get() ->toArray();
增加 ->where('flow_item_id', '!=', 5)->where('flow_item_id', '!=', 1)
而后建议更换email库,换成notify库,可以支持各种群机器人,邮件消息推送,https://github.com/guanguans/notify
最后感谢大佬作品,真的6666666 根据大佬的dootask二开,节省了好多时间
flow_item_id每个项目都不一样的,不能按你这个来
过滤掉未开始可以用 ->where('start_at','>',Carbon::now()->rawFormat('Y-m-d H:i:s'))