예제 #1
0
    def shop_realtime_data(self):
        ''' 店铺实时数据抓取'''

        data = DbShopRealtimeData(self.uniacid, self.type,self.date).get_data()
        # if insert_or_update == 1:
        if data:
            insert(PlusShopRealtimeData, [data])
예제 #2
0
 def insert_shop_sale_count_hour(self):
     '''店铺小時数据'''
     try:
         data = DbPlusShopSaleCountHour(self.uniacid, self.type).get_data()
         if data:
             insert(PlusShopSaleCountHour, data)
     except Exception, e:
         p_a.logger.getLogger().error('店铺小时计算数据 异常:%s', e)
예제 #3
0
 def insert_shop_sdk_count(self):
     '''店铺sdk数据'''
     try:
         data = DbPlusShopSdkCount(self.uniacid,self.type,self.date).get_data()
         if data:
             insert(PlusShopSdkCount,data)
     except Exception, e:
         p_a.logger.getLogger().error('店铺sdk数据 异常:%s', e)
예제 #4
0
 def insert_shop_sale_visit(self):
     '''店铺销售数据'''
     try:
         data = DbPlusShopSaleVisit(self.uniacid,self.date,self.type).get_data()
         if data:
             insert(PlusShopSalevisit,data)
     except Exception, e:
         p_a.logger.getLogger().error('店铺销售数据 异常:%s', e)
예제 #5
0
 def insert_shop_year_data(self):
     '''店铺年销售数据表'''
     try:
         data = DbPlusShopYearData(self.uniacid, self.type).get_data()
         if data:
             insert(PlusShopYearData,data)
     except Exception, e:
         p_a.logger.getLogger().error('店铺年销售数据表 异常:%s', e)
예제 #6
0
 def insert_shop_count(self):
     '''店铺销售总计表'''
     try:
         data = DbPlusShopCount(self.uniacid, self.type).get_data()
         if data:
             insert(PlusShopCount,data)
     except Exception, e:
         p_a.logger.getLogger().error('店铺销售总计表 异常:%s', e)
예제 #7
0
 def insert_province_sale(self):
     '''省份销售分布表'''
     try:
         data = DbPlusProvinceSale(self.uniacid,self.type,self.date).get_data()
         if data:
             insert(PlusProvinceSales,data)
     except Exception, e:
         p_a.logger.getLogger().error('省份销售分布表 异常:%s', e)
예제 #8
0
 def goods_sale_visit(self):
     ''' 插入商品访问记录表'''
     data = DbGoodsSaleVisit(self.uniacid,self.type,self.date).get_data()
     if data:
         insert(PlusShopGoodsSalevisit,data)