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 }