|
|
@@ -10,6 +10,7 @@ use App\Models\Manager\Process\SubNoticeLog as SubNoticeLogModel;
|
|
|
use Illuminate\Support\Carbon;
|
|
|
use Illuminate\Support\Facades\DB;
|
|
|
use App\Jobs\Manager\Process\SendNoticeJobs;
|
|
|
+use Illuminate\Support\Facades\Cache;
|
|
|
|
|
|
/**
|
|
|
* 违规处理订阅推送
|
|
|
@@ -56,6 +57,12 @@ class SubNotice extends Controller
|
|
|
SendNoticeJobs::dispatch($message_data);
|
|
|
// SendNoticeJobs::dispatchSync($message_data);
|
|
|
} else {
|
|
|
+ $key_name = 'SubNoticeJobs_company_id_' . $item['id'];
|
|
|
+ $sub_noticeJobs_data_info = Cache::get($key_name);
|
|
|
+ if ($sub_noticeJobs_data_info) continue;
|
|
|
+ //创建缓存
|
|
|
+ Cache::put($key_name,'1', 86400); // 每个商户每天只统计执行一次
|
|
|
+ //执行统计任务
|
|
|
SubNoticeJobs::dispatch($message_data)->delay($second);
|
|
|
// SubNoticeJobs::dispatchSync($message_data)->delay($second);;
|
|
|
}
|