Commit 66e0a5c6 authored by hujiebin's avatar hujiebin

Merge branch 'feature/cp-new' into feature/3.9.0

parents efbd6522 4668f8a0
...@@ -221,7 +221,14 @@ func CpMy(c *gin.Context) (*mycontext.MyContext, error) { ...@@ -221,7 +221,14 @@ func CpMy(c *gin.Context) (*mycontext.MyContext, error) {
} }
if relation.UserId2 > 0 { if relation.UserId2 > 0 {
response.User2 = userBases[relation.UserId2] response.User2 = userBases[relation.UserId2]
response.Ranking = "99+" response.Ranking = "30+"
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) resp.ResponseOk(c, response)
return myCtx, nil return myCtx, nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment