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
@@ -4,9 +4,9 @@
package types
type CreateOrderReq struct {
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"`
}
@@ -20,10 +20,10 @@ type EmptyResp struct {
}
type Order struct {
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"`
@@ -60,9 +60,9 @@ type PathId struct {
}
type PlayerService struct {
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"`