type ( // GetAuthorizationDocumentReq 获取授权书请求 GetAuthorizationDocumentReq { DocumentId int64 `json:"documentId" validate:"required"` // 授权书ID } // GetAuthorizationDocumentResp 获取授权书响应 GetAuthorizationDocumentResp { DocumentId int64 `json:"documentId"` // 授权书ID UserId int64 `json:"userId"` // 用户ID OrderId int64 `json:"orderId"` // 订单ID QueryId int64 `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"` // 创建时间 } // GetAuthorizationDocumentByOrderReq 根据订单ID获取授权书请求 GetAuthorizationDocumentByOrderReq { OrderId int64 `json:"orderId" validate:"required"` // 订单ID } // GetAuthorizationDocumentByOrderResp 根据订单ID获取授权书响应 GetAuthorizationDocumentByOrderResp { Documents []AuthorizationDocumentInfo `json:"documents"` // 授权书列表 } // AuthorizationDocumentInfo 授权书信息 AuthorizationDocumentInfo { DocumentId int64 `json:"documentId"` // 授权书ID UserId int64 `json:"userId"` // 用户ID OrderId int64 `json:"orderId"` // 订单ID QueryId int64 `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"` // 创建时间 } // DownloadAuthorizationDocumentReq 下载授权书请求 DownloadAuthorizationDocumentReq { DocumentId int64 `json:"documentId" validate:"required"` // 授权书ID } // DownloadAuthorizationDocumentResp 下载授权书响应 DownloadAuthorizationDocumentResp { FileName string `json:"fileName"` // 文件名 FileUrl string `json:"fileUrl"` // 文件访问URL } ) // 授权书相关接口 @server ( prefix: api/v1 group: authorization ) service main { // 获取授权书信息 @handler GetAuthorizationDocument get /authorization/document/:documentId (GetAuthorizationDocumentReq) returns (GetAuthorizationDocumentResp) // 根据订单ID获取授权书列表 @handler GetAuthorizationDocumentByOrder get /authorization/document/order/:orderId (GetAuthorizationDocumentByOrderReq) returns (GetAuthorizationDocumentByOrderResp) // 下载授权书文件 @handler DownloadAuthorizationDocument get /authorization/download/:documentId (DownloadAuthorizationDocumentReq) returns (DownloadAuthorizationDocumentResp) }