fix: int64 ID 字段序列化为 JSON string

This commit is contained in:
zetaloop
2026-05-03 05:54:48 +08:00
parent 83fa982749
commit cf639f1bca
22 changed files with 86 additions and 82 deletions
+9 -9
View File
@@ -14,9 +14,9 @@ type (
Id int64 `path:"id"`
}
PlayerService {
Id int64 `json:"id"`
PlayerId int64 `json:"playerId"`
GameId int64 `json:"gameId"`
Id int64 `json:"id,string"`
PlayerId int64 `json:"playerId,string"`
GameId int64 `json:"gameId,string"`
GameName string `json:"gameName"`
Title string `json:"title"`
Description string `json:"description"`
@@ -26,10 +26,10 @@ type (
Availability []string `json:"availability"`
}
Order {
Id int64 `json:"id"`
ConsumerId int64 `json:"consumerId"`
Id int64 `json:"id,string"`
ConsumerId int64 `json:"consumerId,string"`
PlayerId string `json:"playerId"`
ShopId int64 `json:"shopId,optional"`
ShopId int64 `json:"shopId,string,optional"`
Service PlayerService `json:"service"`
Status string `json:"status"`
TotalPrice float64 `json:"totalPrice"`
@@ -48,9 +48,9 @@ type (
Meta PageMeta `json:"meta"`
}
CreateOrderReq {
PlayerId int64 `json:"playerId"`
ShopId int64 `json:"shopId,optional"`
ServiceId int64 `json:"serviceId"`
PlayerId int64 `json:"playerId,string"`
ShopId int64 `json:"shopId,string,optional"`
ServiceId int64 `json:"serviceId,string"`
Quantity int `json:"quantity"`
Note string `json:"note,optional"`
}