Example #1
0
 def saveVipGiftStatus(self, userId, vipGiftStatus):
     '''
     保存用户VIP礼包状态
     @param userId: 哪个用户
     @param vipGiftStatus: 用户VIP礼包状态
     '''
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_VIP_GIFT_STATES,
                                 vipGiftStatus)
Example #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
Example #3
0
 def set_monthcheckin(self, userId, d):
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_MONTH_CHECKIN, d)
Example #4
0
 def _setDataValue(self, userId, attName, attValue):
     return DaoGameDataHall.HSET(userId, attName, attValue)
Example #5
0
 def setBiggestHallVersion(self, userId, version):
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_BIGGEST_HALL5_VERSION,
                                 version)
Example #6
0
 def setLoginBeforeVersion511flag(self, userId):
     return DaoGameDataHall.HSET(userId,
                                 HallKeys.ATT_LOGIN_BEFORE_VERSION_TO_511,
                                 1)
Example #7
0
 def setUpdateToVersion511flag(self, userId):
     return DaoGameDataHall.HSET(userId,
                                 HallKeys.ATT_UPDATE_CLIENT_VERSION_TO_511,
                                 1)
Example #8
0
 def changeFirstGamelist5(self, userId):
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_FIRST_GAME_LIST5, 1)
Example #9
0
 def setReliefShareDate(self, userId, timestamp):
     '''
     '''
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_RELIEF_SHARE_DATE,
                                 timestamp)
Example #10
0
 def setBeneFitsInfo(self, userId, datas):
     '''
     '''
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_BENEFITS, datas)
Example #11
0
 def setLastBuy(self, userId, d):
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_LAST_BUY, d)
Example #12
0
 def userAliveTime(self, userId):
     # 记录活动时间
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_ALIVE_TIME,
                                 fttime.formatTimeMs())
Example #13
0
 def set_moduletip(self, userId, d):
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_MODULE_TIP, d)
Example #14
0
 def set_submember(self, userId, d):
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_SUBMEMBER, d)
Example #15
0
 def updateReadPriMsgId(self, userId, readId):
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_MESSAGE_ID_PRIVATE,
                                 readId)
Example #16
0
 def updateReadSysMsgId(self, userId, readId):
     return DaoGameDataHall.HSET(userId, HallKeys.ATT_MESSAGE_ID_SYSTEM,
                                 readId)