Browse Source

结束模式切换回默认模式3

master
wanghongjun 3 weeks ago
parent
commit
e3edb8c938
  1. 4
      app/Console/Commands/AutomaticallyStartActivity.php

4
app/Console/Commands/AutomaticallyStartActivity.php

@ -53,13 +53,14 @@ class AutomaticallyStartActivity extends Command
->first();
$start = true;
$EventCalendarService = new EventCalendarService($this->logService);
// 数据存在,且结束时间到了,结束时间
if ($runRes) {
$end_time = $runRes['end_time'];
$run_id = $runRes['id'];
$is_manual = $runRes['is_manual'];
if ($end_time && strtotime($end_time) <= $now_times) {
$this->updateStatus($run_id, 2);
$EventCalendarService->updateStatus($run_id, 2);
} elseif ($is_manual == 1) {
// 手动开始的不切换模式
$start = false;
@ -77,7 +78,6 @@ class AutomaticallyStartActivity extends Command
);
})->orderBy('start_time')
->first(['id']);
$EventCalendarService = (new EventCalendarService($this->logService));
if ($res) {
// 新活动运行 直接关闭旧活动
$new_id = $res['id'];

Loading…
Cancel
Save