|
@@ -463,10 +463,14 @@
|
|
|
else 0 end as downloadStartRate -- 应用下载广告数据-安卓下载开始率 计算方法:安卓下载开始数/点击数
|
|
|
|
|
|
from ctop_bytedance_video_report_daily a
|
|
|
- left join ctop_material_ascription f on a.signature = f.material_id
|
|
|
- where a.company_id = #{companyId}
|
|
|
- and stat_datetime >= #{startDate}
|
|
|
+ left join (select material_id,clip_id,shot_id,plan_id,plane_id from ctop_material_ascription group by material_id) f on a.signature = f.material_id
|
|
|
+ where stat_datetime >= #{startDate}
|
|
|
and stat_datetime <= #{endDate}
|
|
|
+
|
|
|
+ <if test=" role != 'admin' ">
|
|
|
+ and a.company_id = #{companyId}
|
|
|
+ </if>
|
|
|
+
|
|
|
and f.material_id is not null
|
|
|
|
|
|
<choose> <!-- 编导、剪辑、拍摄、平面只能查看自己本职工作制作的视频,设计组长和管理员能查看所有的-->
|
|
@@ -571,11 +575,14 @@
|
|
|
huanbi as huanbi
|
|
|
|
|
|
from ctop_bytedance_video_report_daily a
|
|
|
- left join ctop_material_ascription f on a.signature = f.material_id
|
|
|
- where a.company_id = #{companyId}
|
|
|
- and f.material_id = #{signature}
|
|
|
- and stat_datetime >= #{startDate}
|
|
|
+ left join (select material_id,clip_id,shot_id,plan_id,plane_id from ctop_material_ascription group by material_id) f on a.signature = f.material_id
|
|
|
+ where
|
|
|
+ stat_datetime >= #{startDate}
|
|
|
and stat_datetime <= #{endDate}
|
|
|
+ <if test=" role != 'admin' ">
|
|
|
+ and a.company_id = #{companyId}
|
|
|
+ </if>
|
|
|
+ and f.material_id = #{signature}
|
|
|
order by stat_datetime desc
|
|
|
</select>
|
|
|
|
|
@@ -679,10 +686,12 @@
|
|
|
a.download_start_rate as downloadStartRate -- 应用下载广告数据-安卓下载开始率 计算方法:安卓下载开始数/点击数
|
|
|
from ctop_bytedance_video_report_daily a
|
|
|
left join (select id,code,url,material_name from ctop_material_info group by code) e on a.signature = e.code
|
|
|
- left join ctop_material_ascription f on e.id = f.material_id
|
|
|
- where a.company_id = #{companyId}
|
|
|
- and stat_datetime >= #{startDate}
|
|
|
+ left join (select material_id,clip_id,shot_id,plan_id,plane_id from ctop_material_ascription group by material_id) f on e.id = f.material_id
|
|
|
+ where stat_datetime >= #{startDate}
|
|
|
and stat_datetime <= #{endDate}
|
|
|
+ <if test=" role != 'admin' ">
|
|
|
+ and a.company_id = #{companyId}
|
|
|
+ </if>
|
|
|
and e.code is not null
|
|
|
<!--<if test="role == 'plan'">
|
|
|
and f.plan = #{userId}
|