fix: JSON_CONTAINS 参数类型修复 + API sync
- 修复 JSON_CONTAINS(node_group_ids, int64) 类型错误,改为传 JSON 字符串 - 添加 node_group_ids IS NOT NULL 兼容判断,防止 NULL 列报错 - 同步 apis/ 及 routes.go、compat_types.go 改动 Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
+21
-1
@@ -220,6 +220,22 @@ type (
|
||||
FriendlyCount int64 `json:"friendly_count"`
|
||||
HistoryCount int64 `json:"history_count"`
|
||||
}
|
||||
GetUserTrafficStatsRequest {
|
||||
UserSubscribeId string `form:"user_subscribe_id" validate:"required"`
|
||||
Days int `form:"days" validate:"required,oneof=7 30"`
|
||||
}
|
||||
DailyTrafficStats {
|
||||
Date string `json:"date"`
|
||||
Upload int64 `json:"upload"`
|
||||
Download int64 `json:"download"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
GetUserTrafficStatsResponse {
|
||||
List []DailyTrafficStats `json:"list"`
|
||||
TotalUpload int64 `json:"total_upload"`
|
||||
TotalDownload int64 `json:"total_download"`
|
||||
TotalTraffic int64 `json:"total_traffic"`
|
||||
}
|
||||
)
|
||||
|
||||
@server (
|
||||
@@ -374,11 +390,15 @@ service ppanel {
|
||||
|
||||
@doc "Get Subscribe Status"
|
||||
@handler GetSubscribeStatus
|
||||
get /subscribe_status (GetSubscribeStatusRequest) returns (GetSubscribeStatusResponse)
|
||||
post /subscribe_status (GetSubscribeStatusRequest) returns (GetSubscribeStatusResponse)
|
||||
|
||||
@doc "Get User Invite Stats"
|
||||
@handler GetUserInviteStats
|
||||
get /invite_stats (GetUserInviteStatsRequest) returns (GetUserInviteStatsResponse)
|
||||
|
||||
@doc "Get User Traffic Statistics"
|
||||
@handler GetUserTrafficStats
|
||||
get /traffic_stats (GetUserTrafficStatsRequest) returns (GetUserTrafficStatsResponse)
|
||||
}
|
||||
|
||||
@server (
|
||||
|
||||
Reference in New Issue
Block a user