|
|
@@ -16,7 +16,7 @@ class StationService
|
|
|
* @return Station
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
- public function getDefaultStation(string $typeName):Station{
|
|
|
+ function getDefaultStation(string $typeName):Station{
|
|
|
$station= Cache::remember('StationType_default_name_'.$typeName,config('rarelyChange'), function ()use($typeName) {
|
|
|
$stationType= StationType::query()->where('name',$typeName)->orderBy('id')->get('id')->first();
|
|
|
if(!$stationType) throw new Exception('指定站类型获取不到');
|
|
|
@@ -25,4 +25,15 @@ class StationService
|
|
|
if(!$station)throw new Exception('默认站获取不到');
|
|
|
return $station;
|
|
|
}
|
|
|
+
|
|
|
+ function broadcast($station_id, $json_data){
|
|
|
+ //...
|
|
|
+ //event(new BroadcastToStation($station_id,$json_data))
|
|
|
+ }
|
|
|
+
|
|
|
+ function broadcastBinMonitor($station_id, ){
|
|
|
+ //...
|
|
|
+ //$this->broadcast($station_id, $json_data)
|
|
|
+ }
|
|
|
+
|
|
|
}
|