示例#1
0
 def saveVipGiftStatus(self, userId, vipGiftStatus):
     '''
     保存用户VIP礼包状态
     @param userId: 哪个用户
     @param vipGiftStatus: 用户VIP礼包状态
     '''
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_VIP_GIFT_STATES,
                                 vipGiftStatus)
示例#2
0
 def incrPlayTime(self, userId, detalTime, gameId, roomId, tableId):
     """
     各个游戏向大厅汇报玩家的游戏时长
     """
     DaoGameDataHall.HINCRBY(userId, HallKeys.ATT_TOTAL_TIME, detalTime)
     datas = DaoGameDataHall.HGET(userId, HallKeys.ATT_TODAY_TIME)
     today = datetime.now().strftime('%Y%m%d')[-6:]
     if today in datas:
         datas[today] += detalTime
     else:
         datas[today] = detalTime
     oldday = (datetime.now() - timedelta(days=7)).strftime('%Y%m%d')[-6:]
     for k in datas.keys()[:]:
         if k < oldday:
             del datas[k]
     DaoGameDataHall.HSET(userId, HallKeys.ATT_TODAY_TIME, datas)
     return 1
示例#3
0
 def set_monthcheckin(self, userId, d):
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_MONTH_CHECKIN, d)
示例#4
0
 def _setDataValue(self, userId, attName, attValue):
     return DaoGameDataHall.HSET(userId, attName, attValue)
示例#5
0
 def setBiggestHallVersion(self, userId, version):
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_BIGGEST_HALL5_VERSION,
                                 version)
示例#6
0
 def setLoginBeforeVersion511flag(self, userId):
     return DaoGameDataHall.HSET(userId,
                                 HallKeys.ATT_LOGIN_BEFORE_VERSION_TO_511,
                                 1)
示例#7
0
 def setUpdateToVersion511flag(self, userId):
     return DaoGameDataHall.HSET(userId,
                                 HallKeys.ATT_UPDATE_CLIENT_VERSION_TO_511,
                                 1)
示例#8
0
 def changeFirstGamelist5(self, userId):
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_FIRST_GAME_LIST5, 1)
示例#9
0
 def setReliefShareDate(self, userId, timestamp):
     '''
     '''
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_RELIEF_SHARE_DATE,
                                 timestamp)
示例#10
0
 def setBeneFitsInfo(self, userId, datas):
     '''
     '''
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_BENEFITS, datas)
示例#11
0
 def setLastBuy(self, userId, d):
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_LAST_BUY, d)
示例#12
0
 def userAliveTime(self, userId):
     # 记录活动时间
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_ALIVE_TIME,
                                 fttime.formatTimeMs())
示例#13
0
 def set_moduletip(self, userId, d):
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_MODULE_TIP, d)
示例#14
0
 def set_submember(self, userId, d):
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_SUBMEMBER, d)
示例#15
0
 def updateReadPriMsgId(self, userId, readId):
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_MESSAGE_ID_PRIVATE,
                                 readId)
示例#16
0
 def updateReadSysMsgId(self, userId, readId):
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_MESSAGE_ID_SYSTEM,
                                 readId)