diff --git a/doc/api/nova.api b/doc/api/nova.api index 7cfcf38..72d8e22 100644 --- a/doc/api/nova.api +++ b/doc/api/nova.api @@ -7,10 +7,3 @@ import "game7.api" import "kgen.api" import "stakepoint.api" import "transfercastile.api" - -info ( - desc: "nova api" - author: "jager" - email: "lhj168os@gmail.com" -) - diff --git a/doc/api/transfercastile.api b/doc/api/transfercastile.api index d1ff4cb..7359b3c 100644 --- a/doc/api/transfercastile.api +++ b/doc/api/transfercastile.api @@ -26,8 +26,8 @@ type TransferCastileToGameReq { type TransferCastileToGameListReq { RoleID int64 `json:"role_id,optional"` // 角色id - Page int `form:"page,range=[1:],optional,default=1"` // 页码 - Size int `form:"size,range=[10:100],optional,default=10"` // 每页数量 + Page int `json:"page,range=[1:],optional,default=1"` // 页码 + Size int `json:"size,range=[10:100],optional,default=10"` // 每页数量 } type TransferCastileToGameResp { @@ -44,8 +44,8 @@ type TransferCastileToGameListResp { } type UserCastileBalanceResp { - TotalCastile int `json:total_castile` //总数 - TransferAmount int `json:transfer_amount` //已转回游戏内的数量 - TotalBalance int `json:total_balance` //castile当前余额 + TotalCastile int `json:"total_castile"` //总数 + TransferAmount int `json:"transfer_amount"` //已转回游戏内的数量 + TotalBalance int `json:"total_balance"` //castile当前余额 } diff --git a/doc/swagger/nova.json b/doc/swagger/nova.json index 33bad16..4a82c0a 100644 --- a/doc/swagger/nova.json +++ b/doc/swagger/nova.json @@ -2,7 +2,6 @@ "swagger": "2.0", "info": { "title": "", - "description": "nova api", "version": "" }, "schemes": [ @@ -895,6 +894,28 @@ ] } }, + "/gapi/transfercastile/v1/getBalance": { + "post": { + "summary": "查询castile代币余额", + "operationId": "GetCastileBalance", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/UserCastileBalanceResp" + } + } + }, + "tags": [ + "transfercastile" + ], + "security": [ + { + "apiKey": [] + } + ] + } + }, "/gapi/transfercastile/v1/list": { "post": { "summary": "获取提取castile到游戏的记录", @@ -920,9 +941,6 @@ "tags": [ "transfercastile" ], - "consumes": [ - "multipart/form-data" - ], "security": [ { "apiKey": [] @@ -2068,6 +2086,32 @@ "email" ] }, + "UserCastileBalanceResp": { + "type": "object", + "properties": { + "total_castile": { + "type": "integer", + "format": "int32", + "description": "总数" + }, + "transfer_amount": { + "type": "integer", + "format": "int32", + "description": "已转回游戏内的数量" + }, + "total_balance": { + "type": "integer", + "format": "int32", + "description": "castile当前余额" + } + }, + "title": "UserCastileBalanceResp", + "required": [ + "total_castile", + "transfer_amount", + "total_balance" + ] + }, "UserNft": { "type": "object", "properties": { diff --git a/internal/types/types.go b/internal/types/types.go index bc91bf1..7c72964 100644 --- a/internal/types/types.go +++ b/internal/types/types.go @@ -242,8 +242,8 @@ type Task struct { type TransferCastileToGameListReq struct { RoleID int64 `json:"role_id,optional"` // 角色id - Page int `form:"page,range=[1:],optional,default=1"` // 页码 - Size int `form:"size,range=[10:100],optional,default=10"` // 每页数量 + Page int `json:"page,range=[1:],optional,default=1"` // 页码 + Size int `json:"size,range=[10:100],optional,default=10"` // 每页数量 } type TransferCastileToGameListResp struct { @@ -277,9 +277,9 @@ type UnlockChapterReq struct { } type UserCastileBalanceResp struct { - TotalCastile int `json:total_castile` //总数 - TransferAmount int `json:transfer_amount` //已转回游戏内的数量 - TotalBalance int `json:total_balance` //castile当前余额 + TotalCastile int `json:"total_castile"` //总数 + TransferAmount int `json:"transfer_amount"` //已转回游戏内的数量 + TotalBalance int `json:"total_balance"` //castile当前余额 } type UserNft struct {