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

This commit is contained in:
huangsimin@fusen.cn 2023-12-06 17:13:45 +08:00
commit 310a02d7f5
2 changed files with 100 additions and 2 deletions

View File

@ -138,6 +138,13 @@ service product {
get: "/api/product/tag_product_list"
};
}
//
rpc CalculateProductPrice(CalculateProductPriceReq) returns (CalculateProductPriceRsp) {
option (google.api.http) = {
post: "/api/product/calculate_product_price"
body: "*"
};
}
}
message UserInfoRequest {
@ -241,4 +248,22 @@ message GetProductListReq{
int64 merchant_type = 2; //
string template_tag = 3; //
bool with_product = 4; //
}
//
message CalculateProductPriceReq{
int64 product_id = 1;
int64 size_id = 2;
int64 fitting_id = 3;
int64 purchase_quantity = 4;
}
message CalculateProductPriceRsp{
string item_price = 1;
string total_price = 2;
StepRange step_range = 3;
}
message StepRange{
int64 start = 1;//
int64 end = 2;//
string range_description = 3;//
string item_price = 4;//
}

View File

@ -10,8 +10,8 @@ import "google/protobuf/struct.proto";
import "google/protobuf/any.proto";
//
service resource {
service resource {
//
rpc GetResourceInfo(GetResourceInfoReq) returns (basic.Response) {
option (google.api.http) = {
@ -25,7 +25,80 @@ service resource {
get: "/api/resource/list"
};
}
// --
rpc UploadFileBackend(UploadFileBackendReq) returns (UploadFileBackendRes) {
option (google.api.http) = {
post: "/api/resource/upload-file-backend",
body: "*"
};
}
// --
rpc UploadFileBackendFragment(UploadFileBackendFragmentReq) returns (UploadFileBackendFragmentRes) {
option (google.api.http) = {
post: "/api/resource/upload-file-backend-fragment",
body: "*"
};
}
}
/* 后端上传--分片上传 */
message UploadFileBackendFragmentReq {
string file_name = 1; //
bytes file_content = 2; //
bytes file_header = 3; //
string file_data = 4; // base64
int64 chunk_number = 5; // :123
int64 total_chunks = 6; // :3
int64 user_id = 7;
int64 guest_id = 8;
int64 api_type = 10; // 1=2='
int64 upload_bucket = 11; //
string file_key = 12; //
string source = 13;//
string metadata = 14; // json格式
int64 refresh = 15; //
string resource_id = 16; // ID
string backup_type = 17; // oss
string upload_type = 18; // s3
}
message UploadFileBackendFragmentRes {
string resource_type = 5;
string resource_id = 4;
string resource_url = 6;
}
/* 后端上传--分片上传 */
/* 后端上传--单文件 */
message UploadFileBackendReq {
string file_name = 1; //
bytes file_content = 2; //
bytes file_header = 3; //
int64 user_id = 4;
int64 guest_id = 5;
string file_data = 6; // base64
int64 api_type = 10; // 1=2='
int64 upload_bucket = 11; //
string file_key = 12; //
string source = 13;//
string metadata = 14; // json格式
int64 refresh = 15; //
string resource_id = 16; // ID
string backup_type = 17; // oss
string upload_type = 18; // s3
}
message UploadFileBackendRes{
string resource_type = 5;
string resource_id = 4;
string resource_url = 6;
}
/* 后端上传--文件流--单文件 */
/* 获取资源列表 */
message GetResourceListReq{
optional string resource_id = 1;