feat(main): add agent
This commit is contained in:
29
app/user/cmd/api/desc/agent.api
Normal file
29
app/user/cmd/api/desc/agent.api
Normal file
@@ -0,0 +1,29 @@
|
||||
syntax = "v1"
|
||||
|
||||
info (
|
||||
title: "代理服务"
|
||||
desc: "代理服务接口"
|
||||
author: "Liangzai"
|
||||
email: "2440983361@qq.com"
|
||||
version: "v1"
|
||||
)
|
||||
|
||||
import (
|
||||
"agent/agent.api"
|
||||
)
|
||||
|
||||
@server (
|
||||
prefix: api/v1
|
||||
group: agent
|
||||
)
|
||||
|
||||
service main {
|
||||
// 提交代理申请
|
||||
@handler ApplyForAgent
|
||||
post /agent/apply (AgentApplyReq) returns (AgentApplyResp)
|
||||
|
||||
// 查询代理申请状态
|
||||
@handler GetAgentAuditStatus
|
||||
get /agent/audit/status (AgentAuditStatusReq) returns (AgentAuditStatusResp)
|
||||
}
|
||||
|
||||
34
app/user/cmd/api/desc/agent/agent.api
Normal file
34
app/user/cmd/api/desc/agent/agent.api
Normal file
@@ -0,0 +1,34 @@
|
||||
syntax = "v1"
|
||||
|
||||
info (
|
||||
title: "代理服务"
|
||||
desc: "代理服务接口"
|
||||
author: "Liangzai"
|
||||
email: "2440983361@qq.com"
|
||||
version: "v1"
|
||||
)
|
||||
|
||||
type (
|
||||
// 代理申请请求参数
|
||||
AgentApplyReq {
|
||||
UserID int64 `json:"user_id"`
|
||||
Region string `json:"region"`
|
||||
Mobile string `json:"mobile"`
|
||||
WechatID string `json:"wechat_id"`
|
||||
}
|
||||
// 代理申请响应
|
||||
AgentApplyResp {
|
||||
Status string `json:"status"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
// 查询代理申请状态请求参数
|
||||
AgentAuditStatusReq {
|
||||
UserID int64 `json:"user_id"`
|
||||
}
|
||||
// 查询代理申请状态响应
|
||||
AgentAuditStatusResp {
|
||||
Status int `json:"status"` // 0=待审核,1=审核通过,2=审核未通过
|
||||
AuditReason string `json:"audit_reason"`
|
||||
}
|
||||
)
|
||||
|
||||
@@ -12,3 +12,4 @@ import "user.api"
|
||||
import "query.api"
|
||||
import "pay.api"
|
||||
import "product.api"
|
||||
import "agent.api"
|
||||
|
||||
@@ -14,14 +14,14 @@ type (
|
||||
}
|
||||
PaymentResp {
|
||||
prepayData interface{} `json:"prepay_data"`
|
||||
prepayId string `json:"prepay_id"`
|
||||
OrderID int64 `json:"order_id"`
|
||||
prepayId string `json:"prepay_id"`
|
||||
OrderID int64 `json:"order_id"`
|
||||
}
|
||||
)
|
||||
|
||||
type (
|
||||
IapCallbackReq {
|
||||
OrderID int64 `json:"order_id" validate:"required"`
|
||||
OrderID int64 `json:"order_id" validate:"required"`
|
||||
TransactionReceipt string `json:"transaction_receipt" validate:"required"`
|
||||
}
|
||||
)
|
||||
|
||||
@@ -22,40 +22,6 @@ service main {
|
||||
@doc "query service"
|
||||
@handler queryService
|
||||
post /query/service/:product (QueryServiceReq) returns (QueryServiceResp)
|
||||
|
||||
@doc "query marriage"
|
||||
@handler marriage
|
||||
post /query/marriage (QueryReq) returns (QueryResp)
|
||||
|
||||
// 家政服务查询
|
||||
@doc "query home service"
|
||||
@handler homeService
|
||||
post /query/homeService (QueryReq) returns (QueryResp)
|
||||
|
||||
// 风险评估查询
|
||||
@doc "query risk assessment"
|
||||
@handler riskAssessment
|
||||
post /query/riskAssessment (QueryReq) returns (QueryResp)
|
||||
|
||||
// 企业信息查询
|
||||
@doc "query company info"
|
||||
@handler companyInfo
|
||||
post /query/companyInfo (QueryReq) returns (QueryResp)
|
||||
|
||||
// 租赁信息查询
|
||||
@doc "query rental info"
|
||||
@handler rentalInfo
|
||||
post /query/rentalInfo (QueryReq) returns (QueryResp)
|
||||
|
||||
// 贷前背景调查
|
||||
@doc "query pre-loan background check"
|
||||
@handler preLoanBackgroundCheck
|
||||
post /query/preLoanBackgroundCheck (QueryReq) returns (QueryResp)
|
||||
|
||||
// 一般背景调查
|
||||
@doc "query general background check"
|
||||
@handler backgroundCheck
|
||||
post /query/backgroundCheck (QueryReq) returns (QueryResp)
|
||||
}
|
||||
|
||||
@server (
|
||||
|
||||
Reference in New Issue
Block a user