From 5acaf1028b000a24623ecc23a26a45a928cf1ee0 Mon Sep 17 00:00:00 2001 From: xiabin Date: Thu, 23 Jan 2025 19:33:57 +0800 Subject: [PATCH] =?UTF-8?q?fix=20type=E5=8F=82=E6=95=B0=E6=8E=A5=E6=94=B6?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game_open_api/game.api | 4 ++-- game_open_api/internal/logic/game/ranking_set_score_logic.go | 1 + game_open_api/internal/types/types.go | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/game_open_api/game.api b/game_open_api/game.api index 2c10395..1868092 100644 --- a/game_open_api/game.api +++ b/game_open_api/game.api @@ -4,7 +4,7 @@ import "common.api" type SetUserGameScoreRequest { Score uint64 `json:"score"` - Type uint64 `json:"type,default=0" form:"type,default=0"` + Type uint64 `json:"type,default=0"` } type RankingData { @@ -22,7 +22,7 @@ type RankingResponse { } type RankingListRequest { - Type uint64 `json:"type,default=0" form:"type,default=0"` + Type uint64 `form:"type,default=0"` PageBase } diff --git a/game_open_api/internal/logic/game/ranking_set_score_logic.go b/game_open_api/internal/logic/game/ranking_set_score_logic.go index e347224..a40e798 100644 --- a/game_open_api/internal/logic/game/ranking_set_score_logic.go +++ b/game_open_api/internal/logic/game/ranking_set_score_logic.go @@ -50,6 +50,7 @@ func (l *RankingSetScoreLogic) RankingSetScore(req *types.SetUserGameScoreReques AppUserId: at.UserId, AppAccount: at.AppId, Score: req.Score, + T: req.Type, } err = l.svcCtx.GameScore.CreateScore(l.ctx, oldScore) } diff --git a/game_open_api/internal/types/types.go b/game_open_api/internal/types/types.go index a30d81e..43e479d 100644 --- a/game_open_api/internal/types/types.go +++ b/game_open_api/internal/types/types.go @@ -34,7 +34,7 @@ type RankingData struct { } type RankingListRequest struct { - Type uint64 `json:"type,default=0" form:"type,default=0"` + Type uint64 `form:"type,default=0"` PageBase }