|
@@ -500,12 +500,12 @@
|
|
<!-- 头条根据plan_id获取视频总消耗 -->
|
|
<!-- 头条根据plan_id获取视频总消耗 -->
|
|
<select id="toutiaoGetTotalCostByPlanId" resultType="java.math.BigDecimal">
|
|
<select id="toutiaoGetTotalCostByPlanId" resultType="java.math.BigDecimal">
|
|
select
|
|
select
|
|
- sum(a.charge) as charge
|
|
|
|
- ctop_bytedance_report_creative_daily a
|
|
|
|
|
|
+ sum(a.cost) as charge
|
|
|
|
+ from ctop_bytedance_report_creative_daily a
|
|
left join ctop_bytedance_creative b on a.creative_id = b.id
|
|
left join ctop_bytedance_creative b on a.creative_id = b.id
|
|
left join ctop_bytedance_video_info c on b.video_id = c.id
|
|
left join ctop_bytedance_video_info c on b.video_id = c.id
|
|
left join ctop_material_info d on c.signature = d.code
|
|
left join ctop_material_info d on c.signature = d.code
|
|
- left join ctop_material_ascription e on on d.id = e.material_id
|
|
|
|
|
|
+ left join ctop_material_ascription e on d.id = e.material_id
|
|
where c.signature is not null and d.id is not null
|
|
where c.signature is not null and d.id is not null
|
|
and DATE_FORMAT(d.create_time,'%Y-%m-%d') >= #{startDate}
|
|
and DATE_FORMAT(d.create_time,'%Y-%m-%d') >= #{startDate}
|
|
and DATE_FORMAT(d.create_time,'%Y-%m-%d') <= #{endDate}
|
|
and DATE_FORMAT(d.create_time,'%Y-%m-%d') <= #{endDate}
|
|
@@ -515,12 +515,12 @@
|
|
<!-- 头条根据clip_id获取视频总消耗 -->
|
|
<!-- 头条根据clip_id获取视频总消耗 -->
|
|
<select id="toutiaoGetTotalCostByClipId" resultType="java.math.BigDecimal">
|
|
<select id="toutiaoGetTotalCostByClipId" resultType="java.math.BigDecimal">
|
|
select
|
|
select
|
|
- sum(a.charge) as charge
|
|
|
|
- ctop_bytedance_report_creative_daily a
|
|
|
|
|
|
+ sum(a.cost) as charge
|
|
|
|
+ from ctop_bytedance_report_creative_daily a
|
|
left join ctop_bytedance_creative b on a.creative_id = b.id
|
|
left join ctop_bytedance_creative b on a.creative_id = b.id
|
|
left join ctop_bytedance_video_info c on b.video_id = c.id
|
|
left join ctop_bytedance_video_info c on b.video_id = c.id
|
|
left join ctop_material_info d on c.signature = d.code
|
|
left join ctop_material_info d on c.signature = d.code
|
|
- left join ctop_material_ascription e on on d.id = e.material_id
|
|
|
|
|
|
+ left join ctop_material_ascription e on d.id = e.material_id
|
|
where c.signature is not null and d.id is not null
|
|
where c.signature is not null and d.id is not null
|
|
and DATE_FORMAT(d.create_time,'%Y-%m-%d') >= #{startDate}
|
|
and DATE_FORMAT(d.create_time,'%Y-%m-%d') >= #{startDate}
|
|
and DATE_FORMAT(d.create_time,'%Y-%m-%d') <= #{endDate}
|
|
and DATE_FORMAT(d.create_time,'%Y-%m-%d') <= #{endDate}
|
|
@@ -530,12 +530,12 @@
|
|
<!-- 头条根据shot_id获取视频总消耗 -->
|
|
<!-- 头条根据shot_id获取视频总消耗 -->
|
|
<select id="toutiaoGetTotalCostByShotId" resultType="java.math.BigDecimal">
|
|
<select id="toutiaoGetTotalCostByShotId" resultType="java.math.BigDecimal">
|
|
select
|
|
select
|
|
- sum(a.charge) as charge
|
|
|
|
- ctop_bytedance_report_creative_daily a
|
|
|
|
|
|
+ sum(a.cost) as charge
|
|
|
|
+ from ctop_bytedance_report_creative_daily a
|
|
left join ctop_bytedance_creative b on a.creative_id = b.id
|
|
left join ctop_bytedance_creative b on a.creative_id = b.id
|
|
left join ctop_bytedance_video_info c on b.video_id = c.id
|
|
left join ctop_bytedance_video_info c on b.video_id = c.id
|
|
left join ctop_material_info d on c.signature = d.code
|
|
left join ctop_material_info d on c.signature = d.code
|
|
- left join ctop_material_ascription e on on d.id = e.material_id
|
|
|
|
|
|
+ left join ctop_material_ascription e on d.id = e.material_id
|
|
where c.signature is not null and d.id is not null
|
|
where c.signature is not null and d.id is not null
|
|
and DATE_FORMAT(d.create_time,'%Y-%m-%d') >= #{startDate}
|
|
and DATE_FORMAT(d.create_time,'%Y-%m-%d') >= #{startDate}
|
|
and DATE_FORMAT(d.create_time,'%Y-%m-%d') <= #{endDate}
|
|
and DATE_FORMAT(d.create_time,'%Y-%m-%d') <= #{endDate}
|
|
@@ -787,7 +787,7 @@
|
|
AND
|
|
AND
|
|
dailiAccount.stat_date >= #{startDate}
|
|
dailiAccount.stat_date >= #{startDate}
|
|
AND
|
|
AND
|
|
- dailiAccount.stat_date < #{endDate}
|
|
|
|
|
|
+ dailiAccount.stat_date <= #{endDate}
|
|
AND
|
|
AND
|
|
allocation.media_id = #{appType}
|
|
allocation.media_id = #{appType}
|
|
</select>
|
|
</select>
|