修复 工单不推送的问题
This commit is contained in:
parent
64039b1186
commit
8c0fe87274
@ -184,6 +184,8 @@ protected static function boot()
|
||||
$model->status = 'pending';
|
||||
}
|
||||
}
|
||||
|
||||
$model->notify = true;
|
||||
});
|
||||
|
||||
// updated
|
||||
|
@ -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) {
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user