传递日期参数

This commit is contained in:
pengtao 2019-10-24 14:18:53 +08:00
parent 1aaa4c4bf7
commit d96abe48ee

View File

@ -196,7 +196,7 @@ class Report:
and gameid='{args['gameid']}'
and "channel"='{args['channelid']}'
and "$part_date"='{self.day}'
and "button_name" ='jc_promotipn'"""
and "button_name" like 'wx%_success'"""
try:
activa = args['tga'].get_data(activa_sql)[0][0]
@ -275,7 +275,6 @@ class Report:
def get_output_fromappid(self, **args):
log.info(f"XXXX gameid={args['gameid']} P{args}")
if args['gameid'] not in (2001, 2002):
jump_sql = f"""SELECT
count("#account_id"),count(distinct "#account_id")
@ -298,8 +297,7 @@ class Report:
and gameid='{args['gameid']}'
and "channel"='{args['channelid']}'
and "$part_date"='{self.day}'
and "button_name" ='jc_promotipn'
and cast(json_extract(trim(button_param,'[]"'),'$.appid') as varchar)='{args['fromappid']}'"""
and "button_name"='{args['fromappid']}_success'"""
data = args['tga'].get_data(jump_sql)
if data:
@ -375,7 +373,9 @@ class Report:
for f_key in f_keys:
args['fromappid'] = f_key
args['fromappid_cn'] = fromappids.get(f_key, None) or "未知"
temp['input'].append(self.get_input_fromappid(**args))
# 2001 暂无买量数据
if args['gameid'] not in (2001, 2002):
temp['input'].append(self.get_input_fromappid(**args))
temp['output'].append(self.get_output_fromappid(**args))
print(temp)
data.append(temp)