改进 查询

This commit is contained in:
iVampireSP.com 2023-03-01 22:29:36 +08:00
parent 3f03d13d2f
commit 85d5a9186a
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -26,7 +26,7 @@ class WorkOrder implements ShouldQueue
*/
public function __construct(WorkOrderModel $workOrder, $type = 'post')
{
$this->workOrder = $workOrder->load(['module']);
$this->workOrder = $workOrder;
$this->type = $type;
}
@ -39,6 +39,8 @@ public function handle(): void
return;
}
$this->workOrder->load(['module']);
if ($this->workOrder->status === 'error' && $this->type !== 'delete') {
$this->type = 'post';
}