feat: product number
CI / changes (push) Successful in 36s
CI / docker-bff (push) Successful in 3m8s
CI / docker-product (push) Successful in 3m36s
CI / docker-admin (push) Successful in 3m35s
CI / docker-user (push) Successful in 9s
CI / docker-ad (push) Successful in 29s
CI / docker-chore (push) Failing after 4s

This commit is contained in:
zzw
2026-08-26 16:53:50 +08:00
parent 0ca3f6d84f
commit 72d55d396d
39 changed files with 1284 additions and 363 deletions
+20 -4
View File
@@ -4,6 +4,7 @@ package product;
option go_package="lone-services/rpc/product";
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
service Product {
rpc Create(CreateReq) returns (Response) {
@@ -95,7 +96,10 @@ service Product {
// 增减库存
// type: 1 增加, 2 减少
rpc Number(NumberReq) returns (Response);
rpc Number(NumberReq) returns (google.protobuf.Empty);
rpc InfoById(InfoByIdReq) returns (Item);
rpc ItemsByIds(ItemsByIdsReq) returns (ItemsByIdsData);
// 增加库存
rpc NumberAdd(NumberAddReq) returns (Response) {
@@ -112,6 +116,18 @@ message Response {
string data = 3;
}
message InfoByIdReq {
int64 id = 1;
}
message ItemsByIdsReq {
repeated int64 ids = 1;
}
message ItemsByIdsData {
repeated Item items = 1;
}
message CreateReq {
string name = 1;
string subhead = 2;
@@ -124,7 +140,7 @@ message CreateReq {
double share_price = 9;
double agent_price = 10;
string sale_reward = 11;
string images = 12;
repeated string images = 12;
double weight = 13;
string cubage = 14;
string waybill = 15;
@@ -196,7 +212,7 @@ message EditBaseReq {
string waybill = 5;
double weight = 6;
string cubage = 7;
string images = 8;
repeated string images = 8;
int32 period_validity = 9;
string publish_time = 10;
string label = 11;
@@ -288,7 +304,7 @@ message Item {
string index_image = 17;
string cubage = 18;
string label = 19;
string images = 20;
repeated string images = 20;
uint32 is_buy = 21;
int32 period_validity = 22;
string publish_time = 23;