fix analysis

This commit is contained in:
2025-12-27 13:51:26 +08:00
parent ed50e9b778
commit cc1680cf01
17 changed files with 485 additions and 57 deletions

View File

@@ -39,6 +39,14 @@ service main {
@doc "重新执行代理处理"
@handler AdminRetryAgentProcess
post /retry-agent-process/:id (AdminRetryAgentProcessReq) returns (AdminRetryAgentProcessResp)
@doc "获取退款统计数据"
@handler AdminGetRefundStatistics
get /refund-statistics (AdminGetRefundStatisticsReq) returns (AdminGetRefundStatisticsResp)
@doc "获取收入和利润统计数据"
@handler AdminGetRevenueStatistics
get /revenue-statistics (AdminGetRevenueStatisticsReq) returns (AdminGetRevenueStatisticsResp)
}
type (
@@ -60,6 +68,7 @@ type (
PayTimeEnd string `form:"pay_time_end,optional"` // 支付时间结束
RefundTimeStart string `form:"refund_time_start,optional"` // 退款时间开始
RefundTimeEnd string `form:"refund_time_end,optional"` // 退款时间结束
SalesCost float64 `form:"sales_cost,optional"` // 成本价
}
// 列表响应
AdminGetOrderListResp {
@@ -75,6 +84,7 @@ type (
PaymentPlatform string `json:"payment_platform"` // 支付方式
PaymentScene string `json:"payment_scene"` // 支付平台
Amount float64 `json:"amount"` // 金额
SalesCost float64 `json:"sales_cost"` // 成本价
Status string `json:"status"` // 支付状态pending-待支付paid-已支付refunded-已退款closed-已关闭failed-支付失败
QueryState string `json:"query_state"` // 查询状态pending-待查询success-查询成功failed-查询失败 processing-查询中
CreateTime string `json:"create_time"` // 创建时间
@@ -83,6 +93,7 @@ type (
IsPromotion int64 `json:"is_promotion"` // 是否推广订单0-否1-是
IsAgentOrder bool `json:"is_agent_order"` // 是否是代理订单
AgentProcessStatus string `json:"agent_process_status"` // 代理事务处理状态not_agent-非代理订单success-处理成功failed-处理失败pending-待处理
}
// 详情请求
AdminGetOrderDetailReq {
@@ -97,6 +108,7 @@ type (
PaymentPlatform string `json:"payment_platform"` // 支付方式
PaymentScene string `json:"payment_scene"` // 支付平台
Amount float64 `json:"amount"` // 金额
SalesCost float64 `json:"sales_cost"` // 成本价
Status string `json:"status"` // 支付状态pending-待支付paid-已支付refunded-已退款closed-已关闭failed-支付失败
QueryState string `json:"query_state"` // 查询状态pending-待查询success-查询成功failed-查询失败 processing-查询中
CreateTime string `json:"create_time"` // 创建时间
@@ -170,4 +182,26 @@ type (
Message string `json:"message"` // 执行结果消息
ProcessedAt string `json:"processed_at"` // 处理时间
}
// 获取退款统计数据请求
AdminGetRefundStatisticsReq {
}
// 获取退款统计数据响应
AdminGetRefundStatisticsResp {
TotalRefundAmount float64 `json:"total_refund_amount"` // 总退款金额
TodayRefundAmount float64 `json:"today_refund_amount"` // 今日退款金额
}
// 获取收入和利润统计数据请求
AdminGetRevenueStatisticsReq {
}
// 获取收入和利润统计数据响应
AdminGetRevenueStatisticsResp {
TotalRevenueAmount float64 `json:"total_revenue_amount"` // 总收入金额
TodayRevenueAmount float64 `json:"today_revenue_amount"` // 今日收入金额
TotalProfitAmount float64 `json:"total_profit_amount"` // 总利润金额
TodayProfitAmount float64 `json:"today_profit_amount"` // 今日利润金额
}
)