Browse Source

车牌搜索优化2

master
wanghongjun 1 week 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; namespace App\Console\Commands;
use App\Events\SendAnnouncement;
use App\Models\AdminNotice; use App\Models\AdminNotice;
use App\Models\ParkingCamera; use App\Models\ParkingCamera;
use App\Services\AdminNoticeService; use App\Services\AdminNoticeService;
@ -72,9 +73,21 @@ class ScheduledMessageDelivery extends Command
); );
} }
} }
$this->notionCount();
DB::commit(); DB::commit();
} catch (Exception $e) { } catch (Exception $e) {
DB::rollBack(); 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