Beispiel #1
0
 def __init__(self, uniacid, date, type):
     if isinstance(date, (datetime.datetime, datetime.date)):
         self.date = date
     else:
         self.date = system_time_befor(1)
     self.app_key = str(type) + '-' + uniacid
     # type 1代表小程序   2代表公众号
     self.type = type
Beispiel #2
0
from plus_vdong.all_table_compute.data_source.db_source.plus_wxapp_info import MysqlPlusWxappInfo
import user_group


def start(arg_day):
    gzh_uniacid = MysqlPlusWechatsInfo().get_all_uniacid()
    xcx_uniacid = MysqlPlusWxappInfo().get_all_uniacid()
    """公众号循环"""
    for uniacid in gzh_uniacid:
        try:
            DbInsertVipcn(uniacid=uniacid, date=arg_day).insert_hour()
        except Exception, f:
            pass
    """小程序循环"""
    for uniacid in xcx_uniacid:
        try:
            DbInsertApplet(uniacid=uniacid, date=arg_day).insert_hour()
        except Exception, f:
            pass

    # # # 当数据执行完成后,在执行排名
    user_group.start(arg_day)


if __name__ == "__main__":
    try:
        arg_day = sys.argv[1]
    except IndexError, e:
        arg_day = system_time_befor(-1)

    start(arg_day)
Beispiel #3
0
 def __init__(self, uniacid,type):
     self._data=[]
     self.uniacid = uniacid
     self.type = type
     self.shopCountComputer = DbPlusShopCountComputer(uniacid, type, system_time_befor(-1))