public function actionCreate() { $params = $this->getParams(); if (empty($params['goods']) || count($params['goods']) <= 0) { throw new BadRequestHttpException('invailid params'); } $result = Goods::checkGoodsInfo($params['goods']); return Goods::createGoods($result, $this->getAccountId()); }