Exemplo n.º 1
0
    def process_one_day(self, date):
        """
		处理某一天的数据
		"""

        dataInOut = Utils.Object(date=date, area_id=self.area_id, POH=self.poh)
        self.process_dau(date, dataInOut)

        # 存储或更新数据
        obj, created = AUDaily.objects.update_or_create(dataInOut.__dict__,
                                                        date=dataInOut.date)
Exemplo n.º 2
0
    def process_one_day(self, date):
        """
		处理某一天的数据
		"""
        dataInOut = Utils.Object(date=date, area_id=self.area_id, POH=self.poh)
        self.process_pv_uv(date, dataInOut)
        # self.process_orders(date, dataInOut)
        self.process_visit_count(date, dataInOut)

        # 存储或更新数据
        obj, created = PVDaily.objects.update_or_create(dataInOut.__dict__,
                                                        date=dataInOut.date)

        # 记录下最后一天的model
        self.prevData = dataInOut