jingcai-php/app/Listeners/GenerateCustomerRankingList...

29 lines
545 B
PHP
Executable File

<?php
namespace App\Listeners;
use App\Events\OrderWinedEvent;
use App\Jobs\ComputeCustomerWinLevelScore;
use App\Jobs\GenerateCustomerRankingJob;
use Illuminate\Contracts\Queue\ShouldQueue;
/**
* 实时计算排名的事件监听
*/
class GenerateCustomerRankingListener implements ShouldQueue
{
/**
* Create the event listener.
*
* @return void
*/
public function __construct()
{
}
public function handle(OrderWinedEvent $event)
{
GenerateCustomerRankingJob::dispatch($event);
}
}