Esempio n. 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)
Esempio n. 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)
Esempio n. 3
0
 def getUserRankWithScore(self, rankingId, issueNumber, userId):
     '''
     获取用户排名和积分
     @return: (rank, score)
     '''
     return daobase.executeRankLua(self._get_user_alias, 3, rankingId,
                                   issueNumber, userId)
Esempio n. 4
0
 def removeUser(self, rankingId, issueNumber, userId):
     '''
     删除用户
     '''
     return daobase.executeRankLua(self._remove_user_alias, 3,
                                   rankingId,
                                   issueNumber,
                                   userId) > 0
Esempio n. 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)
Esempio n. 6
0
 def getUserRankWithScore(self, rankingId, issueNumber, userId):
     '''
     获取用户排名和积分
     @return: (rank, score)
     '''
     return daobase.executeRankLua(self._get_user_alias, 3,
                                   rankingId,
                                   issueNumber,
                                   userId)
Esempio n. 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)
Esempio n. 8
0
 def removeUser(self, rankingId, issueNumber, userId):
     '''
     删除用户
     '''
     return daobase.executeRankLua(self._remove_user_alias, 3, rankingId,
                                   issueNumber, userId) > 0