|
|
@@ -6,7 +6,6 @@ namespace App\Services;
|
|
|
|
|
|
use App\Station;
|
|
|
use App\StationTaskBatchType;
|
|
|
-use App\StationType;
|
|
|
use Illuminate\Support\Facades\Cache;
|
|
|
|
|
|
class StationTaskBatchTypeService
|
|
|
@@ -16,7 +15,7 @@ class StationTaskBatchTypeService
|
|
|
* @param string $value
|
|
|
* @return Station
|
|
|
*/
|
|
|
- public function firstByWhere(string $key,string $value):Station{
|
|
|
+ public function firstByWhere(string $key,string $value):StationTaskBatchType{
|
|
|
return Cache::remember('station_mission_batch_type_id_by_'.$key.$value, config('cache.expirations.rarelyChange'), function ()use($key,$value) {
|
|
|
$stationMissionBatchType =StationTaskBatchType::query()->where($key, $value)->first();
|
|
|
if(!$stationMissionBatchType)throw new \Exception("找不到 StationMissionBatchType,where $key = $value");
|