Browse Source

自动开始活动模式脚本3

master
wanghongjun 4 weeks ago
parent
commit
b5b488b27c
  1. 2
      app/Console/Commands/AutomaticallyStartActivity.php
  2. 4
      app/Models/EventCalendar.php

2
app/Console/Commands/AutomaticallyStartActivity.php

@ -94,7 +94,7 @@ class AutomaticallyStartActivity extends Command
$oldValue = $model->toArray();
$model->update([
'status' => $status,
'updated_at' => get_datetime()
'updated_at' => date("Y-m-d H:i:s", time())
]);
// 记录日志
$this->logService->logUpdated($model, $oldValue);

4
app/Models/EventCalendar.php

@ -30,11 +30,11 @@ class EventCalendar extends Model
public function getStartTimeAttribute($value): string
{
return get_datetime('date_time', strtotime($value));
return date('Y-m-d H:i', strtotime($value));
}
public function getEndTimeAttribute($value): string
{
return get_datetime('date_time', strtotime($value));
return date('Y-m-d H:i', strtotime($value));
}
}

Loading…
Cancel
Save