fix: api descript

This commit is contained in:
wwweww
2026-02-28 05:33:16 +08:00
parent 5930fb0dde
commit d2f33b4b96
243 changed files with 37065 additions and 780 deletions
+16 -14
View File
@@ -3,13 +3,16 @@ import "common.api"
import "player.api" // 为了使用 PlayerService 定义
type (
PathId {
Id int64 `path:"id"`
}
Order {
Id string `json:"id"`
ConsumerId string `json:"consumerId"`
Id int64 `json:"id"`
ConsumerId int64 `json:"consumerId"`
ConsumerName string `json:"consumerName"`
PlayerId string `json:"playerId"`
PlayerName string `json:"playerName"`
ShopId string `json:"shopId,optional"`
ShopId int64 `json:"shopId,optional"`
ShopName string `json:"shopName,optional"`
Service PlayerService `json:"service"`
Status string `json:"status"`
@@ -32,9 +35,9 @@ type (
}
CreateOrderReq {
PlayerId string `json:"playerId"`
ShopId string `json:"shopId,optional"`
ServiceId string `json:"serviceId"`
PlayerId int64 `json:"playerId"`
ShopId int64 `json:"shopId,optional"`
ServiceId int64 `json:"serviceId"`
Quantity int `json:"quantity"`
Note string `json:"note,optional"`
}
@@ -48,7 +51,6 @@ type (
@server(
prefix: api/v1/orders
group: order
jwt: Auth
)
service juwan-api {
@doc "获取订单列表"
@@ -57,7 +59,7 @@ service juwan-api {
@doc "获取订单详情"
@handler GetOrder
get /:id (EmptyResp) returns (Order)
get /:id (PathId) returns (Order)
@doc "创建订单"
@handler CreateOrder
@@ -69,25 +71,25 @@ service juwan-api {
@doc "支付订单"
@handler PayOrder
post /:id/pay (EmptyResp) returns (EmptyResp)
post /:id/pay (PathId) returns (EmptyResp)
@doc "接单"
@handler AcceptOrder
post /:id/accept (EmptyResp) returns (EmptyResp)
post /:id/accept (PathId) returns (EmptyResp)
@doc "申请结算"
@handler RequestCloseOrder
post /:id/request-close (EmptyResp) returns (EmptyResp)
post /:id/request-close (PathId) returns (EmptyResp)
@doc "确认结算"
@handler ConfirmCloseOrder
post /:id/confirm-close (EmptyResp) returns (EmptyResp)
post /:id/confirm-close (PathId) returns (EmptyResp)
@doc "取消订单"
@handler CancelOrder
post /:id/cancel (EmptyResp) returns (EmptyResp)
post /:id/cancel (PathId) returns (EmptyResp)
@doc "再来一单"
@handler Reorder
post /:id/reorder (EmptyResp) returns (CreateOrderResp)
post /:id/reorder (PathId) returns (CreateOrderResp)
}