v2.0
This commit is contained in:
@@ -57,7 +57,7 @@ service main {
|
||||
// 获取推广定价配置
|
||||
@handler GetAgentProductConfig
|
||||
get /product_config returns (AgentProductConfigResp)
|
||||
|
||||
|
||||
// 获取下级分页列表
|
||||
@handler GetAgentSubordinateList
|
||||
get /subordinate/list (GetAgentSubordinateListReq) returns (GetAgentSubordinateListResp)
|
||||
@@ -76,6 +76,7 @@ type (
|
||||
region string `json:"region"`
|
||||
mobile string `json:"mobile"`
|
||||
wechatID string `json:"wechat_id"`
|
||||
expiryTime string `json:"expiry_time"`
|
||||
}
|
||||
// 查询代理申请状态响应
|
||||
AgentAuditStatusResp {
|
||||
@@ -92,7 +93,6 @@ type (
|
||||
AgentProductConfigResp {
|
||||
AgentProductConfig []AgentProductConfig
|
||||
}
|
||||
|
||||
GetAgentSubordinateListReq {
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"page_size"` // 每页数据量
|
||||
@@ -207,6 +207,9 @@ service main {
|
||||
|
||||
@handler AgentWithdrawal
|
||||
post /withdrawal (WithdrawalReq) returns (WithdrawalResp)
|
||||
|
||||
@handler ActivateAgentMembership
|
||||
post /membership/activate (AgentActivateMembershipReq) returns (AgentActivateMembershipResp)
|
||||
}
|
||||
|
||||
type (
|
||||
@@ -297,6 +300,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 (
|
||||
@@ -312,8 +324,6 @@ service main {
|
||||
@handler GetLinkData
|
||||
get /link (GetLinkDataReq) returns (GetLinkDataResp)
|
||||
|
||||
@handler ActivateAgentMembership
|
||||
post /membership/activate (AgentActivateMembershipReq) returns (AgentActivateMembershipResp)
|
||||
}
|
||||
|
||||
type (
|
||||
@@ -336,18 +346,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"` // 到期时间
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -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"`
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -102,11 +102,13 @@ service main {
|
||||
@handler queryDetailByOrderNo
|
||||
get /query/orderNo/:order_no (QueryDetailByOrderNoReq) returns (QueryDetailByOrderNoResp)
|
||||
|
||||
|
||||
|
||||
@doc "重试查询"
|
||||
@handler queryRetry
|
||||
post /query/retry/:id (QueryRetryReq) returns (QueryRetryResp)
|
||||
|
||||
@doc "更新查询数据"
|
||||
@handler updateQueryData
|
||||
post /query/update_data (UpdateQueryDataReq) returns (UpdateQueryDataResp)
|
||||
}
|
||||
|
||||
// 获取查询临时订单
|
||||
@@ -178,6 +180,18 @@ type (
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
type (
|
||||
UpdateQueryDataReq {
|
||||
Id int64 `json:"id"` // 查询ID
|
||||
QueryData string `json:"query_data"` // 查询数据(未加密的JSON)
|
||||
}
|
||||
UpdateQueryDataResp {
|
||||
Id int64 `json:"id"`
|
||||
UpdatedAt string `json:"updated_at"` // 更新时间
|
||||
}
|
||||
)
|
||||
|
||||
@server (
|
||||
prefix: api/v1
|
||||
group: query
|
||||
@@ -190,9 +204,6 @@ service main {
|
||||
@handler queryDetail
|
||||
get /query/:id (QueryDetailReq) returns (QueryDetailResp)
|
||||
|
||||
@doc "更新查询数据"
|
||||
@handler updateQueryData
|
||||
post /query/update_data (UpdateQueryDataReq) returns (UpdateQueryDataResp)
|
||||
}
|
||||
|
||||
type QuerySingleTestReq {
|
||||
@@ -205,13 +216,3 @@ type QuerySingleTestResp {
|
||||
Api string `json:"api"`
|
||||
}
|
||||
|
||||
type (
|
||||
UpdateQueryDataReq {
|
||||
Id int64 `json:"id"` // 查询ID
|
||||
QueryData string `json:"query_data"` // 查询数据(未加密的JSON)
|
||||
}
|
||||
UpdateQueryDataResp {
|
||||
Id int64 `json:"id"`
|
||||
UpdatedAt string `json:"updated_at"` // 更新时间
|
||||
}
|
||||
)
|
||||
@@ -125,12 +125,23 @@ service main {
|
||||
|
||||
@handler cancelOut
|
||||
post /user/cancelOut
|
||||
|
||||
@doc "绑定手机号"
|
||||
@handler bindMobile
|
||||
post /user/bindMobile (BindMobileReq) returns (BindMobileResp)
|
||||
}
|
||||
|
||||
type (
|
||||
UserInfoResp {
|
||||
UserInfo User `json:"userInfo"`
|
||||
}
|
||||
|
||||
BindMobileReq {
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
}
|
||||
BindMobileResp {
|
||||
}
|
||||
)
|
||||
|
||||
//============================> auth v1 <============================
|
||||
@@ -147,7 +158,7 @@ service main {
|
||||
type (
|
||||
sendSmsReq {
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
ActionType string `json:"actionType" validate:"required,oneof=login register query agentApply"`
|
||||
ActionType string `json:"actionType" validate:"required,oneof=login register query agentApply bindMobile"`
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user