request->input('user_id',0); $goodsId = $this->request->input('goods_id',0); $num = $this->request->input('num',0); $activityType = $this->request->input('activity_type',1); if ($activityType == 2) { // TODO 校验当前用户今天是否超过了购买活动秒杀商品的(特定价格)的订单笔数 if (!$this->orderOnlineService->checkIfBuyFlashGoodsToday($userId)) { throw new ErrorCodeException( ErrorCode::ORDER_ONLINE_LIMIT_BUY_COUNT, '[' . env('LIMIT_BUY_COUNT') . ']', ['params' => $this->request->all(), 'limit_prices' => env('LIMIT_BUY_COUNT_GOODS_PRICES')] ); } } $res = $this->shopCarServiceUpdate->do($userId,$goodsId,$num,$activityType); return $this->success($res); } public function delete() { $shopcartIds = $this->request->input('shopcart_ids',''); $res = $this->shopCarServiceUpdate->undo($shopcartIds); return $this->success($res); } }