From a97ec9c75df75d457842c2cec17f4e0ff34663ab Mon Sep 17 00:00:00 2001 From: hujiebin Date: Tue, 13 Jun 2023 16:00:26 +0800 Subject: [PATCH] 99+ --- route/cp_r/rank.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/route/cp_r/rank.go b/route/cp_r/rank.go index a0cd46f..cbcbb69 100644 --- a/route/cp_r/rank.go +++ b/route/cp_r/rank.go @@ -222,6 +222,13 @@ func CpMy(c *gin.Context) (*mycontext.MyContext, error) { if relation.UserId2 > 0 { response.User2 = userBases[relation.UserId2] response.Ranking = "99+" + ranks := cp_m.PageCpDayRank(model, beginDate, endDate, 0, 30) + for i, rank := range ranks { + if relation.ID == rank.CpId { + response.Ranking = fmt.Sprintf("%d", i+1) + break + } + } } resp.ResponseOk(c, response) return myCtx, nil -- 2.22.0