// +---------------------------------------------------------------------- namespace app\jobs\store; use app\services\store\StoreUserServices; use crmeb\basic\BaseJobs; use crmeb\traits\QueueTrait; class StoreUserJob extends BaseJobs { use QueueTrait; public function doJob($uid, $storeId) { try { /** @var StoreUserServices $storeUserServices */ $storeUserServices = app()->make(StoreUserServices::class); $storeUserServices->setStoreUser((int)$uid, (int)$storeId); } catch (\Throwable $e) { } return true; } }