refactor: centralize protobuf and remove go-zero
This commit is contained in:
@@ -1,36 +1,36 @@
|
||||
syntax = "proto3";
|
||||
package market;
|
||||
option go_package = ".;market";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/ec/market/pb;market";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
// 营销服务 - 代理商
|
||||
service Agency{
|
||||
// 登录
|
||||
rpc Login(LoginRequest) returns (LoginReply) {}
|
||||
rpc Login(LoginRequest) returns (blocks.MarketLoginReply) {}
|
||||
|
||||
// 新增代理商
|
||||
rpc Create(MarketAgenctyItem) returns (StatusReply) {}
|
||||
rpc Create(MarketAgenctyItem) returns (blocks.IdentityStatusReply) {}
|
||||
|
||||
// 获取一个代理商
|
||||
rpc Get(IdentRequest) returns (MarketAgenctyItem) {}
|
||||
rpc Get(blocks.IdentRequest) returns (MarketAgenctyItem) {}
|
||||
|
||||
// 代理商列表
|
||||
rpc Fetch(FetchRequest) returns (AgencyReply) {}
|
||||
rpc Fetch(blocks.MarketFetchRequest) returns (AgencyReply) {}
|
||||
|
||||
// 更新代理商数据
|
||||
rpc Modify(MarketAgenctyItem) returns (StatusReply) {}
|
||||
|
||||
rpc Modify(MarketAgenctyItem) returns (blocks.IdentityStatusReply) {}
|
||||
|
||||
// 删除一个代理商
|
||||
rpc Delete(IdentRequest) returns (StatusReply) {}
|
||||
rpc Delete(blocks.IdentRequest) returns (blocks.IdentityStatusReply) {}
|
||||
|
||||
// 更新密码
|
||||
rpc SetPassword(SetPasswordRequest) returns (StatusReply) {}
|
||||
rpc SetPassword(SetPasswordRequest) returns (blocks.IdentityStatusReply) {}
|
||||
|
||||
//待审核
|
||||
rpc Pending(FetchRequest) returns (AgencyReply) {}
|
||||
rpc Pending(blocks.MarketFetchRequest) returns (AgencyReply) {}
|
||||
|
||||
// 审核
|
||||
rpc Approve(ApproveRequest) returns (StatusReply) {};
|
||||
rpc Approve(ApproveRequest) returns (blocks.IdentityStatusReply) {};
|
||||
|
||||
}
|
||||
|
||||
@@ -45,9 +45,9 @@ message MarketAgenctyItem {
|
||||
string identity = 1; // 唯一标识
|
||||
string created_at = 2 [json_name="created_at"]; // 创建时间
|
||||
|
||||
string name = 3 ; // 联系人名称 必填
|
||||
string name = 3 ; // 联系人名称 必填
|
||||
string avatar = 4; // 头像
|
||||
string account = 5; // 帐号
|
||||
string account = 5; // 帐号
|
||||
string phone = 6; // 手机号
|
||||
string password = 7; // 密码
|
||||
string org_name = 8 [json_name="org_name"]; // 机构名称
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package market;
|
||||
option go_package = ".;market";
|
||||
|
||||
message Empty{
|
||||
}
|
||||
|
||||
message FetchRequest {
|
||||
int64 page_no=1 [json_name = "page_no"]; // 页数
|
||||
int64 page_size=2 [json_name = "page_size"]; // 每页记录数
|
||||
map<string,string> params=3; // 条件参数,key=val,eg key:categoryId=?,vlaue=11
|
||||
string identity = 4 ; // 唯一标识
|
||||
string keyword = 5; //关键词
|
||||
int32 status = 6; // 状态:默认为0,-1禁止,1为正常
|
||||
int32 approve = 7;// 审核状态:0:待审核 2:审核通过 -2:审核未通过
|
||||
}
|
||||
|
||||
message IdentRequest{
|
||||
int64 id = 1; // 唯一ID
|
||||
string identity = 2; // 唯一码
|
||||
}
|
||||
|
||||
message StoreSerialRequest{
|
||||
string store_identity = 1 [json_name="store_identity"]; // 店铺Identity
|
||||
repeated string serial_id = 2 [json_name="serial_id"]; // 序列Identity
|
||||
}
|
||||
|
||||
message StatusReply{
|
||||
int32 code = 1; // 状态码
|
||||
string identity=2; // 标识码
|
||||
string message=3; //状态说明
|
||||
int64 timeseq=4; // 响应时间序列
|
||||
}
|
||||
message LoginReply {
|
||||
string token = 1; // token 授权码
|
||||
string identity = 2; // 唯一标识
|
||||
string market_identity = 3 [json_name="market_identity"]; // 店铺唯一标识
|
||||
string name = 4; // 姓名
|
||||
string account = 5; // 账号
|
||||
string role = 6; // 角色
|
||||
int32 status = 7; // 状态
|
||||
string created_at = 8 [json_name="created_at"]; // 创建时间
|
||||
string market_name = 9 [json_name="market_name"]; // 店铺名称
|
||||
}
|
||||
|
||||
message VersionRequest {
|
||||
int64 version = 1; // 时序版本号
|
||||
}
|
||||
|
||||
|
||||
message SearchRequest {
|
||||
string keyword = 1; //关键词
|
||||
}
|
||||
@@ -1,24 +1,24 @@
|
||||
syntax = "proto3";
|
||||
package market;
|
||||
option go_package = ".;market";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/ec/market/pb;market";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
// 数据服务
|
||||
service Data{
|
||||
// 概况
|
||||
rpc Overview(Empty) returns (OverviewReply) {}
|
||||
rpc Overview(blocks.Empty) returns (OverviewReply) {}
|
||||
|
||||
// 会员列表
|
||||
rpc MemberFetch(FetchRequest) returns (DataReply) {}
|
||||
rpc MemberFetch(blocks.MarketFetchRequest) returns (DataReply) {}
|
||||
|
||||
// 会员详情
|
||||
rpc MemberDetails(IdentRequest) returns (KeyVal) {}
|
||||
rpc MemberDetails(blocks.IdentRequest) returns (KeyVal) {}
|
||||
|
||||
// 订单列表
|
||||
rpc OrderFetch(FetchRequest) returns (DataReply) {}
|
||||
rpc OrderFetch(blocks.MarketFetchRequest) returns (DataReply) {}
|
||||
|
||||
// 订单详情
|
||||
rpc OrderDetails(IdentRequest) returns (KeyVal) {}
|
||||
rpc OrderDetails(blocks.IdentRequest) returns (KeyVal) {}
|
||||
}
|
||||
|
||||
message OverviewReply {
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
syntax = "proto3";
|
||||
package market;
|
||||
option go_package = ".;market";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/ec/market/pb;market";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
// 营销服务 - 供应商
|
||||
service Supply{
|
||||
|
||||
// 新增供应商
|
||||
rpc Create(MarketSupplyItem) returns (StatusReply) {}
|
||||
rpc Create(MarketSupplyItem) returns (blocks.IdentityStatusReply) {}
|
||||
|
||||
// 获取一个供应商
|
||||
rpc Get(IdentRequest) returns (MarketSupplyItem) {}
|
||||
rpc Get(blocks.IdentRequest) returns (MarketSupplyItem) {}
|
||||
|
||||
// 供应商列表
|
||||
rpc Fetch(FetchRequest) returns (SupplyReply) {}
|
||||
rpc Fetch(blocks.MarketFetchRequest) returns (SupplyReply) {}
|
||||
|
||||
// 更新供应商数据
|
||||
rpc Modify(MarketSupplyItem) returns (StatusReply) {}
|
||||
|
||||
rpc Modify(MarketSupplyItem) returns (blocks.IdentityStatusReply) {}
|
||||
|
||||
// 删除一个供应商
|
||||
rpc Delete(IdentRequest) returns (StatusReply) {}
|
||||
rpc Delete(blocks.IdentRequest) returns (blocks.IdentityStatusReply) {}
|
||||
|
||||
}
|
||||
|
||||
@@ -27,10 +27,10 @@ service Supply{
|
||||
|
||||
|
||||
message MarketSupplyItem {
|
||||
string name = 1 ; // 联系人名称 必填
|
||||
string name = 1 ; // 联系人名称 必填
|
||||
string avatar = 2; // 头像
|
||||
int32 commission_rate = 3 [json_name="commission_rate"]; // 佣金比例
|
||||
string account = 4; // 帐号
|
||||
string account = 4; // 帐号
|
||||
string phone = 5; // 手机号
|
||||
string password = 6; // 密码
|
||||
string org_name = 7 [json_name="org_name"]; // 机构名称
|
||||
|
||||
Reference in New Issue
Block a user