fix
This commit is contained in:
@@ -5,6 +5,7 @@ info (
|
||||
desc: "代理服务接口"
|
||||
version: "v1"
|
||||
)
|
||||
|
||||
@server (
|
||||
prefix: api/v1/agent
|
||||
group: agent
|
||||
@@ -14,14 +15,42 @@ service main {
|
||||
@handler GetAgentPromotionQrcode
|
||||
get /promotion/qrcode (GetAgentPromotionQrcodeReq)
|
||||
|
||||
// 获取会员开通信息
|
||||
@handler GetMembershipInfo
|
||||
get /membership/info returns (GetMembershipInfoResp)
|
||||
}
|
||||
|
||||
type (
|
||||
GetAgentPromotionQrcodeReq{
|
||||
GetAgentPromotionQrcodeReq {
|
||||
QrcodeType string `form:"qrcode_type"`
|
||||
QrcodeUrl string `form:"qrcode_url"`
|
||||
QrcodeUrl string `form:"qrcode_url"`
|
||||
}
|
||||
// 会员配置信息
|
||||
MembershipConfigInfo {
|
||||
Id int64 `json:"id"` // 主键
|
||||
LevelName string `json:"level_name"` // 会员级别名称
|
||||
Price float64 `json:"price"` // 会员年费
|
||||
ReportCommission float64 `json:"report_commission"` // 直推报告收益
|
||||
LowerActivityReward float64 `json:"lower_activity_reward"` // 下级活跃奖励金额
|
||||
NewActivityReward float64 `json:"new_activity_reward"` // 新增活跃奖励金额
|
||||
LowerStandardCount int64 `json:"lower_standard_count"` // 活跃下级达标个数
|
||||
NewLowerStandardCount int64 `json:"new_lower_standard_count"` // 新增活跃下级达标个数
|
||||
LowerWithdrawRewardRatio float64 `json:"lower_withdraw_reward_ratio"` // 下级提现奖励比例
|
||||
LowerConvertVipReward float64 `json:"lower_convert_vip_reward"` // 下级转化VIP奖励
|
||||
LowerConvertSvipReward float64 `json:"lower_convert_svip_reward"` // 下级转化SVIP奖励
|
||||
ExemptionAmount float64 `json:"exemption_amount"` // 免审核金额
|
||||
PriceIncreaseMax float64 `json:"price_increase_max"` // 提价最高金额
|
||||
PriceRatio float64 `json:"price_ratio"` // 提价区间收取比例
|
||||
PriceIncreaseAmount float64 `json:"price_increase_amount"` // 在原本成本上加价的金额
|
||||
}
|
||||
// 获取会员开通信息响应
|
||||
GetMembershipInfoResp {
|
||||
NormalConfig MembershipConfigInfo `json:"normal_config"` // 普通代理配置
|
||||
VipConfig MembershipConfigInfo `json:"vip_config"` // VIP会员配置
|
||||
SvipConfig MembershipConfigInfo `json:"svip_config"` // SVIP会员配置
|
||||
}
|
||||
)
|
||||
|
||||
// 代理服务基本类型定义
|
||||
type AgentProductConfig {
|
||||
ProductID int64 `json:"product_id"`
|
||||
@@ -49,6 +78,7 @@ type ProductConfig {
|
||||
PriceRangeMin float64 `json:"price_range_min"`
|
||||
PriceRangeMax float64 `json:"price_range_max"`
|
||||
}
|
||||
|
||||
@server (
|
||||
prefix: api/v1/agent
|
||||
group: agent
|
||||
@@ -62,10 +92,11 @@ service main {
|
||||
@handler GetAgentRevenueInfo
|
||||
get /revenue (GetAgentRevenueInfoReq) returns (GetAgentRevenueInfoResp)
|
||||
}
|
||||
|
||||
@server (
|
||||
prefix: api/v1/agent
|
||||
group: agent
|
||||
jwt: JwtAuth
|
||||
prefix: api/v1/agent
|
||||
group: agent
|
||||
jwt: JwtAuth
|
||||
middleware: UserAuthInterceptor
|
||||
)
|
||||
service main {
|
||||
@@ -88,21 +119,21 @@ service main {
|
||||
// 下级贡献详情
|
||||
@handler GetAgentSubordinateContributionDetail
|
||||
get /subordinate/contribution/detail (GetAgentSubordinateContributionDetailReq) returns (GetAgentSubordinateContributionDetailResp)
|
||||
|
||||
|
||||
@handler AgentRealName
|
||||
post /real_name (AgentRealNameReq) returns (AgentRealNameResp)
|
||||
}
|
||||
|
||||
type (
|
||||
AgentInfoResp {
|
||||
status int64 `json:"status"` // 0=待审核,1=审核通过,2=审核未通过,3=未申请
|
||||
isAgent bool `json:"is_agent"`
|
||||
agentID int64 `json:"agent_id"`
|
||||
level string `json:"level"`
|
||||
region string `json:"region"`
|
||||
mobile string `json:"mobile"`
|
||||
status int64 `json:"status"` // 0=待审核,1=审核通过,2=审核未通过,3=未申请
|
||||
isAgent bool `json:"is_agent"`
|
||||
agentID int64 `json:"agent_id"`
|
||||
level string `json:"level"`
|
||||
region string `json:"region"`
|
||||
mobile string `json:"mobile"`
|
||||
expiryTime string `json:"expiry_time"`
|
||||
isRealName bool `json:"is_real_name"`
|
||||
isRealName bool `json:"is_real_name"`
|
||||
}
|
||||
// 查询代理申请状态响应
|
||||
AgentAuditStatusResp {
|
||||
@@ -124,64 +155,63 @@ type (
|
||||
PageSize int64 `form:"page_size"` // 每页数据量
|
||||
}
|
||||
GetAgentSubordinateListResp {
|
||||
Total int64 `json:"total"` // 总记录数
|
||||
Total int64 `json:"total"` // 总记录数
|
||||
List []AgentSubordinateList `json:"list"` // 查询列表
|
||||
}
|
||||
AgentSubordinateList {
|
||||
ID int64 `json:"id"`
|
||||
Mobile string `json:"mobile"`
|
||||
CreateTime string `json:"create_time"`
|
||||
LevelName string `json:"level_name"`
|
||||
TotalOrders int64 `json:"total_orders"` // 总单量
|
||||
TotalEarnings float64 `json:"total_earnings"` // 总金额
|
||||
ID int64 `json:"id"`
|
||||
Mobile string `json:"mobile"`
|
||||
CreateTime string `json:"create_time"`
|
||||
LevelName string `json:"level_name"`
|
||||
TotalOrders int64 `json:"total_orders"` // 总单量
|
||||
TotalEarnings float64 `json:"total_earnings"` // 总金额
|
||||
TotalContribution float64 `json:"total_contribution"` // 总贡献
|
||||
}
|
||||
GetAgentSubordinateContributionDetailReq {
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"page_size"` // 每页数据量
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"page_size"` // 每页数据量
|
||||
SubordinateID int64 `form:"subordinate_id"` // 下级ID
|
||||
}
|
||||
GetAgentSubordinateContributionDetailResp {
|
||||
Mobile string `json:"mobile"`
|
||||
Total int64 `json:"total"` // 总记录数
|
||||
CreateTime string `json:"create_time"`
|
||||
TotalEarnings float64 `json:"total_earnings"` // 总金额
|
||||
TotalContribution float64 `json:"total_contribution"` // 总贡献
|
||||
TotalOrders int64 `json:"total_orders"` // 总单量
|
||||
LevelName string `json:"level_name"` // 等级名称
|
||||
List []AgentSubordinateContributionDetail `json:"list"` // 查询列表
|
||||
Stats AgentSubordinateContributionStats `json:"stats"` // 统计数据
|
||||
Mobile string `json:"mobile"`
|
||||
Total int64 `json:"total"` // 总记录数
|
||||
CreateTime string `json:"create_time"`
|
||||
TotalEarnings float64 `json:"total_earnings"` // 总金额
|
||||
TotalContribution float64 `json:"total_contribution"` // 总贡献
|
||||
TotalOrders int64 `json:"total_orders"` // 总单量
|
||||
LevelName string `json:"level_name"` // 等级名称
|
||||
List []AgentSubordinateContributionDetail `json:"list"` // 查询列表
|
||||
Stats AgentSubordinateContributionStats `json:"stats"` // 统计数据
|
||||
}
|
||||
AgentSubordinateContributionDetail {
|
||||
ID int64 `json:"id"`
|
||||
CreateTime string `json:"create_time"`
|
||||
Amount float64 `json:"amount"`
|
||||
Type string `json:"type"`
|
||||
CreateTime string `json:"create_time"`
|
||||
Amount float64 `json:"amount"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
AgentSubordinateContributionStats {
|
||||
CostCount int64 `json:"cost_count"` // 成本扣除次数
|
||||
CostAmount float64 `json:"cost_amount"` // 成本扣除总额
|
||||
PricingCount int64 `json:"pricing_count"` // 定价扣除次数
|
||||
PricingAmount float64 `json:"pricing_amount"` // 定价扣除总额
|
||||
DescendantPromotionCount int64 `json:"descendant_promotion_count"` // 下级推广次数
|
||||
DescendantPromotionAmount float64 `json:"descendant_promotion_amount"` // 下级推广总额
|
||||
DescendantUpgradeVipCount int64 `json:"descendant_upgrade_vip_count"` // 下级升级VIP次数
|
||||
DescendantUpgradeVipAmount float64 `json:"descendant_upgrade_vip_amount"` // 下级升级VIP总额
|
||||
DescendantUpgradeSvipCount int64 `json:"descendant_upgrade_svip_count"` // 下级升级SVIP次数
|
||||
CostCount int64 `json:"cost_count"` // 成本扣除次数
|
||||
CostAmount float64 `json:"cost_amount"` // 成本扣除总额
|
||||
PricingCount int64 `json:"pricing_count"` // 定价扣除次数
|
||||
PricingAmount float64 `json:"pricing_amount"` // 定价扣除总额
|
||||
DescendantPromotionCount int64 `json:"descendant_promotion_count"` // 下级推广次数
|
||||
DescendantPromotionAmount float64 `json:"descendant_promotion_amount"` // 下级推广总额
|
||||
DescendantUpgradeVipCount int64 `json:"descendant_upgrade_vip_count"` // 下级升级VIP次数
|
||||
DescendantUpgradeVipAmount float64 `json:"descendant_upgrade_vip_amount"` // 下级升级VIP总额
|
||||
DescendantUpgradeSvipCount int64 `json:"descendant_upgrade_svip_count"` // 下级升级SVIP次数
|
||||
DescendantUpgradeSvipAmount float64 `json:"descendant_upgrade_svip_amount"` // 下级升级SVIP总额
|
||||
DescendantStayActiveCount int64 `json:"descendant_stay_active_count"` // 下级保持活跃次数
|
||||
DescendantStayActiveAmount float64 `json:"descendant_stay_active_amount"` // 下级保持活跃总额
|
||||
DescendantNewActiveCount int64 `json:"descendant_new_active_count"` // 下级新增活跃次数
|
||||
DescendantNewActiveAmount float64 `json:"descendant_new_active_amount"` // 下级新增活跃总额
|
||||
DescendantWithdrawCount int64 `json:"descendant_withdraw_count"` // 下级提现次数
|
||||
DescendantWithdrawAmount float64 `json:"descendant_withdraw_amount"` // 下级提现总额
|
||||
DescendantStayActiveCount int64 `json:"descendant_stay_active_count"` // 下级保持活跃次数
|
||||
DescendantStayActiveAmount float64 `json:"descendant_stay_active_amount"` // 下级保持活跃总额
|
||||
DescendantNewActiveCount int64 `json:"descendant_new_active_count"` // 下级新增活跃次数
|
||||
DescendantNewActiveAmount float64 `json:"descendant_new_active_amount"` // 下级新增活跃总额
|
||||
DescendantWithdrawCount int64 `json:"descendant_withdraw_count"` // 下级提现次数
|
||||
DescendantWithdrawAmount float64 `json:"descendant_withdraw_amount"` // 下级提现总额
|
||||
}
|
||||
|
||||
AgentRealNameReq {
|
||||
Name string `json:"name"`
|
||||
Name string `json:"name"`
|
||||
IDCard string `json:"id_card"`
|
||||
Mobile string `json:"mobile"`
|
||||
Code string `json:"code"`
|
||||
Code string `json:"code"`
|
||||
}
|
||||
AgentRealNameResp {
|
||||
Status string `json:"status"`
|
||||
@@ -189,11 +219,10 @@ type (
|
||||
)
|
||||
|
||||
@server (
|
||||
prefix: api/v1/agent
|
||||
group: agent
|
||||
jwt: JwtAuth
|
||||
prefix: api/v1/agent
|
||||
group: agent
|
||||
jwt: JwtAuth
|
||||
middleware: UserAuthInterceptor
|
||||
|
||||
)
|
||||
service main {
|
||||
@handler GetAgentMembershipProductConfig
|
||||
@@ -226,11 +255,10 @@ type (
|
||||
)
|
||||
|
||||
@server (
|
||||
prefix: api/v1/agent
|
||||
group: agent
|
||||
jwt: JwtAuth
|
||||
prefix: api/v1/agent
|
||||
group: agent
|
||||
jwt: JwtAuth
|
||||
middleware: UserAuthInterceptor
|
||||
|
||||
)
|
||||
service main {
|
||||
@handler GetAgentCommission
|
||||
@@ -340,17 +368,15 @@ type (
|
||||
Status int64 `json:"status"` // 1申请中 2成功 3失败
|
||||
failMsg string `json:"fail_msg"`
|
||||
}
|
||||
|
||||
// 开通代理会员请求参数
|
||||
AgentActivateMembershipReq {
|
||||
Type string `json:"type,oneof=VIP SVIP"` // 会员类型:vip/svip
|
||||
Type string `json:"type,oneof=VIP SVIP"` // 会员类型:vip/svip
|
||||
}
|
||||
// 开通代理会员响应
|
||||
AgentActivateMembershipResp {
|
||||
Id string `json:"id"`
|
||||
}
|
||||
GetWithdrawalTaxExemptionReq {
|
||||
Id string `json:"id"`
|
||||
}
|
||||
GetWithdrawalTaxExemptionReq {}
|
||||
GetWithdrawalTaxExemptionResp {
|
||||
TotalExemptionAmount float64 `json:"total_exemption_amount"`
|
||||
UsedExemptionAmount float64 `json:"used_exemption_amount"`
|
||||
@@ -360,10 +386,9 @@ type (
|
||||
)
|
||||
|
||||
@server (
|
||||
prefix: api/v1/agent
|
||||
group: agent
|
||||
prefix: api/v1/agent
|
||||
group: agent
|
||||
middleware: AuthInterceptor
|
||||
|
||||
)
|
||||
service main {
|
||||
// 提交代理申请
|
||||
@@ -373,7 +398,6 @@ service main {
|
||||
// 获取推广标识数据
|
||||
@handler GetLinkData
|
||||
get /link (GetLinkDataReq) returns (GetLinkDataResp)
|
||||
|
||||
}
|
||||
|
||||
type (
|
||||
@@ -384,7 +408,7 @@ type (
|
||||
Code string `json:"code"`
|
||||
Ancestor string `json:"ancestor,optional"`
|
||||
}
|
||||
AgentApplyResp{
|
||||
AgentApplyResp {
|
||||
AccessToken string `json:"accessToken"`
|
||||
AccessExpire int64 `json:"accessExpire"`
|
||||
RefreshAfter int64 `json:"refreshAfter"`
|
||||
|
||||
Reference in New Issue
Block a user