add agent vip activateagent

This commit is contained in:
2025-04-15 22:52:02 +08:00
parent 7cfc77da6d
commit 214e087197
28 changed files with 633 additions and 792 deletions

View File

@@ -141,6 +141,9 @@ service main {
@handler AgentWithdrawal
post /withdrawal (WithdrawalReq) returns (WithdrawalResp)
@handler ActivateAgentMembership
post /membership/activate (AgentActivateMembershipReq) returns (AgentActivateMembershipResp)
}
type (
@@ -231,6 +234,15 @@ type (
Status int64 `json:"status"` // 1申请中 2成功 3失败
failMsg string `json:"fail_msg"`
}
// 开通代理会员请求参数
AgentActivateMembershipReq {
Type string `json:"type,oneof=VIP SVIP"` // 会员类型vip/svip
}
// 开通代理会员响应
AgentActivateMembershipResp {
Id string `json:"id"`
}
)
@server (
@@ -246,8 +258,6 @@ service main {
@handler GetLinkData
get /link (GetLinkDataReq) returns (GetLinkDataResp)
@handler ActivateAgentMembership
post /membership/activate (AgentActivateMembershipReq) returns (AgentActivateMembershipResp)
}
type (
@@ -270,18 +280,5 @@ type (
GetLinkDataResp {
Product
}
// 开通代理会员请求参数
AgentActivateMembershipReq {
Mobile string `json:"mobile"`
Type string `json:"type,oneof=VIP SVIP"` // 会员类型vip/svip
Amount float64 `json:"amount"`
PaymentMethod string `json:"payment_method"`
TransactionId string `json:"transaction_id"`
}
// 开通代理会员响应
AgentActivateMembershipResp {
MembershipType string `json:"membership_type"` // 最终开通的会员类型
ExpireTime string `json:"expire_time"` // 到期时间
}
)

View File

@@ -39,17 +39,28 @@ service main {
@handler IapCallback
post /pay/iap_callback (IapCallbackReq)
@handler PaymentCheck
post /pay/check (PaymentCheckReq) returns (PaymentCheckResp)
}
type (
PaymentReq {
Id string `json:"id"`
PayMethod string `json:"pay_method"`
PayType string `json:"pay_type" validate:"required,oneof=query agent_vip"`
}
PaymentResp {
PrepayData interface{} `json:"prepay_data"`
PrepayId string `json:"prepay_id"`
OrderID int64 `json:"order_id"`
OrderNo string `json:"order_no"`
}
PaymentCheckReq {
OrderNo string `json:"order_no" validate:"required"`
}
PaymentCheckResp {
Type string `json:"type"`
Status string `json:"status"`
}
)