|
|
@@ -16,7 +16,7 @@ class StationRuleBatchService
|
|
|
{
|
|
|
$batchType = $batch['type'] ?? 'null';
|
|
|
$ownerId = $batch['owner_id'] ?? 'null';
|
|
|
- return Cache::remember('stationRuleBatch_batchType_'.$batchType.'_ownerId_'.$ownerId, config('cache.expirations.rarelyChange'),function($batch){
|
|
|
+ return Cache::remember('stationRuleBatch_batchType_'.$batchType.'_ownerId_'.$ownerId, config('cache.expirations.rarelyChange'),function()use($batch){
|
|
|
return StationRuleBatch::query()->with('stationType')
|
|
|
->where('batch_type',$batch['type'])
|
|
|
->where('owner_id',$batch['owner_id'])
|
|
|
@@ -31,10 +31,10 @@ class StationRuleBatchService
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param Batch[] $batches
|
|
|
+ * @param Collection $batches
|
|
|
* @return Collection Batches
|
|
|
*/
|
|
|
- function getBatches_shouldProcess(array $batches): Collection
|
|
|
+ function getBatches_shouldProcess(Collection $batches): Collection
|
|
|
{
|
|
|
$batches_toProcess=collect();
|
|
|
foreach ($batches as $batch){
|