This commit is contained in:
2025-04-09 15:58:06 +08:00
parent 1d46f6a9a2
commit f6a38a1246
118 changed files with 816 additions and 3620 deletions

View File

@@ -1,31 +0,0 @@
syntax = "v1"
info (
title: "代理服务"
desc: "代理服务接口"
author: "Liangzai"
email: "2440983361@qq.com"
version: "v1"
)
import (
"agent/agent.api"
)
@server (
prefix: api/v1/agent
group: agent
)
service main {
@handler GetAgentInfo
get /info returns (AgentInfoResp)
// 提交代理申请
@handler ApplyForAgent
post /apply (AgentApplyReq) returns (AgentApplyResp)
// 查询代理申请状态
@handler GetAgentAuditStatus
get /audit/status (AgentAuditStatusReq) returns (AgentAuditStatusResp)
}

View File

@@ -1,41 +0,0 @@
syntax = "v1"
info (
title: "代理服务"
desc: "代理服务接口"
author: "Liangzai"
email: "2440983361@qq.com"
version: "v1"
)
type (
AgentInfoResp {
isAgent bool `json:"is_agent"`
region string `json:"region"`
mobile string `json:"mobile"`
wechatID string `json:"wechat_id"`
}
// 代理申请请求参数
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"`
}
)

View File

@@ -12,4 +12,3 @@ import "user.api"
import "query.api"
import "pay.api"
import "product.api"
import "agent.api"