Browse Source

车牌搜索优化2

master
wanghongjun 6 days ago
parent
commit
abde0b92fc
  1. 13
      app/Console/Commands/ScheduledMessageDelivery.php

13
app/Console/Commands/ScheduledMessageDelivery.php

@ -2,6 +2,7 @@
namespace App\Console\Commands;
use App\Events\SendAnnouncement;
use App\Models\AdminNotice;
use App\Models\ParkingCamera;
use App\Services\AdminNoticeService;
@ -72,9 +73,21 @@ class ScheduledMessageDelivery extends Command
);
}
}
$this->notionCount();
DB::commit();
} catch (Exception $e) {
DB::rollBack();
}
}
private function notionCount()
{
$where = [
'is_read' => 0
];
$data = [
'count' => AdminNotice::query()->where($where)->count()
];
event(new SendAnnouncement(__('admin.succeeded'), $data, 2));
}
}

Loading…
Cancel
Save