Files
ycc-proxy-server/app/main/api/desc/front/authorization.api

70 lines
2.7 KiB
Plaintext
Raw Normal View History

2025-11-27 13:09:54 +08:00
type (
// GetAuthorizationDocumentReq 获取授权书请求
GetAuthorizationDocumentReq {
2025-12-09 18:55:28 +08:00
DocumentId string `json:"documentId" validate:"required"` // 授权书ID
2025-11-27 13:09:54 +08:00
}
// GetAuthorizationDocumentResp 获取授权书响应
GetAuthorizationDocumentResp {
2025-12-09 18:55:28 +08:00
DocumentId string `json:"documentId"` // 授权书ID
UserId string `json:"userId"` // 用户ID
OrderId string `json:"orderId"` // 订单ID
QueryId string `json:"queryId"` // 查询ID
FileName string `json:"fileName"` // 文件名
FileUrl string `json:"fileUrl"` // 文件访问URL
FileSize int64 `json:"fileSize"` // 文件大小
FileType string `json:"fileType"` // 文件类型
Status string `json:"status"` // 状态
CreateTime string `json:"createTime"` // 创建时间
2025-11-27 13:09:54 +08:00
}
// GetAuthorizationDocumentByOrderReq 根据订单ID获取授权书请求
GetAuthorizationDocumentByOrderReq {
2025-12-09 18:55:28 +08:00
OrderId string `json:"orderId" validate:"required"` // 订单ID
2025-11-27 13:09:54 +08:00
}
// GetAuthorizationDocumentByOrderResp 根据订单ID获取授权书响应
GetAuthorizationDocumentByOrderResp {
Documents []AuthorizationDocumentInfo `json:"documents"` // 授权书列表
}
// AuthorizationDocumentInfo 授权书信息
AuthorizationDocumentInfo {
2025-12-09 18:55:28 +08:00
DocumentId string `json:"documentId"` // 授权书ID
UserId string `json:"userId"` // 用户ID
OrderId string `json:"orderId"` // 订单ID
QueryId string `json:"queryId"` // 查询ID
FileName string `json:"fileName"` // 文件名
FileUrl string `json:"fileUrl"` // 文件访问URL
FileSize int64 `json:"fileSize"` // 文件大小
FileType string `json:"fileType"` // 文件类型
Status string `json:"status"` // 状态
CreateTime string `json:"createTime"` // 创建时间
2025-11-27 13:09:54 +08:00
}
// DownloadAuthorizationDocumentReq 下载授权书请求
DownloadAuthorizationDocumentReq {
2025-12-09 18:55:28 +08:00
DocumentId string `json:"documentId" validate:"required"` // 授权书ID
2025-11-27 13:09:54 +08:00
}
// DownloadAuthorizationDocumentResp 下载授权书响应
DownloadAuthorizationDocumentResp {
FileName string `json:"fileName"` // 文件名
2025-12-09 18:55:28 +08:00
FileUrl string `json:"fileUrl"` // 文件访问URL
2025-11-27 13:09:54 +08:00
}
)
// 授权书相关接口
@server (
prefix: api/v1
group: authorization
)
service main {
// 获取授权书信息
@handler GetAuthorizationDocument
get /authorization/document/:documentId (GetAuthorizationDocumentReq) returns (GetAuthorizationDocumentResp)
2025-12-09 18:55:28 +08:00
2025-11-27 13:09:54 +08:00
// 根据订单ID获取授权书列表
@handler GetAuthorizationDocumentByOrder
get /authorization/document/order/:orderId (GetAuthorizationDocumentByOrderReq) returns (GetAuthorizationDocumentByOrderResp)
2025-12-09 18:55:28 +08:00
2025-11-27 13:09:54 +08:00
// 下载授权书文件
@handler DownloadAuthorizationDocument
get /authorization/download/:documentId (DownloadAuthorizationDocumentReq) returns (DownloadAuthorizationDocumentResp)
}
2025-12-09 18:55:28 +08:00