public function actionUpdateGoodsStatus() { $params = $this->getParams(); $accountId = $this->getAccountId(); $params['accountId'] = $accountId; if (empty($params['operation']) || !isset($params['id']) && !isset($params['all'])) { throw new BadRequestHttpException('missing param'); } //check the receiveModes if (Goods::STATUS_ON == $params['operation']) { if (false === Goods::checkGoodsReceiveModes($params, $accountId)) { throw new InvalidParameterException(Yii::t('product', 'receive_mode_not_empty')); } } return Goods::updateGoodsStatus($params, $accountId); }