|
@@ -445,15 +445,16 @@
|
|
|
LEFT JOIN ctop_tag_info t2 ON t2.id = t1.tag_id
|
|
|
INNER JOIN
|
|
|
(
|
|
|
- SELECT signature FROM ctop_kuaishou_video_get
|
|
|
- WHERE stat_date >= #{startTime}
|
|
|
- AND stat_date <= concat(#{endTime},' 23:59:59')
|
|
|
+ SELECT signature FROM ctop_kuaishou_video_get
|
|
|
+ WHERE stat_date >= #{startTime}
|
|
|
+ AND stat_date <= concat(#{endTime},' 23:59:59')
|
|
|
GROUP BY signature
|
|
|
) t4 ON t4.signature= t1.`code`
|
|
|
INNER JOIN(
|
|
|
SELECT tt1.id,tt3.role_name,tt1.realname FROM sys_user tt1
|
|
|
LEFT JOIN sys_user_role tt2 ON tt1.id = tt2.user_id
|
|
|
LEFT JOIN sys_role tt3 ON tt2.role_id = tt3.id
|
|
|
+ LEFT JOIN user_company tt4 ON tt1.id = tt4.user_id
|
|
|
WHERE 1=1
|
|
|
<if test="realname!=null">
|
|
|
and tt1.realname LIKE CONCAT('%',#{realname},'%')
|
|
@@ -464,6 +465,9 @@
|
|
|
<if test="roleCode==null">
|
|
|
AND tt3.role_code in ('clip','shot','plan')
|
|
|
</if>
|
|
|
+ <if test="companyId!=null">
|
|
|
+ AND tt4.company_id = #{companyId}
|
|
|
+ </if>
|
|
|
) t3 ON t3.id = t1.user_id
|
|
|
WHERE t2.parent_id in(60155,60156)
|
|
|
GROUP BY t1.user_id
|
|
@@ -487,19 +491,23 @@
|
|
|
t3.realname,
|
|
|
t3.role_name
|
|
|
FROM ctop_material_tag_info t1
|
|
|
- LEFT JOIN ctop_tag_info t2 ON t2.id = t1.tag_id
|
|
|
+ LEFT JOIN ctop_tag_info t2 ON t2.id = t1.tag_id
|
|
|
INNER JOIN
|
|
|
(
|
|
|
- SELECT signature FROM ctop_kuaishou_video_get
|
|
|
- WHERE stat_date >= #{startTime}
|
|
|
- AND stat_date <= concat(#{endTime},' 23:59:59')
|
|
|
+ SELECT signature FROM ctop_kuaishou_video_get
|
|
|
+ WHERE stat_date >= #{startTime}
|
|
|
+ AND stat_date <= concat(#{endTime},' 23:59:59')
|
|
|
GROUP BY signature
|
|
|
) t4 ON t4.signature= t1.`code`
|
|
|
INNER JOIN(
|
|
|
SELECT tt1.id,tt3.role_name,tt1.realname FROM sys_user tt1
|
|
|
LEFT JOIN sys_user_role tt2 ON tt1.id = tt2.user_id
|
|
|
LEFT JOIN sys_role tt3 ON tt2.role_id = tt3.id
|
|
|
+ LEFT JOIN user_company tt4 ON tt1.id = tt4.user_id
|
|
|
WHERE 1=1
|
|
|
+ <if test="companyId!=null">
|
|
|
+ AND tt4.company_id = #{companyId}
|
|
|
+ </if>
|
|
|
<if test="realname!=null">
|
|
|
and tt1.realname LIKE CONCAT('%',#{realname},'%')
|
|
|
</if>
|
|
@@ -515,22 +523,26 @@
|
|
|
) k
|
|
|
LEFT JOIN
|
|
|
(
|
|
|
- SELECT
|
|
|
+ SELECT
|
|
|
t1.user_id, SUM(t5.charge) 'zhenren_charge'
|
|
|
FROM ctop_material_tag_info t1
|
|
|
- LEFT JOIN ctop_tag_info t2 ON t2.id = t1.tag_id
|
|
|
+ LEFT JOIN ctop_tag_info t2 ON t2.id = t1.tag_id
|
|
|
INNER JOIN
|
|
|
(
|
|
|
- SELECT signature FROM ctop_kuaishou_video_get
|
|
|
- WHERE stat_date >= #{startTime}
|
|
|
- AND stat_date <= concat(#{endTime},' 23:59:59')
|
|
|
+ SELECT signature FROM ctop_kuaishou_video_get
|
|
|
+ WHERE stat_date >= #{startTime}
|
|
|
+ AND stat_date <= concat(#{endTime},' 23:59:59')
|
|
|
GROUP BY signature
|
|
|
) t4 ON t4.signature= t1.`code`
|
|
|
INNER JOIN(
|
|
|
SELECT tt1.id,tt3.role_name,tt1.realname FROM sys_user tt1
|
|
|
LEFT JOIN sys_user_role tt2 ON tt1.id = tt2.user_id
|
|
|
LEFT JOIN sys_role tt3 ON tt2.role_id = tt3.id
|
|
|
+ LEFT JOIN user_company tt4 ON tt1.id = tt4.user_id
|
|
|
WHERE 1=1
|
|
|
+ <if test="companyId!=null">
|
|
|
+ AND tt4.company_id = #{companyId}
|
|
|
+ </if>
|
|
|
<if test="realname!=null">
|
|
|
and tt1.realname LIKE CONCAT('%',#{realname},'%')
|
|
|
</if>
|
|
@@ -541,7 +553,7 @@
|
|
|
AND tt3.role_code in ('clip','shot','plan')
|
|
|
</if>
|
|
|
) t3 ON t3.id = t1.user_id
|
|
|
- LEFT JOIN ctop_kuaishou_report_daily_material t5 ON t1.`code` = t5.signature
|
|
|
+ LEFT JOIN ctop_kuaishou_report_daily_material t5 ON t1.`code` = t5.signature
|
|
|
WHERE t2.parent_id = 60155
|
|
|
GROUP BY t1.user_id
|
|
|
) k1 ON k1.user_id =k.user_id
|
|
@@ -550,19 +562,23 @@
|
|
|
SELECT
|
|
|
t1.user_id,t4.signature
|
|
|
FROM ctop_material_tag_info t1
|
|
|
- LEFT JOIN ctop_tag_info t2 ON t2.id = t1.tag_id
|
|
|
+ LEFT JOIN ctop_tag_info t2 ON t2.id = t1.tag_id
|
|
|
INNER JOIN
|
|
|
(
|
|
|
- SELECT signature FROM ctop_kuaishou_video_get
|
|
|
- WHERE stat_date >= #{startTime}
|
|
|
- AND stat_date <= concat(#{endTime},' 23:59:59')
|
|
|
+ SELECT signature FROM ctop_kuaishou_video_get
|
|
|
+ WHERE stat_date >= #{startTime}
|
|
|
+ AND stat_date <= concat(#{endTime},' 23:59:59')
|
|
|
GROUP BY signature
|
|
|
) t4 ON t4.signature= t1.`code`
|
|
|
INNER JOIN(
|
|
|
SELECT tt1.id,tt3.role_name,tt1.realname FROM sys_user tt1
|
|
|
LEFT JOIN sys_user_role tt2 ON tt1.id = tt2.user_id
|
|
|
LEFT JOIN sys_role tt3 ON tt2.role_id = tt3.id
|
|
|
+ LEFT JOIN user_company tt4 ON tt1.id = tt4.user_id
|
|
|
WHERE 1=1
|
|
|
+ <if test="companyId!=null">
|
|
|
+ AND tt4.company_id = #{companyId}
|
|
|
+ </if>
|
|
|
<if test="realname!=null">
|
|
|
and tt1.realname LIKE CONCAT('%',#{realname},'%')
|
|
|
</if>
|
|
@@ -583,19 +599,23 @@
|
|
|
SELECT
|
|
|
t1.user_id, SUM(t5.charge) 'zhizuo_charge'
|
|
|
FROM ctop_material_tag_info t1
|
|
|
- LEFT JOIN ctop_tag_info t2 ON t2.id = t1.tag_id
|
|
|
+ LEFT JOIN ctop_tag_info t2 ON t2.id = t1.tag_id
|
|
|
INNER JOIN
|
|
|
(
|
|
|
- SELECT signature FROM ctop_kuaishou_video_get
|
|
|
- WHERE stat_date >= #{startTime}
|
|
|
- AND stat_date <= concat(#{endTime},' 23:59:59')
|
|
|
+ SELECT signature FROM ctop_kuaishou_video_get
|
|
|
+ WHERE stat_date >= #{startTime}
|
|
|
+ AND stat_date <= concat(#{endTime},' 23:59:59')
|
|
|
GROUP BY signature
|
|
|
) t4 ON t4.signature= t1.`code`
|
|
|
INNER JOIN(
|
|
|
SELECT tt1.id,tt3.role_name,tt1.realname FROM sys_user tt1
|
|
|
LEFT JOIN sys_user_role tt2 ON tt1.id = tt2.user_id
|
|
|
LEFT JOIN sys_role tt3 ON tt2.role_id = tt3.id
|
|
|
+ LEFT JOIN user_company tt4 ON tt1.id = tt4.user_id
|
|
|
WHERE 1=1
|
|
|
+ <if test="companyId!=null">
|
|
|
+ AND tt4.company_id = #{companyId}
|
|
|
+ </if>
|
|
|
<if test="realname!=null">
|
|
|
and tt1.realname LIKE CONCAT('%',#{realname},'%')
|
|
|
</if>
|
|
@@ -606,7 +626,7 @@
|
|
|
AND tt3.role_code in ('clip','shot','plan')
|
|
|
</if>
|
|
|
) t3 ON t3.id = t1.user_id
|
|
|
- LEFT JOIN ctop_kuaishou_report_daily_material t5 ON t1.`code` = t5.signature
|
|
|
+ LEFT JOIN ctop_kuaishou_report_daily_material t5 ON t1.`code` = t5.signature
|
|
|
WHERE t2.parent_id = 60156
|
|
|
GROUP BY t1.user_id
|
|
|
)k3 ON k3.user_id =k.user_id
|
|
@@ -615,19 +635,23 @@
|
|
|
SELECT
|
|
|
t1.user_id,t4.signature
|
|
|
FROM ctop_material_tag_info t1
|
|
|
- LEFT JOIN ctop_tag_info t2 ON t2.id = t1.tag_id
|
|
|
+ LEFT JOIN ctop_tag_info t2 ON t2.id = t1.tag_id
|
|
|
INNER JOIN
|
|
|
(
|
|
|
- SELECT signature FROM ctop_kuaishou_video_get
|
|
|
- WHERE stat_date >= #{startTime}
|
|
|
- AND stat_date <= concat(#{endTime},' 23:59:59')
|
|
|
+ SELECT signature FROM ctop_kuaishou_video_get
|
|
|
+ WHERE stat_date >= #{startTime}
|
|
|
+ AND stat_date <= concat(#{endTime},' 23:59:59')
|
|
|
GROUP BY signature
|
|
|
) t4 ON t4.signature= t1.`code`
|
|
|
INNER JOIN(
|
|
|
SELECT tt1.id,tt3.role_name,tt1.realname FROM sys_user tt1
|
|
|
LEFT JOIN sys_user_role tt2 ON tt1.id = tt2.user_id
|
|
|
LEFT JOIN sys_role tt3 ON tt2.role_id = tt3.id
|
|
|
+ LEFT JOIN user_company tt4 ON tt1.id = tt4.user_id
|
|
|
WHERE 1=1
|
|
|
+ <if test="companyId!=null">
|
|
|
+ AND tt4.company_id = #{companyId}
|
|
|
+ </if>
|
|
|
<if test="realname!=null">
|
|
|
and tt1.realname LIKE CONCAT('%',#{realname},'%')
|
|
|
</if>
|
|
@@ -638,7 +662,7 @@
|
|
|
AND tt3.role_code in ('clip','shot','plan')
|
|
|
</if>
|
|
|
) t3 ON t3.id = t1.user_id
|
|
|
- WHERE t2.parent_id = 60156
|
|
|
+ WHERE t2.parent_id = 60156
|
|
|
GROUP BY t1.user_id,t1.`code`
|
|
|
) t
|
|
|
GROUP BY user_id
|
|
@@ -669,19 +693,23 @@
|
|
|
t3.realname,
|
|
|
t3.role_name
|
|
|
FROM ctop_material_tag_info t1
|
|
|
- LEFT JOIN ctop_tag_info t2 ON t2.id = t1.tag_id
|
|
|
+ LEFT JOIN ctop_tag_info t2 ON t2.id = t1.tag_id
|
|
|
INNER JOIN
|
|
|
(
|
|
|
- SELECT signature FROM ctop_kuaishou_video_get
|
|
|
- WHERE stat_date >= #{startTime}
|
|
|
- AND stat_date <= concat(#{endTime},' 23:59:59')
|
|
|
+ SELECT signature FROM ctop_kuaishou_video_get
|
|
|
+ WHERE stat_date >= #{startTime}
|
|
|
+ AND stat_date <= concat(#{endTime},' 23:59:59')
|
|
|
GROUP BY signature
|
|
|
) t4 ON t4.signature= t1.`code`
|
|
|
INNER JOIN(
|
|
|
SELECT tt1.id,tt3.role_name,tt1.realname FROM sys_user tt1
|
|
|
LEFT JOIN sys_user_role tt2 ON tt1.id = tt2.user_id
|
|
|
LEFT JOIN sys_role tt3 ON tt2.role_id = tt3.id
|
|
|
+ LEFT JOIN user_company tt4 ON tt1.id = tt4.user_id
|
|
|
WHERE 1=1
|
|
|
+ <if test="companyId!=null">
|
|
|
+ AND tt4.company_id = #{companyId}
|
|
|
+ </if>
|
|
|
<if test="realname!=null">
|
|
|
and tt1.realname LIKE CONCAT('%',#{realname},'%')
|
|
|
</if>
|
|
@@ -700,12 +728,12 @@
|
|
|
SELECT
|
|
|
t1.user_id, SUM(t5.charge) 'zhenren_charge'
|
|
|
FROM ctop_material_tag_info t1
|
|
|
- LEFT JOIN ctop_tag_info t2 ON t2.id = t1.tag_id
|
|
|
+ LEFT JOIN ctop_tag_info t2 ON t2.id = t1.tag_id
|
|
|
INNER JOIN
|
|
|
(
|
|
|
- SELECT signature FROM ctop_kuaishou_video_get
|
|
|
- WHERE stat_date >= #{startTime}
|
|
|
- AND stat_date <= concat(#{endTime},' 23:59:59')
|
|
|
+ SELECT signature FROM ctop_kuaishou_video_get
|
|
|
+ WHERE stat_date >= #{startTime}
|
|
|
+ AND stat_date <= concat(#{endTime},' 23:59:59')
|
|
|
GROUP BY signature
|
|
|
) t4 ON t4.signature= t1.`code`
|
|
|
INNER JOIN
|
|
@@ -713,7 +741,11 @@
|
|
|
SELECT tt1.id,tt3.role_name,tt1.realname FROM sys_user tt1
|
|
|
LEFT JOIN sys_user_role tt2 ON tt1.id = tt2.user_id
|
|
|
LEFT JOIN sys_role tt3 ON tt2.role_id = tt3.id
|
|
|
+ LEFT JOIN user_company tt4 ON tt1.id = tt4.user_id
|
|
|
WHERE 1=1
|
|
|
+ <if test="companyId!=null">
|
|
|
+ AND tt4.company_id = #{companyId}
|
|
|
+ </if>
|
|
|
<if test="realname!=null">
|
|
|
and tt1.realname LIKE CONCAT('%',#{realname},'%')
|
|
|
</if>
|
|
@@ -724,7 +756,7 @@
|
|
|
AND tt3.role_code in ('clip','shot','plan')
|
|
|
</if>
|
|
|
) t3 ON t3.id = t1.user_id
|
|
|
- LEFT JOIN ctop_kuaishou_report_daily_material t5 ON t1.`code` = t5.signature
|
|
|
+ LEFT JOIN ctop_kuaishou_report_daily_material t5 ON t1.`code` = t5.signature
|
|
|
WHERE t2.parent_id = 60155
|
|
|
GROUP BY t1.user_id
|
|
|
)k1 ON k1.user_id =k.user_id
|
|
@@ -733,19 +765,23 @@
|
|
|
SELECT
|
|
|
t1.user_id,t4.signature
|
|
|
FROM ctop_material_tag_info t1
|
|
|
- LEFT JOIN ctop_tag_info t2 ON t2.id = t1.tag_id
|
|
|
+ LEFT JOIN ctop_tag_info t2 ON t2.id = t1.tag_id
|
|
|
INNER JOIN
|
|
|
(
|
|
|
- SELECT signature FROM ctop_kuaishou_video_get
|
|
|
- WHERE stat_date >= #{startTime}
|
|
|
- AND stat_date <= concat(#{endTime},' 23:59:59')
|
|
|
+ SELECT signature FROM ctop_kuaishou_video_get
|
|
|
+ WHERE stat_date >= #{startTime}
|
|
|
+ AND stat_date <= concat(#{endTime},' 23:59:59')
|
|
|
GROUP BY signature
|
|
|
) t4 ON t4.signature= t1.`code`
|
|
|
INNER JOIN(
|
|
|
SELECT tt1.id,tt3.role_name,tt1.realname FROM sys_user tt1
|
|
|
LEFT JOIN sys_user_role tt2 ON tt1.id = tt2.user_id
|
|
|
LEFT JOIN sys_role tt3 ON tt2.role_id = tt3.id
|
|
|
+ LEFT JOIN user_company tt4 ON tt1.id = tt4.user_id
|
|
|
WHERE 1=1
|
|
|
+ <if test="companyId!=null">
|
|
|
+ AND tt4.company_id = #{companyId}
|
|
|
+ </if>
|
|
|
<if test="realname!=null">
|
|
|
and tt1.realname LIKE CONCAT('%',#{realname},'%')
|
|
|
</if>
|
|
@@ -766,19 +802,23 @@
|
|
|
SELECT
|
|
|
t1.user_id, SUM(t5.charge) 'zhizuo_charge'
|
|
|
FROM ctop_material_tag_info t1
|
|
|
- LEFT JOIN ctop_tag_info t2 ON t2.id = t1.tag_id
|
|
|
+ LEFT JOIN ctop_tag_info t2 ON t2.id = t1.tag_id
|
|
|
INNER JOIN
|
|
|
(
|
|
|
- SELECT signature FROM ctop_kuaishou_video_get
|
|
|
- WHERE stat_date >= #{startTime}
|
|
|
- AND stat_date <= concat(#{endTime},' 23:59:59')
|
|
|
+ SELECT signature FROM ctop_kuaishou_video_get
|
|
|
+ WHERE stat_date >= #{startTime}
|
|
|
+ AND stat_date <= concat(#{endTime},' 23:59:59')
|
|
|
GROUP BY signature
|
|
|
) t4 ON t4.signature= t1.`code`
|
|
|
INNER JOIN(
|
|
|
SELECT tt1.id,tt3.role_name,tt1.realname FROM sys_user tt1
|
|
|
LEFT JOIN sys_user_role tt2 ON tt1.id = tt2.user_id
|
|
|
LEFT JOIN sys_role tt3 ON tt2.role_id = tt3.id
|
|
|
+ LEFT JOIN user_company tt4 ON tt1.id = tt4.user_id
|
|
|
WHERE 1=1
|
|
|
+ <if test="companyId!=null">
|
|
|
+ AND tt4.company_id = #{companyId}
|
|
|
+ </if>
|
|
|
<if test="realname!=null">
|
|
|
and tt1.realname LIKE CONCAT('%',#{realname},'%')
|
|
|
</if>
|
|
@@ -789,7 +829,7 @@
|
|
|
AND tt3.role_code in ('clip','shot','plan')
|
|
|
</if>
|
|
|
) t3 ON t3.id = t1.user_id
|
|
|
- LEFT JOIN ctop_kuaishou_report_daily_material t5 ON t1.`code` = t5.signature
|
|
|
+ LEFT JOIN ctop_kuaishou_report_daily_material t5 ON t1.`code` = t5.signature
|
|
|
WHERE t2.parent_id = 60156
|
|
|
GROUP BY t1.user_id
|
|
|
)k3 ON k3.user_id =k.user_id
|
|
@@ -798,19 +838,23 @@
|
|
|
SELECT
|
|
|
t1.user_id,t4.signature
|
|
|
FROM ctop_material_tag_info t1
|
|
|
- LEFT JOIN ctop_tag_info t2 ON t2.id = t1.tag_id
|
|
|
+ LEFT JOIN ctop_tag_info t2 ON t2.id = t1.tag_id
|
|
|
INNER JOIN
|
|
|
(
|
|
|
- SELECT signature FROM ctop_kuaishou_video_get
|
|
|
- WHERE stat_date >= #{startTime}
|
|
|
- AND stat_date <= concat(#{endTime},' 23:59:59')
|
|
|
+ SELECT signature FROM ctop_kuaishou_video_get
|
|
|
+ WHERE stat_date >= #{startTime}
|
|
|
+ AND stat_date <= concat(#{endTime},' 23:59:59')
|
|
|
GROUP BY signature
|
|
|
) t4 ON t4.signature= t1.`code`
|
|
|
INNER JOIN(
|
|
|
SELECT tt1.id,tt3.role_name,tt1.realname FROM sys_user tt1
|
|
|
LEFT JOIN sys_user_role tt2 ON tt1.id = tt2.user_id
|
|
|
LEFT JOIN sys_role tt3 ON tt2.role_id = tt3.id
|
|
|
+ LEFT JOIN user_company tt4 ON tt1.id = tt4.user_id
|
|
|
WHERE 1=1
|
|
|
+ <if test="companyId!=null">
|
|
|
+ AND tt4.company_id = #{companyId}
|
|
|
+ </if>
|
|
|
<if test="realname!=null">
|
|
|
and tt1.realname LIKE CONCAT('%',#{realname},'%')
|
|
|
</if>
|