fix
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
syntax = "v1"
|
||||
|
||||
import "product.api"
|
||||
|
||||
info (
|
||||
title: "代理服务"
|
||||
desc: "新代理系统接口"
|
||||
@@ -224,6 +226,10 @@ service main {
|
||||
@handler ApplyWithdrawal
|
||||
post /withdrawal/apply (ApplyWithdrawalReq) returns (ApplyWithdrawalResp)
|
||||
|
||||
// 获取上次提现信息(用于前端预填)
|
||||
@handler GetLastWithdrawalInfo
|
||||
get /withdrawal/last_info (GetLastWithdrawalInfoReq) returns (GetLastWithdrawalInfoResp)
|
||||
|
||||
// 实名认证
|
||||
@handler RealNameAuth
|
||||
post /real_name (RealNameAuthReq) returns (RealNameAuthResp)
|
||||
@@ -251,6 +257,28 @@ service main {
|
||||
// 获取推广查询报告列表
|
||||
@handler GetPromotionQueryList
|
||||
get /promotion/query/list (GetPromotionQueryListReq) returns (GetPromotionQueryListResp)
|
||||
|
||||
// ============================================
|
||||
// 用户模块白名单相关接口
|
||||
// ============================================
|
||||
@handler GetWhitelistFeatures
|
||||
get /whitelist/features (GetWhitelistFeaturesReq) returns (GetWhitelistFeaturesResp)
|
||||
|
||||
// 创建白名单订单
|
||||
@handler CreateWhitelistOrder
|
||||
post /whitelist/order/create (CreateWhitelistOrderReq) returns (CreateWhitelistOrderResp)
|
||||
|
||||
// 获取用户白名单列表
|
||||
@handler GetWhitelistList
|
||||
get /whitelist/list (GetWhitelistListReq) returns (GetWhitelistListResp)
|
||||
|
||||
// 检查模块是否已下架(用于显示下架按钮状态)
|
||||
@handler CheckFeatureWhitelistStatus
|
||||
get /whitelist/check (CheckFeatureWhitelistStatusReq) returns (CheckFeatureWhitelistStatusResp)
|
||||
|
||||
// 下架单个模块(创建订单并支付)
|
||||
@handler OfflineFeature
|
||||
post /whitelist/offline (OfflineFeatureReq) returns (OfflineFeatureResp)
|
||||
}
|
||||
|
||||
type (
|
||||
@@ -425,16 +453,18 @@ type (
|
||||
}
|
||||
// 收益信息
|
||||
GetRevenueInfoResp {
|
||||
Balance float64 `json:"balance"` // 可用余额
|
||||
FrozenBalance float64 `json:"frozen_balance"` // 冻结余额
|
||||
TotalEarnings float64 `json:"total_earnings"` // 累计收益(钱包总收益)
|
||||
WithdrawnAmount float64 `json:"withdrawn_amount"` // 累计提现
|
||||
CommissionTotal float64 `json:"commission_total"` // 佣金累计总收益(推广订单获得的佣金)
|
||||
CommissionToday float64 `json:"commission_today"` // 佣金今日收益
|
||||
CommissionMonth float64 `json:"commission_month"` // 佣金本月收益
|
||||
RebateTotal float64 `json:"rebate_total"` // 返佣累计总收益(包括推广返佣和升级返佣)
|
||||
RebateToday float64 `json:"rebate_today"` // 返佣今日收益
|
||||
RebateMonth float64 `json:"rebate_month"` // 返佣本月收益
|
||||
Balance float64 `json:"balance"` // 可用余额
|
||||
FrozenBalance float64 `json:"frozen_balance"` // 冻结余额
|
||||
TotalEarnings float64 `json:"total_earnings"` // 累计收益(钱包总收益)
|
||||
WithdrawnAmount float64 `json:"withdrawn_amount"` // 累计提现
|
||||
CommissionTotal float64 `json:"commission_total"` // 佣金累计总收益(推广订单获得的佣金)
|
||||
CommissionToday float64 `json:"commission_today"` // 佣金今日收益
|
||||
CommissionMonth float64 `json:"commission_month"` // 佣金本月收益
|
||||
RebateTotal float64 `json:"rebate_total"` // 返佣累计总收益(包括推广返佣和升级返佣)
|
||||
RebateToday float64 `json:"rebate_today"` // 返佣今日收益
|
||||
RebateMonth float64 `json:"rebate_month"` // 返佣本月收益
|
||||
AlipayMonthQuota float64 `json:"alipay_month_quota"` // 支付宝每月提现总额度
|
||||
AlipayMonthUsed float64 `json:"alipay_month_used"` // 本月已使用的支付宝提现额度
|
||||
}
|
||||
// 佣金记录
|
||||
GetCommissionListReq {
|
||||
@@ -473,6 +503,7 @@ type (
|
||||
OrderNo string `json:"order_no"` // 订单号
|
||||
RebateType int64 `json:"rebate_type"` // 返佣类型:1=直接上级,2=钻石上级,3=黄金上级
|
||||
Amount float64 `json:"amount"` // 返佣金额
|
||||
Status int64 `json:"status"` // 状态:1=已发放,2=已冻结,3=已取消(已退款)
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
}
|
||||
// 升级返佣记录
|
||||
@@ -539,28 +570,46 @@ type (
|
||||
Total int64 `json:"total"` // 总数
|
||||
List []WithdrawalItem `json:"list"` // 列表
|
||||
}
|
||||
// 提现记录
|
||||
WithdrawalItem {
|
||||
Id string `json:"id"` // 记录ID
|
||||
WithdrawalNo string `json:"withdrawal_no"` // 提现单号
|
||||
Amount float64 `json:"amount"` // 提现金额
|
||||
TaxAmount float64 `json:"tax_amount"` // 税费金额
|
||||
ActualAmount float64 `json:"actual_amount"` // 实际到账金额
|
||||
Status int64 `json:"status"` // 状态:1=待审核,2=审核通过,3=审核拒绝,4=提现中,5=提现成功,6=提现失败
|
||||
PayeeAccount string `json:"payee_account"` // 收款账户
|
||||
PayeeName string `json:"payee_name"` // 收款人姓名
|
||||
Remark string `json:"remark"` // 备注
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
Id string `json:"id"` // 记录ID
|
||||
WithdrawalNo string `json:"withdrawal_no"` // 提现单号
|
||||
Amount float64 `json:"amount"` // 提现金额
|
||||
TaxAmount float64 `json:"tax_amount"` // 税费金额
|
||||
ActualAmount float64 `json:"actual_amount"` // 实际到账金额
|
||||
Status int64 `json:"status"` // 状态:1=待审核,2=审核通过,3=审核拒绝,4=提现中,5=提现成功,6=提现失败
|
||||
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"` // 创建时间
|
||||
}
|
||||
// 申请提现
|
||||
ApplyWithdrawalReq {
|
||||
Amount float64 `json:"amount"` // 提现金额
|
||||
PayeeAccount string `json:"payee_account"` // 收款账户
|
||||
PayeeName string `json:"payee_name"` // 收款人姓名
|
||||
Amount float64 `json:"amount"` // 提现金额
|
||||
WithdrawalType int64 `json:"withdrawal_type"` // 提现方式:1=支付宝,2=银行卡
|
||||
PayeeAccount string `json:"payee_account"` // 收款账户(支付宝账号或银行卡号)
|
||||
PayeeName string `json:"payee_name"` // 收款人姓名
|
||||
BankCardNo string `json:"bank_card_no,optional"` // 银行卡号(银行卡提现必填)
|
||||
BankName string `json:"bank_name,optional"` // 开户行名称(银行卡提现必填)
|
||||
}
|
||||
ApplyWithdrawalResp {
|
||||
WithdrawalId string `json:"withdrawal_id"` // 提现记录ID
|
||||
WithdrawalNo string `json:"withdrawal_no"` // 提现单号
|
||||
}
|
||||
// 获取上次提现信息(用于前端预填)
|
||||
GetLastWithdrawalInfoReq {
|
||||
WithdrawalType int64 `form:"withdrawal_type"` // 提现方式:1=支付宝,2=银行卡
|
||||
}
|
||||
GetLastWithdrawalInfoResp {
|
||||
WithdrawalType int64 `json:"withdrawal_type"` // 提现方式
|
||||
PayeeAccount string `json:"payee_account"` // 收款账户(支付宝账号或银行卡号)
|
||||
PayeeName string `json:"payee_name"` // 收款人姓名
|
||||
BankCardNo string `json:"bank_card_no"` // 银行卡号
|
||||
BankName string `json:"bank_name"` // 开户行名称
|
||||
}
|
||||
// 实名认证
|
||||
RealNameAuthReq {
|
||||
Name string `json:"name"` // 姓名
|
||||
@@ -589,6 +638,73 @@ type (
|
||||
Params map[string]interface{} `json:"params"` // 查询参数(已脱敏)
|
||||
Price float64 `json:"price"` // 查询价格
|
||||
}
|
||||
// ============================================
|
||||
// 用户模块白名单相关类型
|
||||
// ============================================
|
||||
GetWhitelistFeaturesReq {}
|
||||
GetWhitelistFeaturesResp {
|
||||
List []WhitelistFeatureItem `json:"list"` // 可屏蔽的feature列表
|
||||
}
|
||||
WhitelistFeatureItem {
|
||||
FeatureId string `json:"feature_id"` // Feature的UUID
|
||||
FeatureApiId string `json:"feature_api_id"` // Feature的API标识
|
||||
FeatureName string `json:"feature_name"` // Feature的名称
|
||||
WhitelistPrice float64 `json:"whitelist_price"` // 屏蔽价格(单位:元)
|
||||
}
|
||||
CreateWhitelistOrderReq {
|
||||
IdCard string `json:"id_card"` // 身份证号(查询对象标识)
|
||||
FeatureIds []string `json:"feature_ids"` // 要屏蔽的feature ID列表
|
||||
OrderId string `json:"order_id,optional"` // 关联的查询订单ID(可选)
|
||||
}
|
||||
CreateWhitelistOrderResp {
|
||||
OrderId string `json:"order_id"` // 订单ID
|
||||
OrderNo string `json:"order_no"` // 订单号
|
||||
TotalAmount float64 `json:"total_amount"` // 总金额
|
||||
}
|
||||
GetWhitelistListReq {
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"page_size"` // 每页数量
|
||||
IdCard string `form:"id_card,optional"` // 身份证号(可选,用于筛选)
|
||||
}
|
||||
GetWhitelistListResp {
|
||||
Total int64 `json:"total"` // 总数
|
||||
List []WhitelistItem `json:"list"` // 列表
|
||||
}
|
||||
WhitelistItem {
|
||||
Id string `json:"id"` // 白名单记录ID
|
||||
IdCard string `json:"id_card"` // 身份证号
|
||||
FeatureId string `json:"feature_id"` // Feature的UUID
|
||||
FeatureApiId string `json:"feature_api_id"` // Feature的API标识
|
||||
FeatureName string `json:"feature_name"` // Feature的名称
|
||||
Amount float64 `json:"amount"` // 费用
|
||||
Status int64 `json:"status"` // 状态:1=生效,2=已失效
|
||||
StatusText string `json:"status_text"` // 状态文本
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
}
|
||||
// 检查模块白名单状态请求
|
||||
CheckFeatureWhitelistStatusReq {
|
||||
IdCard string `form:"id_card"` // 身份证号
|
||||
FeatureApiId string `form:"feature_api_id"` // Feature的API标识
|
||||
QueryId string `form:"query_id,optional"` // 查询记录ID(可选,用于检查报告数据是否已删除)
|
||||
}
|
||||
// 检查模块白名单状态响应
|
||||
CheckFeatureWhitelistStatusResp {
|
||||
IsWhitelisted bool `json:"is_whitelisted"` // 是否在白名单中
|
||||
WhitelistPrice float64 `json:"whitelist_price"` // 屏蔽价格(单位:元),如果为0表示不支持下架
|
||||
FeatureId string `json:"feature_id"` // Feature的UUID
|
||||
DataDeleted bool `json:"data_deleted"` // 报告数据是否已删除(仅当提供了query_id时有效)
|
||||
}
|
||||
// 下架单个模块请求
|
||||
OfflineFeatureReq {
|
||||
FeatureApiId string `json:"feature_api_id"` // Feature的API标识
|
||||
QueryId string `json:"query_id"` // 查询记录ID(Query表的ID,必选)
|
||||
}
|
||||
// 下架单个模块响应
|
||||
OfflineFeatureResp {
|
||||
Success bool `json:"success"` // 是否已完成下架
|
||||
NeedPay bool `json:"need_pay"` // 是否需要发起支付
|
||||
Amount float64 `json:"amount"` // 需要支付的金额(单位:元),0表示无需支付
|
||||
}
|
||||
)
|
||||
|
||||
// ============================================
|
||||
|
||||
Reference in New Issue
Block a user