mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-11-30 22:20:45 +00:00
36 lines
650 B
PHP
36 lines
650 B
PHP
<?php
|
|
|
|
namespace App\Listeners;
|
|
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Queue\InteractsWithQueue;
|
|
use App\Events\BusinessOrdersUpdate;
|
|
|
|
class SendDatabaseNotification implements ShouldQueue
|
|
{
|
|
use InteractsWithQueue;
|
|
|
|
/**
|
|
* Create the event listener.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct()
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Handle the event.
|
|
*
|
|
* @param BusinessOrdersUpdate $event
|
|
* @return void
|
|
*/
|
|
public function handle(BusinessOrdersUpdate $event)
|
|
{
|
|
if (5 >= $event->goodsSku->stock) {
|
|
// 发送通知给管理员
|
|
}
|
|
}
|
|
}
|