|
@@ -3,14 +3,21 @@
|
|
|
<mapper namespace="cn.com.ctop.kuaishou.modules.report.mapper.KsVideoReportMapper">
|
|
|
|
|
|
<select id="getKuaiShouVideoReportByMap" resultType="com.alibaba.fastjson.JSONObject" parameterType="map">
|
|
|
- select t3.* from (
|
|
|
SELECT
|
|
|
- ${filed}
|
|
|
+ t1.*,
|
|
|
+ t2.clip_name as clip,
|
|
|
+ t2.plan_name as plan,
|
|
|
+ t2.shot_name as shot,
|
|
|
+ t2.design_team_leader_name as designLeader,
|
|
|
+ t2.video_name as materialName,
|
|
|
+ t2.cover_url as coverUrl,
|
|
|
+ t2.url as url ,
|
|
|
+ t2.channel_name AS channel,
|
|
|
+ t2.state_date as createTime
|
|
|
FROM
|
|
|
- ctop_etl_kuaishou_account_material_report_daily t1
|
|
|
- LEFT JOIN ctop_etl_kuaishou_video_info t2 ON t1.signature = t2.video_code
|
|
|
- WHERE
|
|
|
- 1 = 1
|
|
|
+ (select ${filed}
|
|
|
+ from ctop_etl_kuaishou_account_material_report_daily t1
|
|
|
+ where 1 = 1
|
|
|
<if test="accountIds !=null and accountIds != ''">
|
|
|
and t1.account_id in
|
|
|
<foreach item="item" index="index" collection="accountIds"
|
|
@@ -24,8 +31,15 @@
|
|
|
<if test="endDate !=null and endDate != ''">
|
|
|
AND t1.stat_date <= #{endDate}
|
|
|
</if>
|
|
|
- <if test="designTeamLeaderId !=null and designTeamLeaderId != ''">
|
|
|
- AND t2.design_team_leader_id = #{designTeamLeaderId}
|
|
|
+ GROUP BY t1.signature
|
|
|
+ ORDER BY ${target} ${order}
|
|
|
+ ) t1
|
|
|
+ LEFT JOIN ctop_etl_kuaishou_video_info t2
|
|
|
+ ON t1.signature = t2.video_code
|
|
|
+ WHERE
|
|
|
+ 1 = 1
|
|
|
+ <if test="leaderId !=null and leaderId != ''">
|
|
|
+ AND t2.design_team_leader_id = #{leaderId}
|
|
|
</if>
|
|
|
<if test="clipId !=null and clipId != ''">
|
|
|
AND t2.clip_id = #{clipId}
|
|
@@ -36,9 +50,6 @@
|
|
|
<if test="shotId !=null and shotId != ''">
|
|
|
AND t2.shot_id = #{shotId}
|
|
|
</if>
|
|
|
- GROUP BY t1.signature
|
|
|
- ) t3
|
|
|
- ORDER BY #{target} #{order}
|
|
|
</select>
|
|
|
|
|
|
|
|
@@ -120,4 +131,23 @@
|
|
|
order by t1.stat_date desc
|
|
|
</select>
|
|
|
|
|
|
+ <select id="getDesignList" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
+ SELECT
|
|
|
+ t1.user_id AS 'userId',
|
|
|
+ LEFT (t1.company_name, 2) AS 'companyName',
|
|
|
+ t3.role_name AS 'ruleName',
|
|
|
+ t1.user_name AS 'userName'
|
|
|
+ FROM
|
|
|
+ user_company t1
|
|
|
+ LEFT JOIN sys_user_role t2 ON t1.user_id = t2.user_id
|
|
|
+ LEFT JOIN sys_role t3 ON t2.role_id = t3.id
|
|
|
+ WHERE
|
|
|
+ t3.role_code IN (
|
|
|
+ 'plan',
|
|
|
+ 'shot',
|
|
|
+ 'clip',
|
|
|
+ 'designTeamLeader'
|
|
|
+ )
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|