insertField = ["product_id","cover", "name","inventory","price"]; $this->updateField = ["id","product_id","cover", "name","inventory","price"]; $this->service = SkuService::getInstance(); } /** * 获取sku列表根据商品id * @Method GET * @return JsonResponse * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ public function getSkuByProductId() { $id = request()->get('id'); if (!$id) { return jerr('参数错误'); } return jok($this->service->getSkuByProductId($id)); } }