更新 app/common/logic/task/TaskLogic.php

修复判断错误
This commit is contained in:
mkm 2023-09-07 21:12:15 +08:00
parent 01d0fcacbf
commit 89e789ca19

View File

@ -75,13 +75,12 @@ class TaskLogic extends BaseLogic
{
try {
if ($v['types'] == 3) {
return true;
// $task = Task::where('template_id', $v['id'])->find();
// if ($task) {
// Task::where('template_id', $v['id'])->update(['start_time' => strtotime($task['start_time']) + 86400, 'end_time' => strtotime($task['end_time']) + 86400]);
// TaskTemplate::where('id', $v['id'])->inc('day_count')->update();
// return true;
// }
$task = Task::where('template_id', $v['id'])->find();
if ($task) {
// Task::where('template_id', $v['id'])->update(['start_time' => strtotime($task['start_time']) + 86400, 'end_time' => strtotime($task['end_time']) + 86400]);
// TaskTemplate::where('id', $v['id'])->inc('day_count')->update();
return true;
}
}
$time = strtotime(date('Y-m-d'));
$TaskSchedulingPlan_data = [