refactor: reorganize modules and add Linux build tooling

This commit is contained in:
2026-08-09 12:41:08 +08:00
parent 86024fa81d
commit 5cc5fd92ed
1461 changed files with 4054 additions and 4724 deletions

View File

@@ -0,0 +1,83 @@
syntax = "proto3";
package market;
option go_package = ".;market";
import "blocks.proto";
// 营销服务 - 代理商
service Agency{
// 登录
rpc Login(LoginRequest) returns (LoginReply) {}
// 新增代理商
rpc Create(MarketAgenctyItem) returns (StatusReply) {}
// 获取一个代理商
rpc Get(IdentRequest) returns (MarketAgenctyItem) {}
// 代理商列表
rpc Fetch(FetchRequest) returns (AgencyReply) {}
// 更新代理商数据
rpc Modify(MarketAgenctyItem) returns (StatusReply) {}
// 删除一个代理商
rpc Delete(IdentRequest) returns (StatusReply) {}
// 更新密码
rpc SetPassword(SetPasswordRequest) returns (StatusReply) {}
//待审核
rpc Pending(FetchRequest) returns (AgencyReply) {}
// 审核
rpc Approve(ApproveRequest) returns (StatusReply) {};
}
message LoginRequest {
string account = 1; // 账号 必填
string password = 2; // 密码 必填
string verify = 3; // 检验码 必填
}
message MarketAgenctyItem {
string identity = 1; // 唯一标识
string created_at = 2 [json_name="created_at"]; // 创建时间
string name = 3 ; // 联系人名称 必填
string avatar = 4; // 头像
string account = 5; // 帐号
string phone = 6; // 手机号
string password = 7; // 密码
string org_name = 8 [json_name="org_name"]; // 机构名称
string org_photo = 9 [json_name="org_photo"]; // 机构照片
string id_name = 10 [json_name="id_name"]; // 证件姓名
string id_before = 11 [json_name="id_before"]; // 证件照片
string id_after = 12 [json_name="id_after"]; // 证件照片
string remark = 13; // 备注
int32 commission_rate = 14 [json_name="commission_rate"]; // 佣金比例
int32 agency_type = 15 [json_name ="agency_type"]; // 服务 状态1代理商 2安装商
int32 status = 16; // 状态默认为0-1禁止1为正常
string email = 17;// 邮箱
string country = 18;// 国家
string area = 19;// 地区
int32 approve = 20;// 审核状态0待审核 2审核通过 -2审核未通过
}
message SetPasswordRequest {
string identity = 1;
string old_password = 2 [json_name="old_password"]; // 旧密码
string new_password = 3 [json_name="new_password"];// 新密码
}
message AgencyReply {
int64 count = 1;// 总数
repeated MarketAgenctyItem data = 2;// 数据
}
message ApproveRequest {
int32 approve = 1; // 1:通过 2:拒绝
string identity = 2; // 唯一标识
}

View File

@@ -0,0 +1,53 @@
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; //关键词
}

View File

@@ -0,0 +1,49 @@
syntax = "proto3";
package market;
option go_package = ".;market";
import "blocks.proto";
// 数据服务
service Data{
// 概况
rpc Overview(Empty) returns (OverviewReply) {}
// 会员列表
rpc MemberFetch(FetchRequest) returns (DataReply) {}
// 会员详情
rpc MemberDetails(IdentRequest) returns (KeyVal) {}
// 订单列表
rpc OrderFetch(FetchRequest) returns (DataReply) {}
// 订单详情
rpc OrderDetails(IdentRequest) returns (KeyVal) {}
}
message OverviewReply {
// 待沟通会员
int64 total_approve = 1 [json_name="total_approve"];
// 本月新会员
int64 total_month = 2 [json_name="total_month"];
// 全部会员
int64 total_all = 3 [json_name="total_all"];
// 工作人员
int64 total_staff = 4 [json_name="total_staff"];
// 按月统计,最近半年
map<string,int64> report_month=5;
// 按月统计,工作人员
map<string,int64> report_staff=6;
}
message DataReply {
int64 count=1; // 记录总数
repeated KeyVal data=2; //当前页数据
}
message KeyVal {
string key=1;
string val=2;
}

View File

@@ -0,0 +1,52 @@
syntax = "proto3";
package market;
option go_package = ".;market";
import "blocks.proto";
// 营销服务 - 供应商
service Supply{
// 新增供应商
rpc Create(MarketSupplyItem) returns (StatusReply) {}
// 获取一个供应商
rpc Get(IdentRequest) returns (MarketSupplyItem) {}
// 供应商列表
rpc Fetch(FetchRequest) returns (SupplyReply) {}
// 更新供应商数据
rpc Modify(MarketSupplyItem) returns (StatusReply) {}
// 删除一个供应商
rpc Delete(IdentRequest) returns (StatusReply) {}
}
message MarketSupplyItem {
string name = 1 ; // 联系人名称 必填
string avatar = 2; // 头像
int32 commission_rate = 3 [json_name="commission_rate"]; // 佣金比例
string account = 4; // 帐号
string phone = 5; // 手机号
string password = 6; // 密码
string org_name = 7 [json_name="org_name"]; // 机构名称
string org_photo = 8 [json_name="org_photo"]; // 机构照片
string id_name = 9 [json_name="id_name"]; // 证件姓名
string id_before = 10 [json_name="id_before"]; // 证件照片
string id_after = 11 [json_name="id_after"]; // 证件照片
string remark = 12; // 备注
string identity = 13; // 唯一标识
int32 status = 14;// 状态
int32 id = 15;// id
}
message SupplyReply {
int64 count = 1;// 总数
repeated MarketSupplyItem data = 2;// 数据
}