fix type参数接收问题

This commit is contained in:
xiabin 2025-01-23 19:33:57 +08:00
parent 1e96ec3b25
commit 5acaf1028b
3 changed files with 4 additions and 3 deletions

View File

@ -4,7 +4,7 @@ import "common.api"
type SetUserGameScoreRequest { type SetUserGameScoreRequest {
Score uint64 `json:"score"` Score uint64 `json:"score"`
Type uint64 `json:"type,default=0" form:"type,default=0"` Type uint64 `json:"type,default=0"`
} }
type RankingData { type RankingData {
@ -22,7 +22,7 @@ type RankingResponse {
} }
type RankingListRequest { type RankingListRequest {
Type uint64 `json:"type,default=0" form:"type,default=0"` Type uint64 `form:"type,default=0"`
PageBase PageBase
} }

View File

@ -50,6 +50,7 @@ func (l *RankingSetScoreLogic) RankingSetScore(req *types.SetUserGameScoreReques
AppUserId: at.UserId, AppUserId: at.UserId,
AppAccount: at.AppId, AppAccount: at.AppId,
Score: req.Score, Score: req.Score,
T: req.Type,
} }
err = l.svcCtx.GameScore.CreateScore(l.ctx, oldScore) err = l.svcCtx.GameScore.CreateScore(l.ctx, oldScore)
} }

View File

@ -34,7 +34,7 @@ type RankingData struct {
} }
type RankingListRequest struct { type RankingListRequest struct {
Type uint64 `json:"type,default=0" form:"type,default=0"` Type uint64 `form:"type,default=0"`
PageBase PageBase
} }