From 1aaa4c4bf749b9ce59c9ec576e45b207900c4c2b Mon Sep 17 00:00:00 2001 From: pengtao Date: Thu, 24 Oct 2019 11:24:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=A0=E9=80=92=E6=97=A5=E6=9C=9F=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- daily_report/dreport.py | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/daily_report/dreport.py b/daily_report/dreport.py index 17918a2..3cd01c8 100644 --- a/daily_report/dreport.py +++ b/daily_report/dreport.py @@ -175,16 +175,29 @@ class Report: and "channel"='{args['channelid']}' AND activity_id=201 and "$part_date"='{self.day}' """ - jumpout_sql = f"""SELECT - count(distinct "#account_id") - FROM - v_event_{args['suffix']} - where - "$part_event"='event_1_4' + if args['gameid'] not in (2001, 2002): + jumpout_sql = f"""SELECT + count(distinct "#account_id") + FROM + v_event_{args['suffix']} + where + "$part_event"='event_1_4' + and gameid='{args['gameid']}' + and "channel"='{args['channelid']}' + and "$part_date"='{self.day}' + and "jump_result"=1 """ + else: + jumpout_sql = f"""SELECT + count(distinct "#account_id") + FROM + v_event_{args['suffix']} + where + "$part_event"='event_11_31' and gameid='{args['gameid']}' and "channel"='{args['channelid']}' and "$part_date"='{self.day}' - and "jump_result"=1 """ + and "button_name" ='jc_promotipn'""" + try: activa = args['tga'].get_data(activa_sql)[0][0] new = args['tga'].get_data(new_sql)[0][0]