From 1879f71f768b699759a39d47efb4be2b067ce9d1 Mon Sep 17 00:00:00 2001 From: "huangsimin@fusen.cn" Date: Mon, 4 Dec 2023 16:00:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 ++++++ service/fsservice.proto | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 98c8eaf..95ffd3c 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,12 @@ git submodule add git@gitlab.fusenpack.com:backend/proto.git ``` 然后执行 ```bash +go install \ +github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway \ +github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 \ +google.golang.org/protobuf/cmd/protoc-gen-go \ +google.golang.org/grpc/cmd/protoc-gen-go-grpc + go run proto/goutils/proto_build/main.go 或者 在proto/goutils/proto_build/main_test.go执行测试 TestMain diff --git a/service/fsservice.proto b/service/fsservice.proto index d6546a4..8eb37e6 100644 --- a/service/fsservice.proto +++ b/service/fsservice.proto @@ -128,7 +128,7 @@ service product { // 产品详情 rpc GetProductDetail(GetProductDetailReq) returns (GetProductDetailRsp) { option (google.api.http) = { - get: "/api/product/get_product_detail" + get: "/api/product/detail" }; } } @@ -223,9 +223,9 @@ message ContactUsRequest { message GetProductDetailReq{ int64 product_id = 1; - string template_tag = 2; - int64 selected_color_index = 3; - optional string logo = 4; + // string template_tag = 2; + // int64 selected_color_index = 3; + // string logo = 4; } message GetProductDetailRsp{ string msg = 1;