Merge branch 'master' of ssh://gitlab.fusenpack.com/backend/proto

This commit is contained in:
huangsimin@fusen.cn
2023-12-06 12:08:28 +08:00
11 changed files with 214 additions and 9 deletions

View File

@@ -1,8 +1,8 @@
syntax = "proto3"; //版本声明使用v3版本
package fsservice;
option go_package = "gitlab.fusenpack.com/backend/service;service";
option go_package = "gitee.com/fusenpack/fusen-service;service";
// 导入google/api/annotations.proto 注释依赖
import "google/api/annotations.proto";
import "service/basic.proto";
@@ -11,7 +11,7 @@ import "google/protobuf/any.proto";
//定义服务
service info {
service info {
// 用户信息
rpc UserInfo(UserInfoRequest) returns (basic.Response) {
option (google.api.http) = {
@@ -124,6 +124,21 @@ service info {
}
//定义产品服务
service product {
// 产品详情
rpc GetProductDetail(GetProductDetailReq) returns (basic.Response) {
option (google.api.http) = {
get: "/api/product/get_product_detail"
};
}
//获取产品列表
rpc GetProductList(GetProductListReq) returns (basic.Response) {
option (google.api.http) = {
get: "/api/product/tag_product_list"
};
}
}
message UserInfoRequest {
repeated string module = 1; // 模块
@@ -134,7 +149,7 @@ message QueryProfileRequest {
}
message QueryProfileResponse {
google.protobuf.Struct data = 1;
google.protobuf.Struct data = 1;
}
message DefaultProfileRequest {
@@ -213,4 +228,17 @@ message ContactUsRequest {
string message = 4; // 消息内容
}
//获取产品详情
message GetProductDetailReq{
int64 product_id = 1;
string template_tag = 2;
int64 selected_color_index = 3;
string logo = 4;
}
//获取产品列表
message GetProductListReq{
int64 basic_tag_id = 1; //传入则以该分类为最高层分类查询
int64 merchant_type = 2; //商户类型
string template_tag = 3; //模板标签
bool with_product = 4; //是否携带分类下的产品
}

59
service/resource.proto Normal file
View File

@@ -0,0 +1,59 @@
syntax = "proto3"; //版本声明使用v3版本
package resource;
option go_package = "gitlab.fusenpack.com/backend/resource;service";
// 导入google/api/annotations.proto 注释依赖
import "google/api/annotations.proto";
import "service/basic.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/any.proto";
//定义服务
service resource {
// 获取资源详情
rpc GetResourceInfo(GetResourceInfoReq) returns (basic.Response) {
option (google.api.http) = {
get: "/api/resource/info"
};
}
// 获取资源列表
rpc GetResourceList(GetResourceListReq) returns (basic.Response) {
option (google.api.http) = {
get: "/api/resource/list"
};
}
}
/* 获取资源列表 */
message GetResourceListReq{
optional string resource_id = 1;
optional int64 guest_id =2;
optional int64 user_id =3;
optional string resource_type = 4;
optional string resource_url = 5;
optional string version = 6;
optional int64 api_type = 7;
optional string bucket_name = 8;
optional string source = 9;
optional int64 current_page =101;
optional int64 per_page =102;
optional string order_by = 103;
}
/* 获取资源列表 */
/* 获取资源详情 */
message GetResourceInfoReq{
optional string resource_id = 1;
optional int64 guest_id =2;
optional int64 user_id =3;
optional string resource_type = 4;
optional string resource_url = 5;
optional string version = 6;
optional int64 api_type = 7;
optional string bucket_name = 8;
optional string source = 9;
}
/* 获取资源详情 */