|
@@ -77,25 +77,31 @@
|
|
|
order by t1.stat_datetime desc
|
|
|
</select>
|
|
|
<select id="getBytedanceSevenDayCost" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
- select project_name,
|
|
|
- cast(material_id as char) as 'material_id',
|
|
|
- material_name,
|
|
|
- date_format(first_cost_time, '%Y-%m-%d') as 'first_cost_time',
|
|
|
- (diff_day + 1) as diff_day,
|
|
|
- seven_day_cost
|
|
|
- from application.bytedance_material_seven_day_cost
|
|
|
+ select t1.project_name,
|
|
|
+ cast(t1.material_id as char) as 'material_id',
|
|
|
+ t1.material_name,
|
|
|
+ date_format(t1.first_cost_time, '%Y-%m-%d') as 'first_cost_time',
|
|
|
+ (t1.diff_day + 1) as diff_day,
|
|
|
+ t1.seven_day_cost as seven_day_cost,
|
|
|
+ t2.leader_name as leader_name,
|
|
|
+ t2.clip_name as clip_name,
|
|
|
+ t2.shot_name as shot_name,
|
|
|
+ t2.plan_name as plan_name
|
|
|
+ from application.bytedance_material_seven_day_cost t1
|
|
|
+ left join `application`.app_bytedance_material_info t2
|
|
|
+ on t1.md5 = t2.material_id
|
|
|
where 1 = 1
|
|
|
<if test="projectId != null ">
|
|
|
- and project_id = #{projectId}
|
|
|
+ and t1.project_id = #{projectId}
|
|
|
</if>
|
|
|
<if test="startDate != null ">
|
|
|
- and first_cost_time >= #{startDate}
|
|
|
+ and t1.first_cost_time >= #{startDate}
|
|
|
</if>
|
|
|
<if test="endDate != null ">
|
|
|
- and first_cost_time <= #{endDate}
|
|
|
+ and t1.first_cost_time <= #{endDate}
|
|
|
</if>
|
|
|
- and media_id = 1
|
|
|
- order by seven_day_cost desc
|
|
|
+ and t1.media_id = 1
|
|
|
+ order by t1.seven_day_cost desc
|
|
|
|
|
|
</select>
|
|
|
</mapper>
|