refactor: centralize protobuf and remove go-zero
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
syntax = "proto3";
|
||||
package mall;
|
||||
option go_package = ".;mall";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/ec/mall/pb;mall";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
//Store(店铺)微服务 - 广告
|
||||
service Ads{
|
||||
@@ -9,16 +9,16 @@ service Ads{
|
||||
rpc ByPos(ByPosRequest) returns (AdsListReply) {}
|
||||
|
||||
// 广告列表
|
||||
rpc Fetch(FetchRequest) returns (AdsListReply){};
|
||||
rpc Fetch(blocks.MallFetchRequest) returns (AdsListReply){};
|
||||
|
||||
// 新建广告
|
||||
rpc Create (AdsItem) returns (StatusReply){};
|
||||
rpc Create (AdsItem) returns (blocks.IdentityStatusReply){};
|
||||
|
||||
// 修改广告
|
||||
rpc Modify (AdsItem) returns (StatusReply){};
|
||||
rpc Modify (AdsItem) returns (blocks.IdentityStatusReply){};
|
||||
|
||||
// 删除广告
|
||||
rpc Delete (IdentRequest) returns (StatusReply){};
|
||||
rpc Delete (blocks.IdentRequest) returns (blocks.IdentityStatusReply){};
|
||||
}
|
||||
message ByPosRequest{
|
||||
repeated string pos_key = 1 [json_name="pos_key"];
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package mall;
|
||||
option go_package = ".;mall";
|
||||
|
||||
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 store_identity = 4 [json_name="store_identity"]; // 店铺唯一标识
|
||||
string keyword = 5; // 关键词
|
||||
repeated int64 category_id = 6;// 分类ID
|
||||
string sort = 7;// 排序字段
|
||||
int64 min_price = 8 [json_name="min_price"];// 最小价格
|
||||
int64 max_price = 9 [json_name="max_price"];// 最大价格
|
||||
}
|
||||
|
||||
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 VersionRequest {
|
||||
int64 version = 1; // 时序版本号
|
||||
}
|
||||
|
||||
|
||||
message SearchRequest {
|
||||
string keyword = 1; //关键词
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
syntax = "proto3";
|
||||
package mall;
|
||||
option go_package = ".;mall";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/ec/mall/pb;mall";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
// Store(店铺)微服务-分类
|
||||
service Category{
|
||||
@@ -9,13 +9,13 @@ service Category{
|
||||
rpc Fetch(CategoryFetchRequest) returns(CategoryReply) {};
|
||||
|
||||
// 添加分类
|
||||
rpc Create(CategoryItem) returns(StatusReply) {};
|
||||
rpc Create(CategoryItem) returns(blocks.IdentityStatusReply) {};
|
||||
|
||||
// 删除分类
|
||||
rpc Delete(IdentRequest) returns(StatusReply) {};
|
||||
rpc Delete(blocks.IdentRequest) returns(blocks.IdentityStatusReply) {};
|
||||
|
||||
// 修改分类
|
||||
rpc Modify(CategoryItem) returns(StatusReply) {};
|
||||
rpc Modify(CategoryItem) returns(blocks.IdentityStatusReply) {};
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
syntax = "proto3";
|
||||
package mall;
|
||||
option go_package = ".;mall";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/ec/mall/pb;mall";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
// 运费设置相关
|
||||
service Freight{
|
||||
// 运费模板列表
|
||||
rpc Fetch(FetchRequest) returns(FreightReply) {};
|
||||
rpc Fetch(blocks.MallFetchRequest) returns(FreightReply) {};
|
||||
|
||||
// 运费模板修改
|
||||
rpc Modify(FreightItem) returns(StatusReply) {};
|
||||
rpc Modify(FreightItem) returns(blocks.IdentityStatusReply) {};
|
||||
|
||||
// 运费模板删除
|
||||
rpc Delete(IdentRequest) returns(StatusReply) {};
|
||||
rpc Delete(blocks.IdentRequest) returns(blocks.IdentityStatusReply) {};
|
||||
|
||||
// 运费模板创建
|
||||
rpc Create(FreightItem) returns(StatusReply) {};
|
||||
rpc Create(FreightItem) returns(blocks.IdentityStatusReply) {};
|
||||
|
||||
// 运费模板详情
|
||||
rpc Detail(IdentRequest) returns(FreightItem) {};
|
||||
rpc Detail(blocks.IdentRequest) returns(FreightItem) {};
|
||||
|
||||
// 限制区域列表
|
||||
rpc DenyRegionFetch (FetchRequest) returns(DenyRegionReply) {};
|
||||
rpc DenyRegionFetch (blocks.MallFetchRequest) returns(DenyRegionReply) {};
|
||||
|
||||
// 新建限制区域
|
||||
rpc DenyRegionCreate (DenyRegionItem) returns(StatusReply) {};
|
||||
rpc DenyRegionCreate (DenyRegionItem) returns(blocks.IdentityStatusReply) {};
|
||||
|
||||
// 移除限制区域
|
||||
rpc DenyRegionDelete (IdentRequest) returns(StatusReply) {};
|
||||
rpc DenyRegionDelete (blocks.IdentRequest) returns(blocks.IdentityStatusReply) {};
|
||||
|
||||
// 编辑限制区域
|
||||
rpc DenyRegionModify (DenyRegionItem) returns(StatusReply) {};
|
||||
rpc DenyRegionModify (DenyRegionItem) returns(blocks.IdentityStatusReply) {};
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
syntax = "proto3";
|
||||
package mall;
|
||||
option go_package =".;mall";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/ec/mall/pb;mall";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
// Store(店铺)微服务-公告
|
||||
service Notice{
|
||||
// 公告列表
|
||||
rpc Fetch(FetchRequest) returns (NoticeListReply){};
|
||||
rpc Fetch(blocks.MallFetchRequest) returns (NoticeListReply){};
|
||||
|
||||
// 新建公告
|
||||
rpc Create (NoticeItem) returns (StatusReply){};
|
||||
rpc Create (NoticeItem) returns (blocks.IdentityStatusReply){};
|
||||
|
||||
// 修改公告
|
||||
rpc Modify (NoticeItem) returns (StatusReply){};
|
||||
|
||||
rpc Modify (NoticeItem) returns (blocks.IdentityStatusReply){};
|
||||
|
||||
// 删除公告
|
||||
rpc Delete (IdentRequest) returns (StatusReply){};
|
||||
rpc Delete (blocks.IdentRequest) returns (blocks.IdentityStatusReply){};
|
||||
}
|
||||
|
||||
// 公告列表
|
||||
|
||||
@@ -1,72 +1,72 @@
|
||||
syntax = "proto3";
|
||||
package mall;
|
||||
option go_package = ".;mall";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/ec/mall/pb;mall";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
// 产品相关
|
||||
service Product{
|
||||
// 获取产品列表
|
||||
rpc ItemFetch(FetchRequest) returns(ListReply) {};
|
||||
rpc ItemFetch(blocks.MallFetchRequest) returns(ListReply) {};
|
||||
|
||||
// 获取产品详情
|
||||
rpc ItemDetail(IdentRequest) returns(ProductItem) {};
|
||||
rpc ItemDetail(blocks.IdentRequest) returns(ProductItem) {};
|
||||
|
||||
// 通过产品序列获取产品详情
|
||||
rpc ItemDetailBySerial(StoreSerialRequest) returns(ListReply) {};
|
||||
rpc ItemDetailBySerial(blocks.StoreSerialRequest) returns(ListReply) {};
|
||||
|
||||
// 通过规格编号获取产品详情
|
||||
rpc ItemDetailBySpec(DetailBySpecRequest) returns(ListItem) {};
|
||||
|
||||
// 添加产品
|
||||
rpc ItemCreate(ProductItem) returns(StatusReply) {};
|
||||
rpc ItemCreate(ProductItem) returns(blocks.IdentityStatusReply) {};
|
||||
|
||||
// 删除产品
|
||||
rpc ItemDelete(IdentRequest) returns(StatusReply) {};
|
||||
rpc ItemDelete(blocks.IdentRequest) returns(blocks.IdentityStatusReply) {};
|
||||
|
||||
// 发布/取消发布 产品
|
||||
rpc ItemModify(ModifyRequest) returns(StatusReply) {};
|
||||
rpc ItemModify(ModifyRequest) returns(blocks.IdentityStatusReply) {};
|
||||
|
||||
// 批量操作
|
||||
rpc ItemBatchOp(OpRequest) returns(StatusReply) {};
|
||||
rpc ItemBatchOp(OpRequest) returns(blocks.IdentityStatusReply) {};
|
||||
|
||||
// 产品规格列表
|
||||
rpc SpecFetch(FetchRequest) returns(SpecReply) {};
|
||||
rpc SpecFetch(blocks.MallFetchRequest) returns(SpecReply) {};
|
||||
|
||||
// 添加产品规格
|
||||
rpc SpecCreate(SpecItem) returns(StatusReply) {};
|
||||
rpc SpecCreate(SpecItem) returns(blocks.IdentityStatusReply) {};
|
||||
|
||||
// 修改产品规格
|
||||
rpc SpecModify(SpecItem) returns(StatusReply) {};
|
||||
rpc SpecModify(SpecItem) returns(blocks.IdentityStatusReply) {};
|
||||
|
||||
// 删除产品规格
|
||||
rpc SpecDelete(IdentRequest) returns(StatusReply) {};
|
||||
rpc SpecDelete(blocks.IdentRequest) returns(blocks.IdentityStatusReply) {};
|
||||
|
||||
// 产品详情
|
||||
rpc SpecDetail(IdentRequest) returns(SpecItem) {};
|
||||
rpc SpecDetail(blocks.IdentRequest) returns(SpecItem) {};
|
||||
|
||||
// 添加产品图片
|
||||
rpc PhotoCreate(PhotoItem) returns(StatusReply){};
|
||||
rpc PhotoCreate(PhotoItem) returns(blocks.IdentityStatusReply){};
|
||||
|
||||
// 删除产品图片
|
||||
rpc PhotoDelete(IdentRequest) returns(StatusReply){};
|
||||
rpc PhotoDelete(blocks.IdentRequest) returns(blocks.IdentityStatusReply){};
|
||||
|
||||
// 产品图片列表
|
||||
rpc PhotoList(PhotoItem) returns(PhotoReply){};
|
||||
|
||||
// 产品的评论列表
|
||||
rpc CommentFetch(FetchRequest) returns (CommentListReply) {};
|
||||
rpc CommentFetch(blocks.MallFetchRequest) returns (CommentListReply) {};
|
||||
|
||||
// 评论
|
||||
rpc CommentCreate(CommentItem) returns(StatusReply) {};
|
||||
rpc CommentCreate(CommentItem) returns(blocks.IdentityStatusReply) {};
|
||||
|
||||
// 回复评论
|
||||
rpc CommentRe(CommentItem) returns(StatusReply) {};
|
||||
rpc CommentRe(CommentItem) returns(blocks.IdentityStatusReply) {};
|
||||
|
||||
// 删除评论
|
||||
rpc CommentDelete(IdentRequest) returns(StatusReply) {};
|
||||
rpc CommentDelete(blocks.IdentRequest) returns(blocks.IdentityStatusReply) {};
|
||||
|
||||
// 修改评论
|
||||
rpc CommentModify(CommentItem) returns(StatusReply) {};
|
||||
rpc CommentModify(CommentItem) returns(blocks.IdentityStatusReply) {};
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
syntax = "proto3";
|
||||
package mall;
|
||||
option go_package = ".;mall";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/ec/mall/pb;mall";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
// Store(店铺)微服务-工作人员
|
||||
service Staff {
|
||||
@@ -9,22 +9,22 @@ service Staff {
|
||||
rpc Login(LoginRequest) returns (LoginReply) {}
|
||||
|
||||
// 获取工作人员列表
|
||||
rpc Fetch(FetchRequest) returns (StaffListReply) {}
|
||||
|
||||
rpc Fetch(blocks.MallFetchRequest) returns (StaffListReply) {}
|
||||
|
||||
// 创建工作人员
|
||||
rpc Create(StaffItem) returns (StatusReply) {}
|
||||
rpc Create(StaffItem) returns (blocks.IdentityStatusReply) {}
|
||||
|
||||
// 删除工作人员
|
||||
rpc Delete(IdentRequest) returns (StatusReply) {}
|
||||
rpc Delete(blocks.IdentRequest) returns (blocks.IdentityStatusReply) {}
|
||||
|
||||
// 获取个人信息
|
||||
rpc GetProfile(IdentRequest) returns (StaffItem) {}
|
||||
rpc GetProfile(blocks.IdentRequest) returns (StaffItem) {}
|
||||
|
||||
// 设置个人信息
|
||||
rpc SetProfile(StaffItem) returns (StatusReply) {}
|
||||
rpc SetProfile(StaffItem) returns (blocks.IdentityStatusReply) {}
|
||||
|
||||
// 设置账号密码
|
||||
rpc SetPassword(SetAccountRequest) returns (StatusReply) {}
|
||||
rpc SetPassword(SetAccountRequest) returns (blocks.IdentityStatusReply) {}
|
||||
}
|
||||
|
||||
message LoginRequest {
|
||||
@@ -64,7 +64,7 @@ message StaffItem {
|
||||
string phone = 8; // 手机号
|
||||
string email = 9; // 邮箱
|
||||
int32 status = 10; // 状态:默认为0,-1禁止,1为正常
|
||||
string avatar = 11; // 头像
|
||||
string avatar = 11; // 头像
|
||||
string created_at = 12 [json_name="created_at"];
|
||||
}
|
||||
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
syntax = "proto3";
|
||||
package mall;
|
||||
option go_package = ".;mall";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/ec/mall/pb;mall";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
// Store(店铺)微服务-店铺基础服务
|
||||
service Store {
|
||||
|
||||
// 申请加入店铺
|
||||
rpc ApplyJoin(ApplyJoinRequest) returns (StatusReply) {};
|
||||
rpc ApplyJoin(ApplyJoinRequest) returns (blocks.IdentityStatusReply) {};
|
||||
|
||||
// 店铺许可授权
|
||||
rpc Licensing(LicensingRequest) returns (StatusReply) {}
|
||||
rpc Licensing(LicensingRequest) returns (blocks.IdentityStatusReply) {}
|
||||
|
||||
// 获取店铺基础配置
|
||||
rpc GetSetting(IdentRequest) returns(StoreBasic){};
|
||||
rpc GetSetting(blocks.IdentRequest) returns(StoreBasic){};
|
||||
|
||||
// 设置店铺基础配置
|
||||
rpc SetSetting(StoreBasic) returns(StatusReply){};
|
||||
rpc SetSetting(StoreBasic) returns(blocks.IdentityStatusReply){};
|
||||
|
||||
// 设置支付方式配置
|
||||
rpc SetPayment(SettingRequest) returns(StatusReply){}
|
||||
rpc SetPayment(SettingRequest) returns(blocks.IdentityStatusReply){}
|
||||
|
||||
// 设置邮件服务器配置
|
||||
rpc SetEmail(SettingRequest) returns(StatusReply){}
|
||||
rpc SetEmail(SettingRequest) returns(blocks.IdentityStatusReply){}
|
||||
|
||||
// 获取支付方式配置
|
||||
rpc GetPayment(IdentRequest) returns(ConfigsReply){}
|
||||
rpc GetPayment(blocks.IdentRequest) returns(ConfigsReply){}
|
||||
|
||||
// 获取邮件服务器配置
|
||||
rpc GetEmail(IdentRequest) returns(ConfigsReply){}
|
||||
rpc GetEmail(blocks.IdentRequest) returns(ConfigsReply){}
|
||||
|
||||
// 获取小程序推荐码
|
||||
rpc MiniCode(MiniCodeRequest) returns(MiniCodeReply) {};
|
||||
@@ -49,7 +49,7 @@ message ConfigsReply{
|
||||
|
||||
|
||||
message LicensingRequest {
|
||||
string license_type = 1 [json_name="license_type"]; // 授权类型
|
||||
string license_type = 1 [json_name="license_type"]; // 授权类型
|
||||
string license = 2; // 许可码
|
||||
string domain = 3;
|
||||
string host = 4;
|
||||
|
||||
Reference in New Issue
Block a user