修复 工单不推送的问题
This commit is contained in:
parent
64039b1186
commit
8c0fe87274
@ -184,6 +184,8 @@ protected static function boot()
|
|||||||
$model->status = 'pending';
|
$model->status = 'pending';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$model->notify = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
// updated
|
// updated
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Notifications;
|
namespace App\Notifications;
|
||||||
|
|
||||||
use App\Broadcasting\WeComRobotChannel;
|
|
||||||
use App\Models\WorkOrder\Reply;
|
use App\Models\WorkOrder\Reply;
|
||||||
use App\Models\WorkOrder\WorkOrder;
|
use App\Models\WorkOrder\WorkOrder;
|
||||||
use Illuminate\Bus\Queueable;
|
use Illuminate\Bus\Queueable;
|
||||||
@ -51,9 +50,9 @@ public function toGroup($notifiable)
|
|||||||
|
|
||||||
$module = $workOrder->module;
|
$module = $workOrder->module;
|
||||||
|
|
||||||
if (!$workOrder->notify) {
|
// if (!$workOrder->notify) {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
} else if ($notifiable instanceof Reply) {
|
} else if ($notifiable instanceof Reply) {
|
||||||
|
|
||||||
|
@ -16,8 +16,7 @@ class WorkOrderObserver
|
|||||||
*/
|
*/
|
||||||
public function created(WorkOrder $workOrder)
|
public function created(WorkOrder $workOrder)
|
||||||
{
|
{
|
||||||
//
|
(new WorkOrderNotification())
|
||||||
return (new WorkOrderNotification())
|
|
||||||
->toGroup($workOrder);
|
->toGroup($workOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,9 +29,8 @@ public function created(WorkOrder $workOrder)
|
|||||||
*/
|
*/
|
||||||
public function updated(WorkOrder $workOrder)
|
public function updated(WorkOrder $workOrder)
|
||||||
{
|
{
|
||||||
return;
|
(new WorkOrderNotification())
|
||||||
// return (new WorkOrderNotification())
|
->toGroup($workOrder);
|
||||||
// ->toGroup($workOrder);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user