新增代理实名认证和授权

This commit is contained in:
2025-05-24 14:26:20 +08:00
parent 16e57387db
commit 2d3ca4c18e
54 changed files with 4069 additions and 435 deletions

View File

@@ -65,6 +65,9 @@ service main {
// 下级贡献详情
@handler GetAgentSubordinateContributionDetail
get /subordinate/contribution/detail (GetAgentSubordinateContributionDetailReq) returns (GetAgentSubordinateContributionDetailResp)
@handler AgentRealName
post /real_name (AgentRealNameReq) returns (AgentRealNameResp)
}
type (
@@ -75,8 +78,8 @@ type (
level string `json:"level"`
region string `json:"region"`
mobile string `json:"mobile"`
wechatID string `json:"wechat_id"`
expiryTime string `json:"expiry_time"`
isRealName bool `json:"is_real_name"`
}
// 查询代理申请状态响应
AgentAuditStatusResp {
@@ -150,6 +153,15 @@ type (
DescendantWithdrawCount int64 `json:"descendant_withdraw_count"` // 下级提现次数
DescendantWithdrawAmount float64 `json:"descendant_withdraw_amount"` // 下级提现总额
}
AgentRealNameReq {
Name string `json:"name"`
IDCard string `json:"id_card"`
Mobile string `json:"mobile"`
Code string `json:"code"`
}
AgentRealNameResp {
Status string `json:"status"`
}
)
@server (
@@ -331,7 +343,6 @@ type (
AgentApplyReq {
Region string `json:"region"`
Mobile string `json:"mobile"`
WechatID string `json:"wechat_id"`
Code string `json:"code"`
Ancestor string `json:"ancestor,optional"`
}

View File

@@ -42,6 +42,9 @@ service main {
@handler PaymentCheck
post /pay/check (PaymentCheckReq) returns (PaymentCheckResp)
@handler QueryPaymentCheck
post /pay/query_check (QueryPaymentCheckReq) returns (QueryPaymentCheckResp)
}
type (
@@ -62,6 +65,16 @@ type (
Type string `json:"type"`
Status string `json:"status"`
}
QueryPaymentCheckReq {
OrderNo string `json:"order_no" validate:"required"`
}
QueryPaymentCheckResp {
OrderStatus string `json:"order_status"`
AuthorizationStatus string `json:"authorization_status"`
Name string `json:"name"`
IdCard string `json:"id_card"`
ProductName string `json:"product_name"`
}
)
type (

View File

@@ -20,6 +20,9 @@ type Query {
CreateTime string `json:"create_time"` // 创建时间
UpdateTime string `json:"update_time"` // 更新时间
QueryState string `json:"query_state"` // 查询状态
IsPaid bool `json:"is_paid"` // 是否支付
IsQueryCompleted bool `json:"is_query_completed"` // 查询是否完成
IsAuthCompleted bool `json:"is_auth_completed"` // 授权是否完成
}
@@ -107,6 +110,10 @@ service main {
@doc "更新查询数据"
@handler updateQueryData
post /query/update_data (UpdateQueryDataReq) returns (UpdateQueryDataResp)
@doc "确认查询状态"
@handler confirmQueryState
post /query/confirm_state (ConfirmQueryStateReq) returns (ConfirmQueryStateResp)
}
// 获取查询临时订单
@@ -218,3 +225,14 @@ type QuerySingleTestResp {
Api string `json:"api"`
}
// 新增接口的请求、响应类型定义
type (
ConfirmQueryStateReq {
OrderID int64 `json:"order_id" validate:"required"`
}
ConfirmQueryStateResp {
OrderState string `json:"order_state"` // 查询状态,例如"pending"、"success"、"failed"等
QueryState string `json:"query_state"`
}
)

View File

@@ -146,22 +146,63 @@ type (
//============================> auth v1 <============================
@server (
prefix: api/v1
prefix: api/v1/auth
group: auth
)
service main {
@doc "get mobile verify code"
@handler sendSms
post /auth/sendSms (sendSmsReq)
post /sendSms (sendSmsReq)
@doc "发起人脸认证"
@handler initFaceVerify
post /face/init (InitFaceVerifyReq) returns (InitFaceVerifyResp)
@doc "查询人脸认证结果"
@handler getFaceVerifyResult
post /face/result (GetFaceVerifyResultReq) returns (GetFaceVerifyResultResp)
@doc "第三方拒绝授权"
@handler rejectAuthorization
post /rejectAuthorization (RejectAuthorizationReq) returns (RejectAuthorizationResp)
}
type (
sendSmsReq {
Mobile string `json:"mobile" validate:"required,mobile"`
ActionType string `json:"actionType" validate:"required,oneof=login register query agentApply bindMobile"`
ActionType string `json:"actionType" validate:"required,oneof=login register query agentApply bindMobile realName"`
}
// 发起人脸认证请求
InitFaceVerifyReq {
MetaInfo string `json:"meta_info" validate:"required"` // H5端获取的MetaInfoJSON格式
OrderNo string `json:"order_no" validate:"required"` // 订单号
AuthType int64 `json:"auth_type" validate:"required"` // 认证类型
}
// 发起人脸认证响应
InitFaceVerifyResp {
CertifyId string `json:"certify_id"` // 认证ID
CertifyUrl string `json:"certify_url"` // 跳转认证页面URL
}
// 查询人脸认证结果请求
GetFaceVerifyResultReq {
CertifyId string `json:"certify_id" validate:"required"` // 认证ID
}
// 查询人脸认证结果响应
GetFaceVerifyResultResp {
Passed bool `json:"passed"` // 是否通过
OrderID int64 `json:"order_id"`
AuthType int64 `json:"auth_type"`
}
RejectAuthorizationReq {
OrderNo string `json:"order_no" validate:"required"` // 订单号
}
RejectAuthorizationResp {
}
)
//============================> notification v1 <============================
@server (
prefix: api/v1