|
|
|
@ -2,6 +2,8 @@ |
|
|
|
|
|
|
|
namespace App\Console\Commands; |
|
|
|
|
|
|
|
use App\Events\SendAnnouncement; |
|
|
|
use App\Models\AdminNotice; |
|
|
|
use App\Models\ParkingSpace; |
|
|
|
use App\Models\ParkingSpaceRepair; |
|
|
|
use App\Services\OperationLogService; |
|
|
|
@ -88,5 +90,18 @@ class AutoChangeRepair extends Command |
|
|
|
} catch (Exception $e) { |
|
|
|
DB::rollBack(); |
|
|
|
} |
|
|
|
|
|
|
|
$this->notionCount(); |
|
|
|
} |
|
|
|
|
|
|
|
private function notionCount() |
|
|
|
{ |
|
|
|
$where = [ |
|
|
|
'is_read' => 0 |
|
|
|
]; |
|
|
|
$data = [ |
|
|
|
'count' => AdminNotice::query()->where($where)->count() |
|
|
|
]; |
|
|
|
event(new SendAnnouncement(__('admin.succeeded'), $data, 2)); |
|
|
|
} |
|
|
|
} |
|
|
|
|