// +---------------------------------------------------------------------- namespace app\jobs\store; use app\services\order\StoreOrderCartInfoServices; use crmeb\basic\BaseJobs; use crmeb\traits\QueueTrait; /** * 保存购物车 * Class StoreCartJob * @package app\jobs\store */ class StoreCartJob extends BaseJobs { use QueueTrait; public function doJob($id, $cartInfo, $uid, array $promotions = []) { /** @var StoreOrderCartInfoServices $cartServices */ $cartServices = app()->make(StoreOrderCartInfoServices::class); $cartServices->setCartInfo($id, $cartInfo, (int)$uid, $promotions); return true; } }