request->get('classId',0); $where['merchantId'] = $this->merchantId; $where['classId'] = $classId; $list = ItemClass::getGhsItemList($where); util::success($list); } public function actionAdd() { $post = Yii::$app->request->post(); $post['adminId'] = $this->adminId; $post['shopId'] = $this->shopId; $post['merchantId'] = $this->merchantId; ItemService::addGhsItem($post); util::complete('添加成功'); } public function actionUpdate() { $data = Yii::$app->request->post(); $data['adminId'] = $this->adminId; $data['merchantId'] = $this->merchantId; ItemService::updateGshItem($data); util::complete('修改成功'); } public function actionDelete() { $get = Yii::$app->request->get(); $id = isset($get['id']) ? $get['id'] : 0; ItemService::deleteGhsItem($id,$this->shopId,$this->adminId); util::complete('操作成功'); } }