|
@@ -53,6 +53,50 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
+ <select id="getTotalByMap" resultType="java.lang.Long">
|
|
|
|
+ SELECT
|
|
|
|
+ count(1)
|
|
|
|
+ FROM
|
|
|
|
+ (select
|
|
|
|
+ t1.signature
|
|
|
|
+ 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"
|
|
|
|
+ open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="startDate !=null and startDate != ''">
|
|
|
|
+ AND t1.stat_date >= #{startDate}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="endDate !=null and endDate != ''">
|
|
|
|
+ AND t1.stat_date <= #{endDate}
|
|
|
|
+ </if>
|
|
|
|
+ GROUP BY t1.signature
|
|
|
|
+ ) 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}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="planId !=null and planId != ''">
|
|
|
|
+ AND t2.plan_id = #{planId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="shotId !=null and shotId != ''">
|
|
|
|
+ AND t2.shot_id = #{shotId}
|
|
|
|
+ </if>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+
|
|
<select id="queryVideoReportBy" resultType="com.alibaba.fastjson.JSONObject">
|
|
<select id="queryVideoReportBy" resultType="com.alibaba.fastjson.JSONObject">
|
|
SELECT * from (SELECT
|
|
SELECT * from (SELECT
|
|
t1.signature,
|
|
t1.signature,
|
|
@@ -150,4 +194,5 @@
|
|
)
|
|
)
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+
|
|
</mapper>
|
|
</mapper>
|