添加导出率

This commit is contained in:
pengtao 2019-10-22 15:45:41 +08:00
parent c3660fcd0a
commit e88008cb79
2 changed files with 12 additions and 2 deletions

View File

@ -164,7 +164,14 @@ class Report:
and "channel"='{self.channelid}'
AND activity_id=201
and "$part_date"='{self.day}' """
jumpout_sql = f"""SELECT
count(distinct "#account_id")
FROM
v_event_19
where
"$part_event"='event_1_4'
and "$part_date"='{self.day}'
and "jump_result"=1 """
try:
activa = self.tga.get_data(activa_sql)[0][0]
new = self.tga.get_data(new_sql)[0][0]
@ -173,7 +180,9 @@ class Report:
ad_101 = self.tga.get_data(ad_101_sql)[0][0]
ad_1 = self.tga.get_data(ad_1_sql)[0][0]
ad_201 = self.tga.get_data(ad_201_sql)[0][0]
return [activa, new, share, timeonlie, ad_1, ad_101, ad_201]
jumpout = self.tga.get_data(jumpout_sql)[0][0]
jump_per = (100 * jumpout) / activa
return [activa, new, share, timeonlie, ad_1, ad_101, ad_201, jump_per]
except Exception:
log.error(f"get data from tga failed ,{self.gameid}", exc_info=True)
return None

View File

@ -28,6 +28,7 @@
<th>视屏显示</th>
<th>banner显示</th>
<th>插屏显示</th>
<th>导出率</th>
</tr>
{% for item in data.get('all') %}
<tr>