53d203ee14
CI / changes (push) Successful in 14s
CI / docker-bff (push) Successful in 3s
CI / docker-product (push) Successful in 24s
CI / docker-admin (push) Has been skipped
CI / docker-user (push) Has been skipped
CI / docker-ad (push) Has been skipped
CI / docker-chore (push) Successful in 25s
CI / docker-express (push) Has been skipped
CI / docker-sale (push) Successful in 26s
211 lines
4.0 KiB
Protocol Buffer
211 lines
4.0 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package sale;
|
|
option go_package = "lone-services/rpc/sale";
|
|
import "google/api/annotations.proto";
|
|
|
|
service Sale {
|
|
// 销售分组
|
|
rpc GroupItems(GroupItemsReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/sales/group"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc GroupCreate(GroupCreateReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
post: "/admin/v3/sales/group"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc GroupNames(GroupEmptyReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/sales/group/names"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
// 销售管理
|
|
rpc Types(GroupEmptyReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/sales/types"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc Names(NamesReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/sales/names"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc NamesInternal(NamesReq) returns (NamesData);
|
|
rpc Create(CreateReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
post: "/admin/v3/sales"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc Edit(EditReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
put: "/admin/v3/sales"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc Info(InfoReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/sales/info"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc Items(ItemsReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/sales"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc Status(StatusReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
put: "/admin/v3/sales/status"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
// 销售详情
|
|
rpc InfoInternal(InfoReq) returns (InfoData);
|
|
}
|
|
|
|
message Response {
|
|
int32 code = 1;
|
|
string msg = 2;
|
|
string data = 3;
|
|
}
|
|
|
|
message GroupEmptyReq {}
|
|
|
|
message GroupItemsReq {
|
|
uint32 page = 1;
|
|
uint32 page_size = 2;
|
|
string name = 3;
|
|
}
|
|
|
|
message GroupCreateReq {
|
|
string name = 1;
|
|
}
|
|
|
|
message NamesReq {
|
|
uint32 type = 1;
|
|
string name = 2;
|
|
uint32 level = 3;
|
|
}
|
|
|
|
message NameItem {
|
|
int64 id = 1;
|
|
string mobile = 2;
|
|
string name = 3;
|
|
}
|
|
|
|
message NamesData {
|
|
repeated NameItem items = 1;
|
|
}
|
|
|
|
message CreateReq {
|
|
string mobile = 1;
|
|
string name = 2;
|
|
string id_card_front = 3;
|
|
string password = 4;
|
|
string account = 5;
|
|
uint32 sex = 6;
|
|
int64 group_id = 7;
|
|
string birth_date = 8;
|
|
int64 sale_id = 9;
|
|
uint32 type = 10;
|
|
int64 territory_id = 11;
|
|
int64 province_id = 13;
|
|
int64 city_id = 14;
|
|
int64 district_id = 15;
|
|
string address = 19;
|
|
string id_card_back = 20;
|
|
string business_license = 21;
|
|
}
|
|
|
|
message EditReq {
|
|
int64 id = 1;
|
|
string mobile = 2;
|
|
string name = 3;
|
|
string id_card_front = 4;
|
|
string account = 5;
|
|
uint32 sex = 6;
|
|
int64 group_id = 7;
|
|
string birth_date = 8;
|
|
int64 sale_id = 9;
|
|
uint32 type = 10;
|
|
int64 territory_id = 11;
|
|
int64 province_id = 13;
|
|
int64 city_id = 14;
|
|
int64 district_id = 15;
|
|
string address = 19;
|
|
string id_card_back = 20;
|
|
string business_license = 21;
|
|
}
|
|
|
|
message InfoReq {
|
|
int64 id = 1;
|
|
}
|
|
|
|
message Region {
|
|
string province = 1;
|
|
string city = 2;
|
|
string district = 3;
|
|
}
|
|
|
|
message GroupItem {
|
|
int64 id = 1;
|
|
string name = 2;
|
|
}
|
|
|
|
message InfoData {
|
|
int64 id = 1;
|
|
int64 sale_id = 2;
|
|
string mobile = 3;
|
|
string origin_mobile = 4;
|
|
string name = 5;
|
|
string id_card_front = 6;
|
|
string id_card_back = 7;
|
|
string business_license = 8;
|
|
Region region = 9;
|
|
int64 province_id = 10;
|
|
int64 city_id = 11;
|
|
int64 district_id = 12;
|
|
int64 territory_id = 13;
|
|
string territory_name = 14;
|
|
int64 group_id = 15;
|
|
string address = 16;
|
|
uint32 status = 17;
|
|
string avatar = 18;
|
|
string account = 19;
|
|
uint32 type = 20;
|
|
uint32 sex = 21;
|
|
string birth_date = 22;
|
|
string reason = 23;
|
|
int64 admin_id = 24;
|
|
string admin_name = 25;
|
|
string create_time = 26;
|
|
string update_time = 27;
|
|
GroupItem group = 28;
|
|
}
|
|
|
|
message ItemsReq {
|
|
string name = 1;
|
|
uint32 page = 2;
|
|
uint32 page_size = 3;
|
|
int64 sale_id = 4;
|
|
uint32 type = 5;
|
|
uint32 status = 6;
|
|
}
|
|
|
|
message StatusReq {
|
|
int64 id = 1;
|
|
uint32 status = 2;
|
|
string reason = 3;
|
|
}
|