49 lines
1.1 KiB
Protocol Buffer
49 lines
1.1 KiB
Protocol Buffer
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;
|
|
} |