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]