|
@@ -666,7 +666,7 @@
|
|
|
t1.projectName,
|
|
|
t1.totalCount,
|
|
|
t2.liveVideoCount,
|
|
|
- t3.liveVideoCount,
|
|
|
+ t3.clipVideoCount,
|
|
|
t4.totalCharge,
|
|
|
t5.pushMediaCount,
|
|
|
t6.firstChargeCount,
|
|
@@ -720,7 +720,7 @@
|
|
|
group by project_id) t2 on t1.projectId = t2.projectId
|
|
|
left join
|
|
|
(select project_id as 'projectId',
|
|
|
- ifnull(count(1), 0) as 'liveVideoCount'
|
|
|
+ ifnull(count(1), 0) as 'clipVideoCount'
|
|
|
from application.app_bytedance_material_info
|
|
|
where 1 = 1
|
|
|
<if test="companyId != null and companyId != ''">
|
|
@@ -841,7 +841,7 @@
|
|
|
t1.projectName,
|
|
|
t1.totalCount,
|
|
|
t2.liveVideoCount,
|
|
|
- t3.liveVideoCount,
|
|
|
+ t3.clipVideoCount,
|
|
|
t4.totalCharge,
|
|
|
t5.pushMediaCount,
|
|
|
t6.firstChargeCount,
|
|
@@ -895,7 +895,7 @@
|
|
|
group by project_id) t2 on t1.projectId = t2.projectId
|
|
|
left join
|
|
|
(select project_id as 'projectId',
|
|
|
- ifnull(count(1), 0) as 'liveVideoCount'
|
|
|
+ ifnull(count(1), 0) as 'clipVideoCount'
|
|
|
from application.app_kuaishou_material_info
|
|
|
where 1 = 1
|
|
|
<if test="companyId != null and companyId != ''">
|
|
@@ -1018,7 +1018,7 @@
|
|
|
t1.leaderName,
|
|
|
t1.totalCount,
|
|
|
t2.liveVideoCount,
|
|
|
- t3.liveVideoCount,
|
|
|
+ t3.clipVideoCount,
|
|
|
t4.totalCharge,
|
|
|
t5.pushMediaCount,
|
|
|
t6.firstChargeCount,
|
|
@@ -1031,6 +1031,8 @@
|
|
|
then '石家庄'
|
|
|
when company_name like '%聚意%'
|
|
|
then '聚意'
|
|
|
+ when company_name like '%北京骄阳%'
|
|
|
+ then '骄阳'
|
|
|
else '-'
|
|
|
end
|
|
|
) as 'companyName',
|
|
@@ -1058,7 +1060,7 @@
|
|
|
group by leader_id) t2 on t1.leaderId = t2.leaderId
|
|
|
left join
|
|
|
(select leader_id as 'leaderId',
|
|
|
- ifnull(count(1), 0) as 'liveVideoCount'
|
|
|
+ ifnull(count(1), 0) as 'clipVideoCount'
|
|
|
from application.app_bytedance_material_info
|
|
|
where 1 = 1
|
|
|
<if test="companyId != null and companyId != ''">
|
|
@@ -1121,7 +1123,7 @@
|
|
|
t1.leaderName,
|
|
|
t1.totalCount,
|
|
|
t2.liveVideoCount,
|
|
|
- t3.liveVideoCount,
|
|
|
+ t3.clipVideoCount,
|
|
|
t4.totalCharge,
|
|
|
t5.pushMediaCount,
|
|
|
t6.firstChargeCount,
|
|
@@ -1134,6 +1136,8 @@
|
|
|
then '石家庄'
|
|
|
when company_name like '%聚意%'
|
|
|
then '聚意'
|
|
|
+ when company_name like '%北京骄阳%'
|
|
|
+ then '骄阳'
|
|
|
else '-'
|
|
|
end
|
|
|
) as 'companyName',
|
|
@@ -1161,7 +1165,7 @@
|
|
|
group by leader_id) t2 on t1.leaderId = t2.leaderId
|
|
|
left join
|
|
|
(select leader_id as 'leaderId',
|
|
|
- ifnull(count(1), 0) as 'liveVideoCount'
|
|
|
+ ifnull(count(1), 0) as 'clipVideoCount'
|
|
|
from application.app_kuaishou_material_info
|
|
|
where 1 = 1
|
|
|
<if test="companyId != null and companyId != ''">
|
|
@@ -1218,11 +1222,13 @@
|
|
|
</select>
|
|
|
<select id="getByteDanceUserData" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
select t1.userId,
|
|
|
+ t1.companyName,
|
|
|
+ t1.deptName,
|
|
|
t1.userName,
|
|
|
t1.leaderName,
|
|
|
t1.totalCount,
|
|
|
t2.liveVideoCount,
|
|
|
- t3.liveVideoCount,
|
|
|
+ t3.clipVideoCount,
|
|
|
t4.totalCharge,
|
|
|
t5.pushMediaCount,
|
|
|
t6.firstChargeCount,
|
|
@@ -1230,6 +1236,18 @@
|
|
|
from (select
|
|
|
count(1) as 'totalCount',
|
|
|
leader_name as 'leaderName',
|
|
|
+ (case when company_name like '%北京汇创%'
|
|
|
+ then '汇创'
|
|
|
+ when company_name like '%石家庄%'
|
|
|
+ then '石家庄'
|
|
|
+ when company_name like '%聚意%'
|
|
|
+ then '聚意'
|
|
|
+ when company_name like '%北京骄阳%'
|
|
|
+ then '骄阳'
|
|
|
+ else '-'
|
|
|
+ end
|
|
|
+ ) as 'companyName',
|
|
|
+ dept_name as 'deptName',
|
|
|
<if test="role == 'clip'">
|
|
|
clip_id as 'userId',
|
|
|
clip_name as 'userName'
|
|
@@ -1262,12 +1280,15 @@
|
|
|
and help_time >= #{start}
|
|
|
and help_time <= #{end}
|
|
|
<if test="role == 'clip'">
|
|
|
+ and clip_id != ''
|
|
|
group by clip_id
|
|
|
</if>
|
|
|
<if test="role == 'plan'">
|
|
|
+ and plan_id != ''
|
|
|
group by plan_id
|
|
|
</if>
|
|
|
<if test="role == 'shot'">
|
|
|
+ and shot_id != ''
|
|
|
group by shot_id
|
|
|
</if>
|
|
|
) t1
|
|
@@ -1307,18 +1328,21 @@
|
|
|
and help_time <= #{end}
|
|
|
and tag_id = 60155
|
|
|
<if test="role == 'clip'">
|
|
|
+ and clip_id != ''
|
|
|
group by clip_id
|
|
|
</if>
|
|
|
<if test="role == 'plan'">
|
|
|
+ and plan_id != ''
|
|
|
group by plan_id
|
|
|
</if>
|
|
|
<if test="role == 'shot'">
|
|
|
+ and shot_id != ''
|
|
|
group by shot_id
|
|
|
</if>
|
|
|
) t2 on t1.userId = t2.userId
|
|
|
left join
|
|
|
(select
|
|
|
- ifnull(count(1), 0) as 'liveVideoCount',
|
|
|
+ ifnull(count(1), 0) as 'clipVideoCount',
|
|
|
<if test="role == 'clip'">
|
|
|
clip_id as 'userId',
|
|
|
clip_name as 'userName'
|
|
@@ -1352,18 +1376,21 @@
|
|
|
and help_time <= #{end}
|
|
|
and tag_id = 60156
|
|
|
<if test="role == 'clip'">
|
|
|
+ and clip_id != ''
|
|
|
group by clip_id
|
|
|
</if>
|
|
|
<if test="role == 'plan'">
|
|
|
+ and plan_id != ''
|
|
|
group by plan_id
|
|
|
</if>
|
|
|
<if test="role == 'shot'">
|
|
|
+ and shot_id != ''
|
|
|
group by shot_id
|
|
|
</if>
|
|
|
) t3 on t1.userId = t3.userId
|
|
|
left join
|
|
|
(select
|
|
|
- ifnull(sum(charge), 0) as 'totalCharge',
|
|
|
+ ifnull(sum(cost), 0) as 'totalCharge',
|
|
|
<if test="role == 'clip'">
|
|
|
clip_id as 'userId',
|
|
|
clip_name as 'userName'
|
|
@@ -1396,12 +1423,15 @@
|
|
|
and stat_datetime >= #{start}
|
|
|
and stat_datetime <= #{end}
|
|
|
<if test="role == 'clip'">
|
|
|
+ and clip_id != ''
|
|
|
group by clip_id
|
|
|
</if>
|
|
|
<if test="role == 'plan'">
|
|
|
+ and plan_id != ''
|
|
|
group by plan_id
|
|
|
</if>
|
|
|
<if test="role == 'shot'">
|
|
|
+ and shot_id != ''
|
|
|
group by shot_id
|
|
|
</if>) t4 on t1.userId = t4.userId
|
|
|
left join
|
|
@@ -1439,12 +1469,15 @@
|
|
|
and media_time >= #{start}
|
|
|
and media_time <= #{end}
|
|
|
<if test="role == 'clip'">
|
|
|
+ and clip_id != ''
|
|
|
group by clip_id
|
|
|
</if>
|
|
|
<if test="role == 'plan'">
|
|
|
+ and plan_id != ''
|
|
|
group by plan_id
|
|
|
</if>
|
|
|
<if test="role == 'shot'">
|
|
|
+ and shot_id != ''
|
|
|
group by shot_id
|
|
|
</if>
|
|
|
) t5 on t1.userId = t5.userId
|
|
@@ -1482,12 +1515,15 @@
|
|
|
and farst_cost_time >= #{start}
|
|
|
and farst_cost_time <= #{end}
|
|
|
<if test="role == 'clip'">
|
|
|
+ and clip_id != ''
|
|
|
group by clip_id
|
|
|
</if>
|
|
|
<if test="role == 'plan'">
|
|
|
+ and plan_id != ''
|
|
|
group by plan_id
|
|
|
</if>
|
|
|
<if test="role == 'shot'">
|
|
|
+ and shot_id != ''
|
|
|
group by shot_id
|
|
|
</if>) t6 on t1.userId = t6.userId
|
|
|
left join (select
|
|
@@ -1524,25 +1560,30 @@
|
|
|
and media_effect_date >= #{start}
|
|
|
and media_effect_date <= #{end}
|
|
|
<if test="role == 'clip'">
|
|
|
+ and clip_id != ''
|
|
|
group by clip_id
|
|
|
</if>
|
|
|
<if test="role == 'plan'">
|
|
|
+ and plan_id != ''
|
|
|
group by plan_id
|
|
|
</if>
|
|
|
<if test="role == 'shot'">
|
|
|
+ and shot_id != ''
|
|
|
group by shot_id
|
|
|
</if>) t7 on t1.userId = t7.userId
|
|
|
- where t1.userId is not null
|
|
|
+ where t1.userId != ''
|
|
|
order by t1.totalCount desc
|
|
|
|
|
|
</select>
|
|
|
<select id="getKuaiShouUserData" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
select t1.userId,
|
|
|
+ t1.companyName,
|
|
|
+ t1.deptName,
|
|
|
t1.userName,
|
|
|
t1.leaderName,
|
|
|
t1.totalCount,
|
|
|
t2.liveVideoCount,
|
|
|
- t3.liveVideoCount,
|
|
|
+ t3.clipVideoCount,
|
|
|
t4.totalCharge,
|
|
|
t5.pushMediaCount,
|
|
|
t6.firstChargeCount,
|
|
@@ -1550,6 +1591,18 @@
|
|
|
from (select
|
|
|
count(1) as 'totalCount',
|
|
|
leader_name as 'leaderName',
|
|
|
+ (case when company_name like '%北京汇创%'
|
|
|
+ then '汇创'
|
|
|
+ when company_name like '%石家庄%'
|
|
|
+ then '石家庄'
|
|
|
+ when company_name like '%聚意%'
|
|
|
+ then '聚意'
|
|
|
+ when company_name like '%北京骄阳%'
|
|
|
+ then '骄阳'
|
|
|
+ else '-'
|
|
|
+ end
|
|
|
+ ) as 'companyName',
|
|
|
+ dept_name as 'deptName',
|
|
|
<if test="role == 'clip'">
|
|
|
clip_id as 'userId',
|
|
|
clip_name as 'userName'
|
|
@@ -1582,12 +1635,15 @@
|
|
|
and help_time >= #{start}
|
|
|
and help_time <= #{end}
|
|
|
<if test="role == 'clip'">
|
|
|
+ and clip_id != ''
|
|
|
group by clip_id
|
|
|
</if>
|
|
|
<if test="role == 'plan'">
|
|
|
+ and plan_id != ''
|
|
|
group by plan_id
|
|
|
</if>
|
|
|
<if test="role == 'shot'">
|
|
|
+ and shot_id != ''
|
|
|
group by shot_id
|
|
|
</if>
|
|
|
) t1
|
|
@@ -1627,18 +1683,21 @@
|
|
|
and help_time <= #{end}
|
|
|
and tag_id = 60155
|
|
|
<if test="role == 'clip'">
|
|
|
+ and clip_id != ''
|
|
|
group by clip_id
|
|
|
</if>
|
|
|
<if test="role == 'plan'">
|
|
|
+ and plan_id != ''
|
|
|
group by plan_id
|
|
|
</if>
|
|
|
<if test="role == 'shot'">
|
|
|
+ and shot_id != ''
|
|
|
group by shot_id
|
|
|
</if>
|
|
|
) t2 on t1.userId = t2.userId
|
|
|
left join
|
|
|
(select
|
|
|
- ifnull(count(1), 0) as 'liveVideoCount',
|
|
|
+ ifnull(count(1), 0) as 'clipVideoCount',
|
|
|
<if test="role == 'clip'">
|
|
|
clip_id as 'userId',
|
|
|
clip_name as 'userName'
|
|
@@ -1672,12 +1731,15 @@
|
|
|
and help_time <= #{end}
|
|
|
and tag_id = 60156
|
|
|
<if test="role == 'clip'">
|
|
|
+ and clip_id != ''
|
|
|
group by clip_id
|
|
|
</if>
|
|
|
<if test="role == 'plan'">
|
|
|
+ and plan_id != ''
|
|
|
group by plan_id
|
|
|
</if>
|
|
|
<if test="role == 'shot'">
|
|
|
+ and shot_id != ''
|
|
|
group by shot_id
|
|
|
</if>
|
|
|
) t3 on t1.userId = t3.userId
|
|
@@ -1716,12 +1778,15 @@
|
|
|
and stat_date >= #{start}
|
|
|
and stat_date <= #{end}
|
|
|
<if test="role == 'clip'">
|
|
|
+ and clip_id != ''
|
|
|
group by clip_id
|
|
|
</if>
|
|
|
<if test="role == 'plan'">
|
|
|
+ and plan_id != ''
|
|
|
group by plan_id
|
|
|
</if>
|
|
|
<if test="role == 'shot'">
|
|
|
+ and shot_id != ''
|
|
|
group by shot_id
|
|
|
</if>) t4 on t1.userId = t4.userId
|
|
|
left join
|
|
@@ -1759,12 +1824,15 @@
|
|
|
and media_time >= #{start}
|
|
|
and media_time <= #{end}
|
|
|
<if test="role == 'clip'">
|
|
|
+ and clip_id != ''
|
|
|
group by clip_id
|
|
|
</if>
|
|
|
<if test="role == 'plan'">
|
|
|
+ and plan_id != ''
|
|
|
group by plan_id
|
|
|
</if>
|
|
|
<if test="role == 'shot'">
|
|
|
+ and shot_id != ''
|
|
|
group by shot_id
|
|
|
</if>
|
|
|
) t5 on t1.userId = t5.userId
|
|
@@ -1802,12 +1870,15 @@
|
|
|
and farst_cost_time >= #{start}
|
|
|
and farst_cost_time <= #{end}
|
|
|
<if test="role == 'clip'">
|
|
|
+ and clip_id != ''
|
|
|
group by clip_id
|
|
|
</if>
|
|
|
<if test="role == 'plan'">
|
|
|
+ and plan_id != ''
|
|
|
group by plan_id
|
|
|
</if>
|
|
|
<if test="role == 'shot'">
|
|
|
+ and shot_id != ''
|
|
|
group by shot_id
|
|
|
</if>) t6 on t1.userId = t6.userId
|
|
|
left join (select
|
|
@@ -1844,19 +1915,22 @@
|
|
|
and media_effect_date >= #{start}
|
|
|
and media_effect_date <= #{end}
|
|
|
<if test="role == 'clip'">
|
|
|
+ and clip_id != ''
|
|
|
group by clip_id
|
|
|
</if>
|
|
|
<if test="role == 'plan'">
|
|
|
+ and plan_id != ''
|
|
|
group by plan_id
|
|
|
</if>
|
|
|
<if test="role == 'shot'">
|
|
|
+ and shot_id != ''
|
|
|
group by shot_id
|
|
|
</if>) t7 on t1.userId = t7.userId
|
|
|
- where t1.userId is not null
|
|
|
+ where t1.userId != ''
|
|
|
order by t1.totalCount desc
|
|
|
</select>
|
|
|
<select id="getByteDanceVideoData" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
- select * from (
|
|
|
+ select * from (
|
|
|
select
|
|
|
(case when company_name like '%北京汇创%'
|
|
|
then '汇创'
|
|
@@ -1864,6 +1938,8 @@
|
|
|
then '石家庄'
|
|
|
when company_name like '%聚意%'
|
|
|
then '聚意'
|
|
|
+ when company_name like '%北京骄阳%'
|
|
|
+ then '骄阳'
|
|
|
else '-'
|
|
|
end
|
|
|
) as 'companyName',
|
|
@@ -1880,7 +1956,7 @@
|
|
|
cover_url as 'coverUrl',
|
|
|
video_url as 'videoUrl'
|
|
|
from application.bytedance_material_video_report_daily_dw
|
|
|
- where 1 = 1
|
|
|
+ where 1 = 1
|
|
|
<if test="companyId != null and companyId != ''">
|
|
|
and clip_company_id = #{companyId}
|
|
|
</if>
|
|
@@ -1898,13 +1974,14 @@
|
|
|
</if>
|
|
|
and stat_datetime >= #{start}
|
|
|
and stat_datetime <= #{end}
|
|
|
- group by signature
|
|
|
- ) t order by t.totalCharge desc
|
|
|
+ and signature is not null
|
|
|
+ and clip_id is not null
|
|
|
+ group by signature
|
|
|
+ ) t order by t.totalCharge desc
|
|
|
|
|
|
</select>
|
|
|
<select id="getKuaiShouVideoData" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
-
|
|
|
- select * from (
|
|
|
+ select * from (
|
|
|
select
|
|
|
(case when company_name like '%北京汇创%'
|
|
|
then '汇创'
|
|
@@ -1912,6 +1989,8 @@
|
|
|
then '石家庄'
|
|
|
when company_name like '%聚意%'
|
|
|
then '聚意'
|
|
|
+ when company_name like '%北京骄阳%'
|
|
|
+ then '骄阳'
|
|
|
else '-'
|
|
|
end
|
|
|
) as 'companyName',
|
|
@@ -1928,7 +2007,7 @@
|
|
|
cover_url as 'coverUrl',
|
|
|
photo_url as 'videoUrl'
|
|
|
from application.kuaishou_material_video_report_daily_dw
|
|
|
- where 1 = 1
|
|
|
+ where 1 = 1
|
|
|
<if test="companyId != null and companyId != ''">
|
|
|
and clip_company_id = #{companyId}
|
|
|
</if>
|
|
@@ -1947,8 +2026,9 @@
|
|
|
and stat_date >= #{start}
|
|
|
and stat_date <= #{end}
|
|
|
and signature is not null
|
|
|
- group by signature
|
|
|
- ) t order by t.totalCharge desc
|
|
|
+ and clip_id is not null
|
|
|
+ group by signature
|
|
|
+ ) t order by t.totalCharge desc
|
|
|
|
|
|
</select>
|
|
|
</mapper>
|