mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-12-15 05:16:34 +08:00
增加流量带宽子账单接口/把 regionId 改为 nodeRegionId
This commit is contained in:
@@ -12,5 +12,5 @@ message ServerBandwidthStat {
|
||||
string timeAt = 5;
|
||||
int64 bytes = 6;
|
||||
int64 bits = 7;
|
||||
int64 regionId = 8;
|
||||
int64 nodeRegionId = 8;
|
||||
}
|
||||
@@ -6,7 +6,7 @@ package pb;
|
||||
// 服务每日统计
|
||||
message ServerDailyStat {
|
||||
int64 serverId = 1;
|
||||
int64 regionId = 2;
|
||||
int64 nodeRegionId = 2;
|
||||
int64 bytes = 3;
|
||||
int64 cachedBytes = 5;
|
||||
int64 countRequests = 6;
|
||||
|
||||
21
pkg/rpc/protos/models/model_user_traffic_bill.proto
Normal file
21
pkg/rpc/protos/models/model_user_traffic_bill.proto
Normal file
@@ -0,0 +1,21 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
import "models/model_node_region.proto";
|
||||
|
||||
// 用户流量带宽子账单
|
||||
message UserTrafficBill {
|
||||
int64 id = 1;
|
||||
int64 billId = 2;
|
||||
int64 nodeRegionId = 3;
|
||||
float amount = 4;
|
||||
float bandwidthMB = 5;
|
||||
int32 bandwidthPercentile = 6;
|
||||
float trafficGB = 7;
|
||||
float pricePerUnit = 8;
|
||||
string priceType = 9;
|
||||
|
||||
NodeRegion nodeRegion = 30;
|
||||
}
|
||||
@@ -14,10 +14,10 @@ message CalculatePriceRequest {
|
||||
string priceType = 1;
|
||||
float trafficGB = 2;
|
||||
float bandwidthMB = 3;
|
||||
int64 regionId = 4;
|
||||
int64 nodeRegionId = 4;
|
||||
}
|
||||
|
||||
message CalculatePriceResponse {
|
||||
float amount = 1;
|
||||
bool hasRegionPrice = 2;
|
||||
bool hasNodeRegionPrice = 2;
|
||||
}
|
||||
@@ -80,7 +80,7 @@ message FindDailyServerBandwidthStatsBetweenDaysRequest {
|
||||
string dayFrom = 3; // 开始日期 YYYYMMDD
|
||||
string dayTo = 4; // 结束日期 YYYYMMDD
|
||||
int32 percentile = 5; // 可选项,百分位(nth)带宽位置,0-100之间
|
||||
int64 regionId = 6; // 区域ID,可选项(目前只有用户整体统计支持区域ID)
|
||||
int64 nodeRegionId = 6; // 区域ID,可选项(目前只有用户整体统计支持区域ID)
|
||||
}
|
||||
|
||||
message FindDailyServerBandwidthStatsBetweenDaysResponse {
|
||||
|
||||
@@ -115,7 +115,7 @@ message FindServer5MinutelyStatsWithDayResponse {
|
||||
// 读取最近N日的统计数据
|
||||
message FindLatestServerDailyStatsRequest {
|
||||
int64 serverId = 1;
|
||||
int64 regionId = 3; // 区域ID,可选
|
||||
int64 nodeRegionId = 3; // 区域ID,可选
|
||||
int32 days = 2; // 天数
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ message FindServerDailyStatsBetweenDaysRequest {
|
||||
int64 serverId = 2; // 服务ID,和用户ID二选一
|
||||
string dayFrom = 3; // 开始日期 YYYYMMDD
|
||||
string dayTo = 4; // 结束日期 YYYYMMDD
|
||||
int64 regionId = 5; // 区域ID
|
||||
int64 nodeRegionId = 5; // 区域ID
|
||||
}
|
||||
|
||||
message FindServerDailyStatsBetweenDaysResponse {
|
||||
@@ -168,7 +168,7 @@ message SumCurrentServerDailyStatsResponse {
|
||||
message SumServerDailyStatsRequest {
|
||||
int64 userId = 3;
|
||||
int64 serverId = 1;
|
||||
int64 regionId = 6;
|
||||
int64 nodeRegionId = 6;
|
||||
|
||||
string day = 2; // YYYYMMDD
|
||||
|
||||
|
||||
21
pkg/rpc/protos/service_user_traffic_bill.proto
Normal file
21
pkg/rpc/protos/service_user_traffic_bill.proto
Normal file
@@ -0,0 +1,21 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
import "models/model_user_traffic_bill.proto";
|
||||
|
||||
// 用户流量带宽子账单服务
|
||||
service UserTrafficBillService {
|
||||
// 列出某个账单下的流量带宽子账单
|
||||
rpc findUserTrafficBills(FindUserTrafficBillsRequest) returns (FindUserTrafficBillsResponse);
|
||||
}
|
||||
|
||||
// 列出某个账单下的流量带宽子账单
|
||||
message FindUserTrafficBillsRequest {
|
||||
int64 userBillId = 1;
|
||||
}
|
||||
|
||||
message FindUserTrafficBillsResponse {
|
||||
repeated UserTrafficBill userTrafficBills = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user