Ejemplo n.º 1
0
 def getTodayCount(self):
     """今日の挨拶回数を取得.
     """
     now = OSAUtil.get_now()
     if DateTimeUtil.judgeSameDays(self.ltime, now):
         return self.today
     else:
         return 0
Ejemplo n.º 2
0
 def addCount(self, cnt=1):
     """あいさつ回数を加算.
     """
     now = OSAUtil.get_now()
     if not DateTimeUtil.judgeSameDays(self.ltime, now):
         self.yesterday = self.today
         self.today = 0
     self.today += cnt
     self.total += cnt
     self.ltime = now
Ejemplo n.º 3
0
 def putFreeGachaFlag(self):
     """無料ガチャを引けるか.
     """
     model_mgr = self.getModelMgr()
     v_player = self.getViewerPlayer()
     lasttime = BackendApi.get_freegachalasttime(v_player.id, model_mgr, using=settings.DB_READONLY)
     if not DateTimeUtil.judgeSameDays(OSAUtil.get_now(), lasttime):
         self.html_param['free_gacha'] = 1
         self.__news_num += 1
         url = OSAUtil.addQuery(UrlMaker.gacha(), Defines.URLQUERY_CTYPE, Defines.GachaConsumeType.GachaTopTopic.FREE)
         self.html_param['url_gacha'] = self.makeAppLinkUrl(url)