This commit is contained in:
huangsimin@fusen.cn 2023-12-04 16:00:09 +08:00
parent 748e0daffc
commit 1879f71f76
2 changed files with 10 additions and 4 deletions

View File

@ -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

View File

@ -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;