示例#1
0
 def getTopN(self, rankingId, issueNumber, topN):
     '''
     获取topN
     @return: [userId1, score1, userId2, score2,...] 
     '''
     return daobase.executeRankLua(self._get_topn_alias, 3, rankingId,
                                   issueNumber, topN)
示例#2
0
 def setUserScore(self, rankingId, issueNumber, userId, score, totalN):
     '''
     设置用户积分
     @return: rank
     '''
     return daobase.executeRankLua(self._set_user_score_alias, 5, rankingId,
                                   issueNumber, userId, score, totalN)
示例#3
0
 def getUserRankWithScore(self, rankingId, issueNumber, userId):
     '''
     获取用户排名和积分
     @return: (rank, score)
     '''
     return daobase.executeRankLua(self._get_user_alias, 3, rankingId,
                                   issueNumber, userId)
示例#4
0
 def removeUser(self, rankingId, issueNumber, userId):
     '''
     删除用户
     '''
     return daobase.executeRankLua(self._remove_user_alias, 3,
                                   rankingId,
                                   issueNumber,
                                   userId) > 0
示例#5
0
 def getTopN(self, rankingId, issueNumber, topN):
     '''
     获取topN
     @return: [userId1, score1, userId2, score2,...] 
     '''
     return daobase.executeRankLua(self._get_topn_alias, 3,
                                   rankingId,
                                   issueNumber,
                                   topN)
示例#6
0
 def getUserRankWithScore(self, rankingId, issueNumber, userId):
     '''
     获取用户排名和积分
     @return: (rank, score)
     '''
     return daobase.executeRankLua(self._get_user_alias, 3,
                                   rankingId,
                                   issueNumber,
                                   userId)
示例#7
0
 def setUserScore(self, rankingId, issueNumber, userId, score, totalN):
     '''
     设置用户积分
     @return: rank
     '''
     return daobase.executeRankLua(self._set_user_score_alias, 5,
                                   rankingId,
                                   issueNumber,
                                   userId,
                                   score,
                                   totalN)
示例#8
0
 def removeUser(self, rankingId, issueNumber, userId):
     '''
     删除用户
     '''
     return daobase.executeRankLua(self._remove_user_alias, 3, rankingId,
                                   issueNumber, userId) > 0