把之前的任务结算限制到只结算小组服务团队任务

This commit is contained in:
chenbo 2023-09-21 09:34:47 +08:00
parent ac8a6e7621
commit a1c8cb2e2a

View File

@ -21,9 +21,20 @@ class TaskSettlementCron extends Task{
protected function execute() protected function execute()
{ {
//yesterday //yesterday
$all=TaskSchedulingPlan::whereDay('end_time','yesterday')->where('is_pay',0)->with(['template_info','scheduling'=>function($query){ // $all=TaskSchedulingPlan::whereDay('end_time','yesterday')
$query->where('company_type', 18); // ->where('is_pay',0)
}])->select()->toArray(); // ->with(['template_info','scheduling'=>function($query){
// $query->where('company_type', 18);
// }])
// ->select()
// ->toArray();
$all = TaskSchedulingPlan::whereDay('end_time','yesterday')
->withJoin(['scheduling'], 'left')
->where('scheduling.company_type', 18)
->where('is_pay',0)
->with(['template_info'])
->select()
->toArray();
foreach($all as $k=>$v){ foreach($all as $k=>$v){
queue(TaskInformationJob::class,$v); queue(TaskInformationJob::class,$v);
} }