126 lines
2.5 KiB
Protocol Buffer
126 lines
2.5 KiB
Protocol Buffer
syntax = "proto3";
|
|
package tradeservice.tradev1;
|
|
option go_package = "./trade/tradev1;tradev1";
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
service Gray {
|
|
// 获取拦截统计数据
|
|
rpc GetBlockStatistics (GetBlockStatisticsReq) returns (GetBlockStatisticsResp);
|
|
// 获取拦截列表
|
|
rpc GetBlockList (GetBlockListReq) returns (GetBlockListResp);
|
|
// 解除拦截
|
|
rpc RemoveBlock (RemoveBlockReq) returns (RemoveBlockResp);
|
|
// 新增灰名单配置
|
|
rpc AddGray (AddGrayReq) returns (AddGrayResp);
|
|
// 删除灰名单配置
|
|
rpc DeleteGray (DeleteGrayReq) returns (DeleteGrayResp);
|
|
// 编辑灰名单配置
|
|
rpc EditGray (EditGrayReq) returns (EditGrayResp);
|
|
// 获取灰名单配置列表
|
|
rpc GetGrayList (GetGrayListReq) returns (GetGrayListResp);
|
|
}
|
|
|
|
message GetBlockStatisticsReq {
|
|
int32 start_time = 1;
|
|
int32 end_time = 2;
|
|
optional google.protobuf.Timestamp block_date = 3;
|
|
}
|
|
|
|
message GetBlockStatisticsResp {
|
|
int32 block = 1;
|
|
int32 unblock = 2;
|
|
}
|
|
|
|
message GetBlockListReq {
|
|
int32 page = 1;
|
|
int32 limit = 2;
|
|
int32 official_product_id = 3;
|
|
string account = 4;
|
|
int32 start_time = 5;
|
|
int32 end_time = 6;
|
|
optional google.protobuf.Timestamp block_date = 7;
|
|
}
|
|
|
|
message GetBlockListResp {
|
|
repeated GrayBlockInfo list = 1;
|
|
int32 total = 2;
|
|
}
|
|
|
|
message GrayBlockInfo {
|
|
int32 id = 1;
|
|
int32 block_type = 2;
|
|
string account = 3;
|
|
int32 official_product_id = 4;
|
|
int32 reseller_id = 5;
|
|
int32 block_time = 6;
|
|
int32 unblock_time = 7;
|
|
int32 unblock_uid = 8;
|
|
int32 block_count = 9;
|
|
google.protobuf.Timestamp block_date = 10;
|
|
bool is_black = 11;
|
|
}
|
|
|
|
message RemoveBlockReq {
|
|
int32 id = 1;
|
|
int32 uid = 2;
|
|
}
|
|
|
|
message RemoveBlockResp {
|
|
|
|
}
|
|
|
|
message AddGrayReq {
|
|
int32 reseller_id = 1;
|
|
int32 official_product_id = 2;
|
|
int32 block_count = 3;
|
|
int32 operator_id = 4;
|
|
string reason = 5;
|
|
}
|
|
|
|
message AddGrayResp {
|
|
}
|
|
|
|
message DeleteGrayReq {
|
|
int32 id = 1;
|
|
}
|
|
|
|
message DeleteGrayResp {
|
|
|
|
}
|
|
|
|
message EditGrayReq {
|
|
int32 id = 1;
|
|
int32 reseller_id = 2;
|
|
int32 official_product_id = 3;
|
|
int32 block_count = 4;
|
|
int32 operator_id = 5;
|
|
string reason = 6;
|
|
}
|
|
|
|
message EditGrayResp {
|
|
|
|
}
|
|
|
|
message GetGrayListReq {
|
|
repeated int32 reseller_ids = 1;
|
|
int32 page = 2;
|
|
int32 limit = 3;
|
|
int32 official_product_id = 4;
|
|
string reason = 5;
|
|
}
|
|
|
|
message GetGrayListResp {
|
|
repeated GrayInfo list = 1;
|
|
int32 total = 2;
|
|
}
|
|
|
|
message GrayInfo {
|
|
int32 id = 1;
|
|
int32 reseller_id = 2;
|
|
int32 official_product_id = 3;
|
|
int32 block_count = 4;
|
|
int32 create_time = 5;
|
|
int32 update_time = 6;
|
|
int32 operator_id = 7;
|
|
string reason = 8;
|
|
} |