完成合并:解决代码冲突
This commit is contained in:
@@ -83,9 +83,9 @@ service main {
|
||||
@handler AdminGetInviteCodeList
|
||||
get /invite_code/list (AdminGetInviteCodeListReq) returns (AdminGetInviteCodeListResp)
|
||||
|
||||
// 平台升级代理等级(免费升级,遵守代理系统逻辑规则)
|
||||
// 平台升级代理等级
|
||||
@handler AdminUpgradeAgent
|
||||
post /upgrade (AdminUpgradeAgentReq) returns (AdminUpgradeAgentResp)
|
||||
post /upgrade/agent (AdminUpgradeAgentReq) returns (AdminUpgradeAgentResp)
|
||||
}
|
||||
|
||||
type (
|
||||
@@ -128,14 +128,6 @@ type (
|
||||
AdminAuditAgentResp {
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
// 平台升级代理等级
|
||||
AdminUpgradeAgentReq {
|
||||
AgentId string `json:"agent_id"` // 代理ID
|
||||
ToLevel int64 `json:"to_level"` // 目标等级:2=黄金,3=钻石
|
||||
}
|
||||
AdminUpgradeAgentResp {
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
// 推广链接分页查询
|
||||
AdminGetAgentLinkListReq {
|
||||
Page int64 `form:"page"` // 页码
|
||||
@@ -165,6 +157,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"` // 主键
|
||||
@@ -177,7 +170,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 {
|
||||
@@ -212,6 +206,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"` // 主键
|
||||
@@ -220,6 +215,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 {
|
||||
@@ -258,17 +254,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"` // 总数
|
||||
@@ -434,5 +433,13 @@ type (
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []InviteCodeListItem `json:"items"` // 列表数据
|
||||
}
|
||||
// 平台升级代理等级
|
||||
AdminUpgradeAgentReq {
|
||||
AgentId string `json:"agent_id"` // 代理ID
|
||||
ToLevel int64 `json:"to_level"` // 目标等级:2=黄金,3=钻石
|
||||
}
|
||||
AdminUpgradeAgentResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -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,32 @@ 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)
|
||||
|
||||
// 检查订单是否属于当前代理推广
|
||||
@handler CheckOrderAgent
|
||||
get /order/agent (CheckOrderAgentReq) returns (CheckOrderAgentResp)
|
||||
}
|
||||
|
||||
type (
|
||||
@@ -413,28 +445,30 @@ type (
|
||||
LevelName string `json:"level_name"` // 等级名称
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
CreateTime string `json:"create_time"` // 加入团队时间
|
||||
TotalRebateAmount float64 `json:"total_rebate_amount"` // 返佣给我的总金额
|
||||
TodayRebateAmount float64 `json:"today_rebate_amount"` // 返佣给我的今日金额
|
||||
TodayInvites int64 `json:"today_invites"` // 邀请加入团队的今日人数
|
||||
MonthInvites int64 `json:"month_invites"` // 邀请加入团队的本月人数
|
||||
TotalInvites int64 `json:"total_invites"` // 邀请加入团队的总人数
|
||||
TodayQueries int64 `json:"today_queries"` // 当日查询量
|
||||
MonthQueries int64 `json:"month_queries"` // 本月查询量
|
||||
TotalQueries int64 `json:"total_queries"` // 总查询量
|
||||
TotalRebateAmount float64 `json:"total_rebate_amount"` // 返佣给我的总金额
|
||||
TodayRebateAmount float64 `json:"today_rebate_amount"` // 返佣给我的今日金额
|
||||
TotalInvites int64 `json:"total_invites"` // 邀请加入团队的总人数
|
||||
TodayInvites int64 `json:"today_invites"` // 邀请加入团队的今日人数
|
||||
MonthInvites int64 `json:"month_invites"` // 邀请加入团队的本月人数
|
||||
IsDirect bool `json:"is_direct"` // 是否直接下级
|
||||
}
|
||||
// 收益信息
|
||||
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 +507,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 +574,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"` // 姓名
|
||||
@@ -581,11 +634,88 @@ type (
|
||||
List []PromotionQueryItem `json:"list"` // 列表
|
||||
}
|
||||
PromotionQueryItem {
|
||||
Id string `json:"id"` // 查询ID
|
||||
OrderId string `json:"order_id"` // 订单ID
|
||||
ProductName string `json:"product_name"` // 产品名称
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
QueryState string `json:"query_state"` // 查询状态
|
||||
Id string `json:"id"` // 查询ID
|
||||
OrderId string `json:"order_id"` // 订单ID
|
||||
ProductName string `json:"product_name"` // 产品名称
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
QueryState string `json:"query_state"` // 查询状态
|
||||
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表示无需支付
|
||||
}
|
||||
// 检查订单是否属于当前代理请求
|
||||
CheckOrderAgentReq {
|
||||
OrderId string `form:"order_id"` // 订单ID
|
||||
}
|
||||
// 检查订单是否属于当前代理响应
|
||||
CheckOrderAgentResp {
|
||||
IsAgentOrder bool `json:"is_agent_order"` // 是否是当前代理推广的订单
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user