Showing
1 changed file
with
5 additions
and
4 deletions
@@ -382,7 +382,8 @@ class ShoesModel extends global.yoho.BaseModel { | @@ -382,7 +382,8 @@ class ShoesModel extends global.yoho.BaseModel { | ||
382 | ON U.id = S.user_id | 382 | ON U.id = S.user_id |
383 | WHERE S.act_id=:actId | 383 | WHERE S.act_id=:actId |
384 | group by S.user_id | 384 | group by S.user_id |
385 | - order by count desc, playTime asc) A, (SELECT @rowNo := 0) B) C`; | 385 | + order by count desc, playTime asc) A, (SELECT @rowNo := 0) B) C |
386 | + limit 0, 100`; | ||
386 | 387 | ||
387 | 388 | ||
388 | let scoreInfo = await mySqlCli.query(strScore, { | 389 | let scoreInfo = await mySqlCli.query(strScore, { |
@@ -398,10 +399,10 @@ class ShoesModel extends global.yoho.BaseModel { | @@ -398,10 +399,10 @@ class ShoesModel extends global.yoho.BaseModel { | ||
398 | friendObj.score = scoreInfo[i].count * perScore; | 399 | friendObj.score = scoreInfo[i].count * perScore; |
399 | friendObj.rank = scoreInfo[i].rownum; | 400 | friendObj.rank = scoreInfo[i].rownum; |
400 | friendObj.unionid = scoreInfo[i].union_id; | 401 | friendObj.unionid = scoreInfo[i].union_id; |
401 | - friendObj.userAvatar = scoreInfo[i].user_avatar; | ||
402 | - friendObj.userName = scoreInfo[i].user_name; | 402 | + friendObj.headimgurl = scoreInfo[i].user_avatar; |
403 | + friendObj.nickname = scoreInfo[i].user_name; | ||
403 | friendObj.playTime = scoreInfo[i].playTime; | 404 | friendObj.playTime = scoreInfo[i].playTime; |
404 | - friendObj.createTime = parseInt(scoreInfo[i].create_time, 10); | 405 | + friendObj.createTime = parseInt((new Date()).getTime() / 1000, 10) - parseInt(scoreInfo[i].create_time, 10); |
405 | 406 | ||
406 | friendList.push(friendObj); | 407 | friendList.push(friendObj); |
407 | } | 408 | } |
-
Please register or login to post a comment