fix
This commit is contained in:
@@ -153,6 +153,7 @@ type (
|
||||
AgentId *string `form:"agent_id,optional"` // 代理ID(可选)
|
||||
OrderId *string `form:"order_id,optional"` // 订单ID(可选)
|
||||
ProcessStatus *int64 `form:"process_status,optional"` // 处理状态(可选)
|
||||
OrderStatus *string `form:"order_status,optional"` // 订单状态(可选):pending-待支付,paid-已支付,refunded-已退款,closed-已关闭,failed-支付失败
|
||||
}
|
||||
AgentOrderListItem {
|
||||
Id string `json:"id"` // 主键
|
||||
@@ -165,7 +166,8 @@ type (
|
||||
ActualBasePrice float64 `json:"actual_base_price"` // 实际底价
|
||||
PriceCost float64 `json:"price_cost"` // 提价成本
|
||||
AgentProfit float64 `json:"agent_profit"` // 代理收益
|
||||
ProcessStatus int64 `json:"process_status"` // 处理状态
|
||||
ProcessStatus int64 `json:"process_status"` // 处理状态(保留用于筛选,前端不显示)
|
||||
OrderStatus string `json:"order_status"` // 订单状态:pending-待支付,paid-已支付,refunded-已退款,closed-已关闭,failed-支付失败
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
}
|
||||
AdminGetAgentOrderListResp {
|
||||
@@ -200,6 +202,7 @@ type (
|
||||
AgentId *string `form:"agent_id,optional"` // 代理ID(可选)
|
||||
SourceAgentId *string `form:"source_agent_id,optional"` // 来源代理ID(可选)
|
||||
RebateType *int64 `form:"rebate_type,optional"` // 返佣类型(可选)
|
||||
Status *int64 `form:"status,optional"` // 状态(可选):1=已发放,2=已冻结,3=已取消(已退款)
|
||||
}
|
||||
AgentRebateListItem {
|
||||
Id string `json:"id"` // 主键
|
||||
@@ -208,6 +211,7 @@ type (
|
||||
OrderId string `json:"order_id"` // 订单ID
|
||||
RebateType int64 `json:"rebate_type"` // 返佣类型
|
||||
Amount float64 `json:"amount"` // 金额
|
||||
Status int64 `json:"status"` // 状态:1=已发放,2=已冻结,3=已取消(已退款)
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
}
|
||||
AdminGetAgentRebateListResp {
|
||||
@@ -246,17 +250,20 @@ type (
|
||||
WithdrawNo *string `form:"withdraw_no,optional"` // 提现单号(可选)
|
||||
}
|
||||
AgentWithdrawalListItem {
|
||||
Id string `json:"id"` // 主键
|
||||
AgentId string `json:"agent_id"` // 代理ID
|
||||
WithdrawNo string `json:"withdraw_no"` // 提现单号
|
||||
Amount float64 `json:"amount"` // 金额
|
||||
TaxAmount float64 `json:"tax_amount"` // 税费金额
|
||||
ActualAmount float64 `json:"actual_amount"` // 实际到账金额
|
||||
Status int64 `json:"status"` // 状态
|
||||
PayeeAccount string `json:"payee_account"` // 收款账户
|
||||
PayeeName string `json:"payee_name"` // 收款人姓名
|
||||
Remark string `json:"remark"` // 备注
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
Id string `json:"id"` // 主键
|
||||
AgentId string `json:"agent_id"` // 代理ID
|
||||
WithdrawNo string `json:"withdraw_no"` // 提现单号
|
||||
Amount float64 `json:"amount"` // 金额
|
||||
TaxAmount float64 `json:"tax_amount"` // 税费金额
|
||||
ActualAmount float64 `json:"actual_amount"` // 实际到账金额
|
||||
Status int64 `json:"status"` // 状态
|
||||
WithdrawalType int64 `json:"withdrawal_type"` // 提现方式:1=支付宝,2=银行卡
|
||||
PayeeAccount string `json:"payee_account"` // 收款账户(支付宝账号或银行卡号)
|
||||
PayeeName string `json:"payee_name"` // 收款人姓名
|
||||
BankCardNo string `json:"bank_card_no"` // 银行卡号(银行卡提现时使用)
|
||||
BankName string `json:"bank_name"` // 开户行名称(银行卡提现时使用)
|
||||
Remark string `json:"remark"` // 备注
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
}
|
||||
AdminGetAgentWithdrawalListResp {
|
||||
Total int64 `json:"total"` // 总数
|
||||
|
||||
179
app/main/api/desc/admin/admin_complaint.api
Normal file
179
app/main/api/desc/admin/admin_complaint.api
Normal file
@@ -0,0 +1,179 @@
|
||||
syntax = "v1"
|
||||
|
||||
info (
|
||||
title: "投诉管理服务"
|
||||
desc: "投诉管理相关接口"
|
||||
version: "v1"
|
||||
)
|
||||
|
||||
@server (
|
||||
prefix: api/v1/admin/complaint
|
||||
group: admin_complaint
|
||||
middleware: AdminAuthInterceptor
|
||||
)
|
||||
service main {
|
||||
@doc "获取投诉列表"
|
||||
@handler AdminGetComplaintList
|
||||
get /list (AdminGetComplaintListReq) returns (AdminGetComplaintListResp)
|
||||
|
||||
@doc "获取投诉详情"
|
||||
@handler AdminGetComplaintDetail
|
||||
get /detail/:id (AdminGetComplaintDetailReq) returns (AdminGetComplaintDetailResp)
|
||||
|
||||
@doc "更新投诉状态"
|
||||
@handler AdminUpdateComplaintStatus
|
||||
put /update-status/:id (AdminUpdateComplaintStatusReq) returns (AdminUpdateComplaintStatusResp)
|
||||
|
||||
@doc "更新投诉备注"
|
||||
@handler AdminUpdateComplaintRemark
|
||||
put /update-remark/:id (AdminUpdateComplaintRemarkReq) returns (AdminUpdateComplaintRemarkResp)
|
||||
}
|
||||
|
||||
type (
|
||||
// 列表请求
|
||||
AdminGetComplaintListReq {
|
||||
Page int64 `form:"page,default=1"` // 页码
|
||||
PageSize int64 `form:"pageSize,default=20"` // 每页数量
|
||||
Type string `form:"type,optional"` // 投诉类型:alipay-支付宝投诉,manual-主动投诉
|
||||
Status string `form:"status,optional"` // 投诉状态:pending-待处理,processing-处理中,resolved-已解决,closed-已关闭
|
||||
Name string `form:"name,optional"` // 投诉人姓名
|
||||
Contact string `form:"contact,optional"` // 联系方式
|
||||
OrderId string `form:"order_id,optional"` // 关联订单ID
|
||||
CreateTimeStart string `form:"create_time_start,optional"` // 创建时间开始
|
||||
CreateTimeEnd string `form:"create_time_end,optional"` // 创建时间结束
|
||||
HandleTimeStart string `form:"handle_time_start,optional"` // 处理时间开始
|
||||
HandleTimeEnd string `form:"handle_time_end,optional"` // 处理时间结束
|
||||
}
|
||||
|
||||
// 列表响应
|
||||
AdminGetComplaintListResp {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []ComplaintListItem `json:"items"` // 列表
|
||||
}
|
||||
|
||||
// 列表项
|
||||
ComplaintListItem {
|
||||
Id string `json:"id"` // 投诉ID
|
||||
Type string `json:"type"` // 投诉类型:alipay-支付宝投诉,manual-主动投诉
|
||||
OrderId string `json:"order_id"` // 关联订单ID
|
||||
Name string `json:"name"` // 投诉人姓名
|
||||
Contact string `json:"contact"` // 联系方式
|
||||
Content string `json:"content"` // 投诉内容
|
||||
Status string `json:"status"` // 投诉状态
|
||||
StatusDescription string `json:"status_description"` // 状态描述
|
||||
Remark string `json:"remark"` // 处理备注
|
||||
HandlerId string `json:"handler_id"` // 处理人ID
|
||||
HandleTime string `json:"handle_time"` // 处理时间
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
// 支付宝投诉特有字段
|
||||
TaskId string `json:"task_id"` // 支付宝投诉单号
|
||||
TradeNo string `json:"trade_no"` // 支付宝交易单号
|
||||
ComplainAmount string `json:"complain_amount"` // 投诉金额
|
||||
GmtComplain string `json:"gmt_complain"` // 投诉时间
|
||||
// 主动投诉特有字段
|
||||
Subject string `json:"subject"` // 投诉主题
|
||||
Priority string `json:"priority"` // 优先级
|
||||
Source string `json:"source"` // 投诉来源
|
||||
}
|
||||
|
||||
// 详情请求
|
||||
AdminGetComplaintDetailReq {
|
||||
Id string `path:"id"` // 投诉ID
|
||||
}
|
||||
|
||||
// 详情响应
|
||||
AdminGetComplaintDetailResp {
|
||||
Id string `json:"id"` // 投诉ID
|
||||
Type string `json:"type"` // 投诉类型:alipay-支付宝投诉,manual-主动投诉
|
||||
OrderId string `json:"order_id"` // 关联订单ID
|
||||
Name string `json:"name"` // 投诉人姓名
|
||||
Contact string `json:"contact"` // 联系方式
|
||||
Content string `json:"content"` // 投诉内容
|
||||
Status string `json:"status"` // 投诉状态
|
||||
StatusDescription string `json:"status_description"` // 状态描述
|
||||
Remark string `json:"remark"` // 处理备注
|
||||
HandlerId string `json:"handler_id"` // 处理人ID
|
||||
HandleTime string `json:"handle_time"` // 处理时间
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
// 支付宝投诉详情
|
||||
AlipayComplaint *AlipayComplaintDetail `json:"alipay_complaint,optional"` // 支付宝投诉详情
|
||||
// 主动投诉详情
|
||||
ManualComplaint *ManualComplaintDetail `json:"manual_complaint,optional"` // 主动投诉详情
|
||||
}
|
||||
|
||||
// 支付宝投诉详情
|
||||
AlipayComplaintDetail {
|
||||
Id string `json:"id"` // 支付宝投诉表ID
|
||||
AlipayId int64 `json:"alipay_id"` // 支付宝投诉主表的主键id
|
||||
TaskId string `json:"task_id"` // 投诉单号id
|
||||
OppositePid string `json:"opposite_pid"` // 被投诉人pid
|
||||
OppositeName string `json:"opposite_name"` // 被投诉方名称
|
||||
ComplainAmount string `json:"complain_amount"` // 投诉单涉及交易总金额
|
||||
GmtComplain string `json:"gmt_complain"` // 投诉时间
|
||||
GmtProcess string `json:"gmt_process"` // 处理时间
|
||||
GmtOverdue string `json:"gmt_overdue"` // 过期时间
|
||||
ComplainContent string `json:"complain_content"` // 用户投诉内容
|
||||
TradeNo string `json:"trade_no"` // 投诉交易单号
|
||||
Status string `json:"status"` // 投诉状态
|
||||
StatusDescription string `json:"status_description"` // 投诉单状态枚举值描述
|
||||
ProcessCode string `json:"process_code"` // 商家处理结果码
|
||||
ProcessMessage string `json:"process_message"` // 商家处理结果码对应描述
|
||||
ProcessRemark string `json:"process_remark"` // 商家处理备注
|
||||
ProcessImgUrlList []string `json:"process_img_url_list"` // 商家处理备注图片url列表
|
||||
GmtRiskFinishTime string `json:"gmt_risk_finish_time"` // 推送时间
|
||||
ComplainUrl string `json:"complain_url"` // 投诉网址
|
||||
CertifyInfo []string `json:"certify_info"` // 投诉凭证图片信息
|
||||
TradeInfoList []AlipayComplaintTradeInfo `json:"trade_info_list"` // 交易信息列表
|
||||
}
|
||||
|
||||
// 支付宝投诉交易信息
|
||||
AlipayComplaintTradeInfo {
|
||||
Id string `json:"id"` // 交易信息表ID
|
||||
AlipayTradeId string `json:"alipay_trade_id"` // 交易信息表主键id
|
||||
AlipayComplaintRecordId string `json:"alipay_complaint_record_id"` // 投诉主表id
|
||||
TradeNo string `json:"trade_no"` // 支付宝交易单号
|
||||
OutNo string `json:"out_no"` // 商家订单号
|
||||
GmtTrade string `json:"gmt_trade"` // 交易时间
|
||||
GmtRefund string `json:"gmt_refund"` // 退款时间
|
||||
Status string `json:"status"` // 交易投诉状态
|
||||
StatusDescription string `json:"status_description"` // 交易投诉状态描述
|
||||
Amount string `json:"amount"` // 交易单金额
|
||||
}
|
||||
|
||||
// 主动投诉详情
|
||||
ManualComplaintDetail {
|
||||
Id string `json:"id"` // 主动投诉表ID
|
||||
UserId string `json:"user_id"` // 关联用户ID
|
||||
Subject string `json:"subject"` // 投诉主题
|
||||
Priority string `json:"priority"` // 优先级:low-低,medium-中,high-高,urgent-紧急
|
||||
Source string `json:"source"` // 投诉来源:web-网站,phone-电话,email-邮件,other-其他
|
||||
AttachmentUrls []string `json:"attachment_urls"` // 附件URL列表
|
||||
}
|
||||
|
||||
// 更新投诉状态请求
|
||||
AdminUpdateComplaintStatusReq {
|
||||
Id string `path:"id"` // 投诉ID
|
||||
Status string `json:"status"` // 投诉状态:pending-待处理,processing-处理中,resolved-已解决,closed-已关闭
|
||||
StatusDescription string `json:"status_description,optional"` // 状态描述
|
||||
HandlerId string `json:"handler_id,optional"` // 处理人ID
|
||||
}
|
||||
|
||||
// 更新投诉状态响应
|
||||
AdminUpdateComplaintStatusResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
// 更新投诉备注请求
|
||||
AdminUpdateComplaintRemarkReq {
|
||||
Id string `path:"id"` // 投诉ID
|
||||
Remark string `json:"remark"` // 处理备注
|
||||
}
|
||||
|
||||
// 更新投诉备注响应
|
||||
AdminUpdateComplaintRemarkResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
)
|
||||
|
||||
@@ -45,8 +45,9 @@ service main {
|
||||
type (
|
||||
// 创建功能请求
|
||||
AdminCreateFeatureReq {
|
||||
ApiId string `json:"api_id"` // API标识
|
||||
Name string `json:"name"` // 描述
|
||||
ApiId string `json:"api_id"` // API标识
|
||||
Name string `json:"name"` // 描述
|
||||
WhitelistPrice *float64 `json:"whitelist_price,optional"` // 白名单屏蔽价格(单位:元)
|
||||
}
|
||||
// 创建功能响应
|
||||
AdminCreateFeatureResp {
|
||||
@@ -54,9 +55,10 @@ type (
|
||||
}
|
||||
// 更新功能请求
|
||||
AdminUpdateFeatureReq {
|
||||
Id string `path:"id"` // 功能ID
|
||||
ApiId *string `json:"api_id,optional"` // API标识
|
||||
Name *string `json:"name,optional"` // 描述
|
||||
Id string `path:"id"` // 功能ID
|
||||
ApiId *string `json:"api_id,optional"` // API标识
|
||||
Name *string `json:"name,optional"` // 描述
|
||||
WhitelistPrice *float64 `json:"whitelist_price,optional"` // 白名单屏蔽价格(单位:元)
|
||||
}
|
||||
// 更新功能响应
|
||||
AdminUpdateFeatureResp {
|
||||
@@ -79,11 +81,12 @@ type (
|
||||
}
|
||||
// 功能列表项
|
||||
FeatureListItem {
|
||||
Id string `json:"id"` // 功能ID
|
||||
ApiId string `json:"api_id"` // API标识
|
||||
Name string `json:"name"` // 描述
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
Id string `json:"id"` // 功能ID
|
||||
ApiId string `json:"api_id"` // API标识
|
||||
Name string `json:"name"` // 描述
|
||||
WhitelistPrice float64 `json:"whitelist_price"` // 白名单屏蔽价格(单位:元)
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
}
|
||||
// 获取功能列表响应
|
||||
AdminGetFeatureListResp {
|
||||
@@ -96,11 +99,12 @@ type (
|
||||
}
|
||||
// 获取功能详情响应
|
||||
AdminGetFeatureDetailResp {
|
||||
Id string `json:"id"` // 功能ID
|
||||
ApiId string `json:"api_id"` // API标识
|
||||
Name string `json:"name"` // 描述
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
Id string `json:"id"` // 功能ID
|
||||
ApiId string `json:"api_id"` // API标识
|
||||
Name string `json:"name"` // 描述
|
||||
WhitelistPrice float64 `json:"whitelist_price"` // 白名单屏蔽价格(单位:元)
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
}
|
||||
// 配置功能示例数据请求
|
||||
AdminConfigFeatureExampleReq {
|
||||
|
||||
77
app/main/api/desc/admin/dashboard.api
Normal file
77
app/main/api/desc/admin/dashboard.api
Normal file
@@ -0,0 +1,77 @@
|
||||
syntax = "v1"
|
||||
|
||||
info (
|
||||
title: "后台统计面板服务"
|
||||
desc: "后台统计面板相关接口"
|
||||
author: "team"
|
||||
version: "v1"
|
||||
)
|
||||
|
||||
// ============================================
|
||||
// 统计面板接口
|
||||
// ============================================
|
||||
@server (
|
||||
prefix: /api/v1/admin/dashboard
|
||||
group: admin_dashboard
|
||||
middleware: AdminAuthInterceptor
|
||||
)
|
||||
service main {
|
||||
// 获取统计面板数据
|
||||
@handler AdminGetDashboardStatistics
|
||||
get /statistics returns (AdminGetDashboardStatisticsResp)
|
||||
}
|
||||
|
||||
type (
|
||||
// 统计面板响应
|
||||
AdminGetDashboardStatisticsResp {
|
||||
// 订单统计
|
||||
OrderStats AdminOrderStatistics `json:"order_stats"`
|
||||
// 营收统计
|
||||
RevenueStats AdminRevenueStatistics `json:"revenue_stats"`
|
||||
// 代理统计
|
||||
AgentStats AdminAgentStatistics `json:"agent_stats"`
|
||||
// 利润统计
|
||||
ProfitStats AdminProfitStatistics `json:"profit_stats"`
|
||||
// 订单趋势(最近7天)
|
||||
OrderTrend []AdminTrendData `json:"order_trend"`
|
||||
// 营收趋势(最近7天)
|
||||
RevenueTrend []AdminTrendData `json:"revenue_trend"`
|
||||
}
|
||||
// 订单统计
|
||||
AdminOrderStatistics {
|
||||
TodayCount int64 `json:"today_count"` // 今日订单数
|
||||
MonthCount int64 `json:"month_count"` // 当月订单数
|
||||
TotalCount int64 `json:"total_count"` // 总订单数
|
||||
YesterdayCount int64 `json:"yesterday_count"` // 昨日订单数
|
||||
ChangeRate float64 `json:"change_rate"` // 变化率(百分比)
|
||||
}
|
||||
// 营收统计
|
||||
AdminRevenueStatistics {
|
||||
TodayAmount float64 `json:"today_amount"` // 今日营收
|
||||
MonthAmount float64 `json:"month_amount"` // 当月营收
|
||||
TotalAmount float64 `json:"total_amount"` // 总营收
|
||||
YesterdayAmount float64 `json:"yesterday_amount"` // 昨日营收
|
||||
ChangeRate float64 `json:"change_rate"` // 变化率(百分比)
|
||||
}
|
||||
// 代理统计
|
||||
AdminAgentStatistics {
|
||||
TotalCount int64 `json:"total_count"` // 代理总数
|
||||
TodayNew int64 `json:"today_new"` // 今日新增
|
||||
MonthNew int64 `json:"month_new"` // 当月新增
|
||||
}
|
||||
// 利润统计
|
||||
AdminProfitStatistics {
|
||||
TodayProfit float64 `json:"today_profit"` // 今日利润
|
||||
MonthProfit float64 `json:"month_profit"` // 当月利润
|
||||
TotalProfit float64 `json:"total_profit"` // 总利润
|
||||
TodayProfitRate float64 `json:"today_profit_rate"` // 今日利润率
|
||||
MonthProfitRate float64 `json:"month_profit_rate"` // 当月利润率
|
||||
TotalProfitRate float64 `json:"total_profit_rate"` // 总利润率
|
||||
}
|
||||
// 趋势数据
|
||||
AdminTrendData {
|
||||
Date string `json:"date"` // 日期(格式:MM-DD)
|
||||
Value float64 `json:"value"` // 数值
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user