205 lines
4.3 KiB
Protocol Buffer
205 lines
4.3 KiB
Protocol Buffer
syntax = "proto3";
|
||
package tradeservice.tradev1;
|
||
option go_package = "./trade/tradev1;tradev1";
|
||
|
||
// 黑名单服务
|
||
service Black {
|
||
// 黑名单订单号列表
|
||
rpc OrderNumberList (OrderNumberListReq) returns (OrderNumberListResp);
|
||
// 获取下载模板地址
|
||
rpc DownloadTemplateUrl (DownloadTemplateUrlReq) returns (DownloadTemplateUrlResp);
|
||
// 获取黑名单统计数据
|
||
rpc GetStatisticsData (GetStatisticsDataReq) returns (GetStatisticsDataResp);
|
||
// 黑名单列表
|
||
rpc BlackList (BlackListReq) returns (BlackListResp);
|
||
// 拦截列表
|
||
rpc InterceptList (InterceptListReq) returns (InterceptListResp);
|
||
// 添加黑名单
|
||
rpc AddBlack (AddBlackReq) returns (AddBlackResp);
|
||
// 删除黑名单
|
||
rpc DeleteBlack (DeleteBlackReq) returns (DeleteBlackResp);
|
||
// 批量删除黑名单
|
||
rpc BatchDeleteBlack (BatchDeleteBlackReq) returns (BatchDeleteBlackResp);
|
||
// 获取黑名单账号列表
|
||
rpc GetBlackAccountList (GetBlackAccountListReq) returns (GetBlackAccountListResp);
|
||
// 批量添加黑名单
|
||
rpc BatchAddBlack (BatchAddBlackReq) returns (BatchAddBlackResp);
|
||
// 编辑黑名单
|
||
rpc EditBlack (EditBlackReq) returns (EditBlackResp);
|
||
}
|
||
|
||
// 编辑黑名单请求
|
||
message EditBlackReq {
|
||
int32 id = 1;
|
||
optional int32 status = 2;
|
||
optional string reason = 3;
|
||
}
|
||
|
||
// 编辑黑名单返回
|
||
message EditBlackResp {
|
||
|
||
}
|
||
|
||
// 批量添加黑名单请求
|
||
message BatchAddBlackReq {
|
||
message Account {
|
||
string account = 1;
|
||
string reason = 2;
|
||
}
|
||
repeated Account accounts = 1;
|
||
int32 creator = 2;
|
||
string remark = 3;
|
||
int32 create_time = 4;
|
||
}
|
||
|
||
// 批量添加黑名单返回
|
||
message BatchAddBlackResp {
|
||
|
||
}
|
||
|
||
// 获取黑名单账号列表请求
|
||
message GetBlackAccountListReq {
|
||
repeated string accounts = 1;
|
||
}
|
||
|
||
// 获取黑名单账号列表返回
|
||
message GetBlackAccountListResp {
|
||
repeated string accounts = 1;
|
||
}
|
||
|
||
// 批量删除黑名单请求
|
||
message BatchDeleteBlackReq {
|
||
repeated int32 ids = 1;
|
||
}
|
||
|
||
// 批量删除黑名单返回
|
||
message BatchDeleteBlackResp {
|
||
|
||
}
|
||
|
||
// 删除黑名单请求
|
||
message DeleteBlackReq {
|
||
int32 id = 1;
|
||
}
|
||
|
||
// 删除黑名单返回
|
||
message DeleteBlackResp {
|
||
|
||
}
|
||
|
||
// 添加黑名单请求
|
||
message AddBlackReq {
|
||
string account = 1;
|
||
int32 creator = 2;
|
||
string reason = 3;
|
||
}
|
||
|
||
// 添加黑名单返回
|
||
message AddBlackResp {
|
||
|
||
}
|
||
|
||
// 拦截列表请求
|
||
message InterceptListReq {
|
||
string keyword = 1;
|
||
string account = 2;
|
||
int32 begin_date = 3;
|
||
int32 end_date = 4;
|
||
int32 page = 5;
|
||
int32 limit = 6;
|
||
}
|
||
|
||
// 拦截列表返回
|
||
message InterceptListResp {
|
||
int32 total = 1;
|
||
repeated AccountBlacklistInterceptLogInfo data = 2;
|
||
}
|
||
message AccountBlacklistInterceptLogInfo {
|
||
int32 id = 1;
|
||
// 拦截账号
|
||
string account = 2;
|
||
// 商品ID
|
||
int32 product_id = 3;
|
||
// 商品名称
|
||
string product_name = 4;
|
||
// 订单号码
|
||
string order_number = 5;
|
||
// 分销商名称
|
||
string reseller_name = 6;
|
||
// 分销商ID
|
||
int32 reseller_id = 7;
|
||
// 创建时间
|
||
int32 create_time = 8;
|
||
// 充值流水号
|
||
string serial_number = 9;
|
||
}
|
||
|
||
// 黑名单列表请求
|
||
message BlackListReq {
|
||
string keyword = 1;
|
||
int32 page = 2;
|
||
int32 limit = 3;
|
||
int32 status = 4;
|
||
string reason = 5;
|
||
}
|
||
|
||
// 黑名单列表返回
|
||
message BlackListResp {
|
||
int32 total = 1;
|
||
repeated AccountBlacklistInfo data = 2;
|
||
}
|
||
|
||
message AccountBlacklistInfo {
|
||
int32 id = 1;
|
||
// 账号
|
||
string account = 2;
|
||
// 备注
|
||
string remark = 3;
|
||
// 拦截类型,0全部,1指定商品分类,2指定商品,3指定分销商,4指定供应商
|
||
int32 entity_type = 4;
|
||
// 对象ID,与entity_type强关联
|
||
string entity_ids = 5;
|
||
// 拦截次数
|
||
int32 intercept_num = 6;
|
||
// 创建者
|
||
int32 creator = 7;
|
||
// 创建时间
|
||
int32 create_time = 8;
|
||
// 拉黑状态: 1--启用 2--停用
|
||
int32 status = 9;
|
||
// 拉黑原因
|
||
string reason = 10;
|
||
}
|
||
|
||
// 获取黑名单统计数据请求
|
||
message GetStatisticsDataReq {
|
||
|
||
}
|
||
|
||
// 获取黑名单统计数据返回
|
||
message GetStatisticsDataResp {
|
||
int32 all = 1;
|
||
int32 total = 2;
|
||
int32 week = 3;
|
||
}
|
||
|
||
// 获取下载模板地址请求
|
||
message DownloadTemplateUrlReq {
|
||
|
||
}
|
||
|
||
// 获取下载模板地址返回
|
||
message DownloadTemplateUrlResp {
|
||
string url = 1;
|
||
}
|
||
|
||
// 黑名单订单号列表请求
|
||
message OrderNumberListReq {
|
||
repeated string order_numbers = 1;
|
||
repeated string serial_numbers = 2;
|
||
}
|
||
|
||
// 黑名单订单号列表返回
|
||
message OrderNumberListResp {
|
||
repeated string order_numbers = 1;
|
||
} |