// +---------------------------------------------------------------------- namespace crmeb\listens; use app\common\repositories\community\CommunityTopicRepository; use app\common\repositories\store\coupon\StoreCouponUserRepository; use crmeb\interfaces\ListenerInterface; use crmeb\services\TimerService; class AutoCheckCouponListen extends TimerService implements ListenerInterface { public function handle($event): void { $this->tick(1000 * 30, function () { app()->make(StoreCouponUserRepository::class)->failCoupon(); }); } }