|
@@ -134,6 +134,18 @@
|
|
group by video_signature
|
|
group by video_signature
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <select id="getToutiaoSumChargeBySignature" resultType="java.math.BigDecimal">
|
|
|
|
+ select
|
|
|
|
+ sum(a.cost) as charge
|
|
|
|
+ from
|
|
|
|
+ ctop_bytedance_report_creative_daily a
|
|
|
|
+ where a.signature = #{signature}
|
|
|
|
+ and
|
|
|
|
+ DATE_FORMAT(a.stat_datetime,'%Y-%m-%d') >= #{startDate}
|
|
|
|
+ and
|
|
|
|
+ DATE_FORMAT(a.stat_datetime,'%Y-%m-%d') <= #{endDate}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
<select id="getSumChargeBySignature" resultType="java.math.BigDecimal">
|
|
<select id="getSumChargeBySignature" resultType="java.math.BigDecimal">
|
|
select
|
|
select
|
|
sum(a.charge) as charge
|
|
sum(a.charge) as charge
|
|
@@ -146,6 +158,7 @@
|
|
DATE_FORMAT(a.stat_date,'%Y-%m-%d') <= #{endDate}
|
|
DATE_FORMAT(a.stat_date,'%Y-%m-%d') <= #{endDate}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+
|
|
<!-- 根据shot_id获取视频总消耗 -->
|
|
<!-- 根据shot_id获取视频总消耗 -->
|
|
<select id="getTotalCostByShotId" resultType="java.math.BigDecimal">
|
|
<select id="getTotalCostByShotId" resultType="java.math.BigDecimal">
|
|
select
|
|
select
|
|
@@ -951,7 +964,7 @@
|
|
from
|
|
from
|
|
ctop_user_efficient_video_map
|
|
ctop_user_efficient_video_map
|
|
where user_id = #{userId}
|
|
where user_id = #{userId}
|
|
- and role_id = #{roleId}
|
|
|
|
|
|
+ <!-- and role_id = #{roleId} -->
|
|
and app_type = #{appType}
|
|
and app_type = #{appType}
|
|
and calc_date <= #{endDate}
|
|
and calc_date <= #{endDate}
|
|
and calc_date >= #{startDate}
|
|
and calc_date >= #{startDate}
|
|
@@ -964,10 +977,14 @@
|
|
i.code as code,
|
|
i.code as code,
|
|
i.url as url,
|
|
i.url as url,
|
|
i.material_name as materialName,
|
|
i.material_name as materialName,
|
|
- i.watermark_material_name as watermarkMaterialName
|
|
|
|
|
|
+ i.watermark_material_name as watermarkMaterialName,
|
|
|
|
+ m.role_id as videoRoleCode, <!-- 拍摄时候担任的角色 -->
|
|
|
|
+ r.role_name as originRoleName <!-- 原本的角色 -->
|
|
from
|
|
from
|
|
ctop_user_efficient_video_map m
|
|
ctop_user_efficient_video_map m
|
|
- left join ctop_material_info i on m.efficient_video_signature = i.code
|
|
|
|
|
|
+ left join (select id,code,url,material_name,watermark_material_name from ctop_material_info group by code) i on m.efficient_video_signature = i.code
|
|
|
|
+ left join sys_user_role sr on m.user_id = sr.user_id
|
|
|
|
+ left join sys_role r on sr.role_id = r.id
|
|
where
|
|
where
|
|
m.user_id = #{userId} and
|
|
m.user_id = #{userId} and
|
|
m.app_type =#{appType} and
|
|
m.app_type =#{appType} and
|
|
@@ -982,10 +999,14 @@
|
|
i.code as code,
|
|
i.code as code,
|
|
i.url as url,
|
|
i.url as url,
|
|
i.material_name as materialName,
|
|
i.material_name as materialName,
|
|
- i.watermark_material_name as watermarkMaterialName
|
|
|
|
|
|
+ i.watermark_material_name as watermarkMaterialName,
|
|
|
|
+ m.role_id as videoRoleCode, <!-- 拍摄时候担任的角色 -->
|
|
|
|
+ r.role_name as originRoleName <!-- 原本的角色 -->
|
|
from
|
|
from
|
|
ctop_user_efficient_video_map m
|
|
ctop_user_efficient_video_map m
|
|
left join (select id,code,url,material_name,watermark_material_name from ctop_material_info group by code) i on m.efficient_video_signature = i.code
|
|
left join (select id,code,url,material_name,watermark_material_name from ctop_material_info group by code) i on m.efficient_video_signature = i.code
|
|
|
|
+ left join sys_user_role sr on m.user_id = sr.user_id
|
|
|
|
+ left join sys_role r on sr.role_id = r.id
|
|
where
|
|
where
|
|
m.user_id = #{userId} and
|
|
m.user_id = #{userId} and
|
|
m.app_type =#{appType} and
|
|
m.app_type =#{appType} and
|
|
@@ -1143,10 +1164,19 @@
|
|
i.code as code,
|
|
i.code as code,
|
|
i.url as url,
|
|
i.url as url,
|
|
i.material_name as materialName,
|
|
i.material_name as materialName,
|
|
- i.watermark_material_name as watermarkMaterialName
|
|
|
|
|
|
+ i.watermark_material_name as watermarkMaterialName,
|
|
|
|
+ m.role_id as videoRoleCode, <!-- 拍摄时候担任的角色 -->
|
|
|
|
+ r.role_name as originRoleName <!-- 原本的角色 -->
|
|
from
|
|
from
|
|
ctop_user_video_map m
|
|
ctop_user_video_map m
|
|
- left join ctop_material_info i on m.video_signature = i.code
|
|
|
|
|
|
+ left join (
|
|
|
|
+ select
|
|
|
|
+ id,code,url,material_name,watermark_material_name
|
|
|
|
+ from
|
|
|
|
+ ctop_material_info group by code
|
|
|
|
+ ) i on m.video_signature = i.code
|
|
|
|
+ left join sys_user_role sr on m.user_id = sr.user_id
|
|
|
|
+ left join sys_role r on sr.role_id = r.id
|
|
where
|
|
where
|
|
m.user_id = #{userId} and
|
|
m.user_id = #{userId} and
|
|
m.calc_date >= #{startDate} and
|
|
m.calc_date >= #{startDate} and
|