修复 工单不推送的问题

This commit is contained in:
iVampireSP.com 2023-01-05 18:39:32 +08:00
parent 64039b1186
commit 8c0fe87274
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
3 changed files with 8 additions and 9 deletions

View File

@ -184,6 +184,8 @@ protected static function boot()
$model->status = 'pending';
}
}
$model->notify = true;
});
// updated

View File

@ -2,7 +2,6 @@
namespace App\Notifications;
use App\Broadcasting\WeComRobotChannel;
use App\Models\WorkOrder\Reply;
use App\Models\WorkOrder\WorkOrder;
use Illuminate\Bus\Queueable;
@ -51,9 +50,9 @@ public function toGroup($notifiable)
$module = $workOrder->module;
if (!$workOrder->notify) {
return;
}
// if (!$workOrder->notify) {
// return;
// }
} else if ($notifiable instanceof Reply) {

View File

@ -16,8 +16,7 @@ class WorkOrderObserver
*/
public function created(WorkOrder $workOrder)
{
//
return (new WorkOrderNotification())
(new WorkOrderNotification())
->toGroup($workOrder);
}
@ -30,9 +29,8 @@ public function created(WorkOrder $workOrder)
*/
public function updated(WorkOrder $workOrder)
{
return;
// return (new WorkOrderNotification())
// ->toGroup($workOrder);
(new WorkOrderNotification())
->toGroup($workOrder);
}
/**