|
@@ -339,12 +339,12 @@
|
|
resultType="cn.com.ctop.userefficientvideomap.entity.DesignMaterialInfo"> <!-- 素材、素材跑量、封面点击数、封面曝光数、行为数 -->
|
|
resultType="cn.com.ctop.userefficientvideomap.entity.DesignMaterialInfo"> <!-- 素材、素材跑量、封面点击数、封面曝光数、行为数 -->
|
|
select
|
|
select
|
|
b.id as id,
|
|
b.id as id,
|
|
- b.url as videoUrl, <!-- 素材url -->
|
|
|
|
- sum(a.photo_show) as pageExposureCount, <!-- 封面曝光数 -->
|
|
|
|
- sum(a.photo_click) as pageClickCount, <!-- 封面点击数 -->
|
|
|
|
- sum(a.aclick) as materialExposureCount, <!-- 素材曝光数 -->
|
|
|
|
- sum(a.bclick) as behaviorCount,<!-- 行为数 -->
|
|
|
|
- sum(a.charge) as totalCost <!-- 素材跑量 -->
|
|
|
|
|
|
+ b.url as videoUrl,
|
|
|
|
+ sum(a.photo_show) as pageExposureCount,
|
|
|
|
+ sum(a.photo_click) as pageClickCount,
|
|
|
|
+ sum(a.aclick) as materialExposureCount,
|
|
|
|
+ sum(a.bclick) as behaviorCount,
|
|
|
|
+ sum(a.charge) as totalCost
|
|
from
|
|
from
|
|
ctop_material_info b
|
|
ctop_material_info b
|
|
left join ctop_material_ascription c on b.id = c.material_id
|
|
left join ctop_material_ascription c on b.id = c.material_id
|
|
@@ -371,7 +371,6 @@
|
|
resultType="cn.com.ctop.userefficientvideomap.entity.DesignMaterialInfo">
|
|
resultType="cn.com.ctop.userefficientvideomap.entity.DesignMaterialInfo">
|
|
select
|
|
select
|
|
a.account_id as accountId,
|
|
a.account_id as accountId,
|
|
- <!-- a.account_name as accountName, -->
|
|
|
|
'快手' as platform,
|
|
'快手' as platform,
|
|
sum(charge) as totalCost
|
|
sum(charge) as totalCost
|
|
from
|
|
from
|
|
@@ -456,9 +455,9 @@
|
|
select
|
|
select
|
|
user_id
|
|
user_id
|
|
from sys_user_role
|
|
from sys_user_role
|
|
- WHERE role_id = '8d3e2ed58bdedf17716f698ea674da27' <!-- 设计师 -->
|
|
|
|
|
|
+ WHERE role_id = '8d3e2ed58bdedf17716f698ea674da27'
|
|
)
|
|
)
|
|
- and b.parent_id = '4e939124a5f541c88838e49d2a3ea72b' <!-- 快手设计部 -->
|
|
|
|
|
|
+ and b.parent_id = '4e939124a5f541c88838e49d2a3ea72b'
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 获取快手编导列表 -->
|
|
<!-- 获取快手编导列表 -->
|
|
@@ -476,9 +475,9 @@
|
|
select
|
|
select
|
|
user_id
|
|
user_id
|
|
from sys_user_role
|
|
from sys_user_role
|
|
- WHERE role_id = '0214283aa16f943efbb149ea4bb18f18' <!-- 编导 -->
|
|
|
|
|
|
+ WHERE role_id = '0214283aa16f943efbb149ea4bb18f18'
|
|
)
|
|
)
|
|
- and b.parent_id = '4e939124a5f541c88838e49d2a3ea72b' <!-- 快手设计部 -->
|
|
|
|
|
|
+ and b.parent_id = '4e939124a5f541c88838e49d2a3ea72b'
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 获取快手拍摄列表 -->
|
|
<!-- 获取快手拍摄列表 -->
|
|
@@ -496,9 +495,9 @@
|
|
select
|
|
select
|
|
user_id
|
|
user_id
|
|
from sys_user_role
|
|
from sys_user_role
|
|
- WHERE role_id = '7bff9afed625aeeabca6bffe3c189183' <!-- 拍摄 -->
|
|
|
|
|
|
+ WHERE role_id = '7bff9afed625aeeabca6bffe3c189183'
|
|
)
|
|
)
|
|
- and b.parent_id = '4e939124a5f541c88838e49d2a3ea72b' <!-- 快手设计部 -->
|
|
|
|
|
|
+ and b.parent_id = '4e939124a5f541c88838e49d2a3ea72b'
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 获取快手剪辑列表 -->
|
|
<!-- 获取快手剪辑列表 -->
|
|
@@ -516,9 +515,9 @@
|
|
select
|
|
select
|
|
user_id
|
|
user_id
|
|
from sys_user_role
|
|
from sys_user_role
|
|
- WHERE role_id = 'f38d8d70cf7ec50d5357a749e4dbf8ee' <!-- 拍摄 -->
|
|
|
|
|
|
+ WHERE role_id = 'f38d8d70cf7ec50d5357a749e4dbf8ee'
|
|
)
|
|
)
|
|
- and b.parent_id = '4e939124a5f541c88838e49d2a3ea72b' <!-- 快手设计部 -->
|
|
|
|
|
|
+ and b.parent_id = '4e939124a5f541c88838e49d2a3ea72b'
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 根据部门id -->
|
|
<!-- 根据部门id -->
|
|
@@ -561,9 +560,9 @@
|
|
select
|
|
select
|
|
user_id
|
|
user_id
|
|
from sys_user_role
|
|
from sys_user_role
|
|
- WHERE role_id = '8d3e2ed58bdedf17716f698ea674da27' <!-- 设计师 -->
|
|
|
|
|
|
+ WHERE role_id = '8d3e2ed58bdedf17716f698ea674da27'
|
|
)
|
|
)
|
|
- and b.parent_id = '26c10ecb5e0d416bb01f8ff983f4588c' <!-- 头条设计部 -->
|
|
|
|
|
|
+ and b.parent_id = '26c10ecb5e0d416bb01f8ff983f4588c'
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 获取toutiao编导列表 -->
|
|
<!-- 获取toutiao编导列表 -->
|
|
@@ -581,9 +580,9 @@
|
|
select
|
|
select
|
|
user_id
|
|
user_id
|
|
from sys_user_role
|
|
from sys_user_role
|
|
- WHERE role_id = '0214283aa16f943efbb149ea4bb18f18' <!-- 编导 -->
|
|
|
|
|
|
+ WHERE role_id = '0214283aa16f943efbb149ea4bb18f18'
|
|
)
|
|
)
|
|
- and b.parent_id = '26c10ecb5e0d416bb01f8ff983f4588c' <!-- 头条设计部 -->
|
|
|
|
|
|
+ and b.parent_id = '26c10ecb5e0d416bb01f8ff983f4588c'
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 获取toutiao拍摄列表 -->
|
|
<!-- 获取toutiao拍摄列表 -->
|
|
@@ -601,9 +600,9 @@
|
|
select
|
|
select
|
|
user_id
|
|
user_id
|
|
from sys_user_role
|
|
from sys_user_role
|
|
- WHERE role_id = '7bff9afed625aeeabca6bffe3c189183' <!-- 拍摄 -->
|
|
|
|
|
|
+ WHERE role_id = '7bff9afed625aeeabca6bffe3c189183'
|
|
)
|
|
)
|
|
- and b.parent_id = '26c10ecb5e0d416bb01f8ff983f4588c' <!-- 头条设计部 -->
|
|
|
|
|
|
+ and b.parent_id = '26c10ecb5e0d416bb01f8ff983f4588c'
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 获取toutiao剪辑列表 -->
|
|
<!-- 获取toutiao剪辑列表 -->
|
|
@@ -621,16 +620,16 @@
|
|
select
|
|
select
|
|
user_id
|
|
user_id
|
|
from sys_user_role
|
|
from sys_user_role
|
|
- WHERE role_id = 'f38d8d70cf7ec50d5357a749e4dbf8ee' <!-- 拍摄 -->
|
|
|
|
|
|
+ WHERE role_id = 'f38d8d70cf7ec50d5357a749e4dbf8ee'
|
|
)
|
|
)
|
|
- and b.parent_id = '26c10ecb5e0d416bb01f8ff983f4588c' <!-- 头条设计部 -->
|
|
|
|
|
|
+ and b.parent_id = '26c10ecb5e0d416bb01f8ff983f4588c'
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 头条有效视频用户关系绑定 -->
|
|
<!-- 头条有效视频用户关系绑定 -->
|
|
<select id="getToutiaoUserVideoMap" resultType="cn.com.ctop.userefficientvideomap.entity.EffiVideoDTO">
|
|
<select id="getToutiaoUserVideoMap" resultType="cn.com.ctop.userefficientvideomap.entity.EffiVideoDTO">
|
|
select
|
|
select
|
|
c.signature as signature,
|
|
c.signature as signature,
|
|
- sum(a.cost) as charge, <!-- 总花费 -->
|
|
|
|
|
|
+ sum(a.cost) as charge,
|
|
f1.id as clipId,
|
|
f1.id as clipId,
|
|
f1.realname as clipName,
|
|
f1.realname as clipName,
|
|
f2.id as shotId,
|
|
f2.id as shotId,
|
|
@@ -914,7 +913,7 @@
|
|
left join sys_user u on ud.user_id = u.id
|
|
left join sys_user u on ud.user_id = u.id
|
|
left join sys_user_role ur on u.id = ur.user_id
|
|
left join sys_user_role ur on u.id = ur.user_id
|
|
left join sys_role r on ur.role_id = r.id
|
|
left join sys_role r on ur.role_id = r.id
|
|
- WHERE b.parent_id = '4e939124a5f541c88838e49d2a3ea72b' <!-- 快手设计部 -->
|
|
|
|
|
|
+ WHERE b.parent_id = '4e939124a5f541c88838e49d2a3ea72b'
|
|
and r.role_code in ('plan','clip','shot')
|
|
and r.role_code in ('plan','clip','shot')
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -931,7 +930,7 @@
|
|
left join sys_user u on ud.user_id = u.id
|
|
left join sys_user u on ud.user_id = u.id
|
|
left join sys_user_role ur on u.id = ur.user_id
|
|
left join sys_user_role ur on u.id = ur.user_id
|
|
left join sys_role r on ur.role_id = r.id
|
|
left join sys_role r on ur.role_id = r.id
|
|
- WHERE b.parent_id = '4e939124a5f541c88838e49d2a3ea72b' <!-- 快手设计部 -->
|
|
|
|
|
|
+ WHERE b.parent_id = '4e939124a5f541c88838e49d2a3ea72b'
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 获取北京头条设计部所有编导、剪辑、拍摄的信息 -->
|
|
<!-- 获取北京头条设计部所有编导、剪辑、拍摄的信息 -->
|
|
@@ -946,7 +945,7 @@
|
|
left join sys_user u on ud.user_id = u.id
|
|
left join sys_user u on ud.user_id = u.id
|
|
left join sys_user_role ur on u.id = ur.user_id
|
|
left join sys_user_role ur on u.id = ur.user_id
|
|
left join sys_role r on ur.role_id = r.id
|
|
left join sys_role r on ur.role_id = r.id
|
|
- WHERE b.parent_id = '26c10ecb5e0d416bb01f8ff983f4588c' <!-- 头条设计部 -->
|
|
|
|
|
|
+ WHERE b.parent_id = '26c10ecb5e0d416bb01f8ff983f4588c'
|
|
and r.role_code in ('plan','clip','shot')
|
|
and r.role_code in ('plan','clip','shot')
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -962,7 +961,7 @@
|
|
left join sys_user u on ud.user_id = u.id
|
|
left join sys_user u on ud.user_id = u.id
|
|
left join sys_user_role ur on u.id = ur.user_id
|
|
left join sys_user_role ur on u.id = ur.user_id
|
|
left join sys_role r on ur.role_id = r.id
|
|
left join sys_role r on ur.role_id = r.id
|
|
- WHERE b.parent_id = '26c10ecb5e0d416bb01f8ff983f4588c' <!-- 头条设计部 -->
|
|
|
|
|
|
+ WHERE b.parent_id = '26c10ecb5e0d416bb01f8ff983f4588c'
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 获取北京快手运营部所有优化师得信息 -->
|
|
<!-- 获取北京快手运营部所有优化师得信息 -->
|
|
@@ -977,7 +976,7 @@
|
|
left join sys_user u on ud.user_id = u.id
|
|
left join sys_user u on ud.user_id = u.id
|
|
left join sys_user_role ur on u.id = ur.user_id
|
|
left join sys_user_role ur on u.id = ur.user_id
|
|
left join sys_role r on ur.role_id = r.id
|
|
left join sys_role r on ur.role_id = r.id
|
|
- WHERE b.parent_id = '024b0dc0840045afb048022a8c61253f' <!-- 快手运营部 -->
|
|
|
|
|
|
+ WHERE b.parent_id = '024b0dc0840045afb048022a8c61253f'
|
|
and (r.role_code in ('operator','kuaishouOperationManager','operationAssistant')
|
|
and (r.role_code in ('operator','kuaishouOperationManager','operationAssistant')
|
|
or realname = '郭浩')
|
|
or realname = '郭浩')
|
|
</select>
|
|
</select>
|
|
@@ -994,24 +993,11 @@
|
|
left join sys_user u on ud.user_id = u.id
|
|
left join sys_user u on ud.user_id = u.id
|
|
left join sys_user_role ur on u.id = ur.user_id
|
|
left join sys_user_role ur on u.id = ur.user_id
|
|
left join sys_role r on ur.role_id = r.id
|
|
left join sys_role r on ur.role_id = r.id
|
|
- WHERE b.parent_id = '024b0dc0840045afb048022a8c61253f' <!-- 快手运营部 -->
|
|
|
|
|
|
+ WHERE b.parent_id = '024b0dc0840045afb048022a8c61253f'
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 获取北京头条运营部所有优化师得信息 -->
|
|
<!-- 获取北京头条运营部所有优化师得信息 -->
|
|
<select id="getToutiaoYunyingDepartUserInfo" resultType="cn.com.ctop.userefficientvideomap.entity.UserDto2">
|
|
<select id="getToutiaoYunyingDepartUserInfo" resultType="cn.com.ctop.userefficientvideomap.entity.UserDto2">
|
|
- <!-- select u.id as userId,
|
|
|
|
- u.realname as realname,
|
|
|
|
- r.role_name as roleName,
|
|
|
|
- r.role_code as roleCode,
|
|
|
|
- r.id as roleId
|
|
|
|
- FROM sys_user_depart ud
|
|
|
|
- left join sys_depart b on ud.dep_id = b.id
|
|
|
|
- left join sys_user u on ud.user_id = u.id
|
|
|
|
- left join sys_user_role ur on u.id = ur.user_id
|
|
|
|
- left join sys_role r on ur.role_id = r.id
|
|
|
|
- WHERE b.parent_id = 'c869de6bedc44a50803e45a4611df05e'
|
|
|
|
- and r.role_code = 'operator' -->
|
|
|
|
-
|
|
|
|
select u.id as userId,
|
|
select u.id as userId,
|
|
u.realname as realname,
|
|
u.realname as realname,
|
|
r.role_name as roleName,
|
|
r.role_name as roleName,
|
|
@@ -1022,7 +1008,7 @@
|
|
left join sys_user u on ud.user_id = u.id
|
|
left join sys_user u on ud.user_id = u.id
|
|
left join sys_user_role ur on u.id = ur.user_id
|
|
left join sys_user_role ur on u.id = ur.user_id
|
|
left join sys_role r on ur.role_id = r.id
|
|
left join sys_role r on ur.role_id = r.id
|
|
- WHERE b.parent_id = 'c869de6bedc44a50803e45a4611df05e' <!-- 头条运营部 -->
|
|
|
|
|
|
+ WHERE b.parent_id = 'c869de6bedc44a50803e45a4611df05e'
|
|
and r.role_code in ('operator','kuaishouOperationManager','operationAssistant')
|
|
and r.role_code in ('operator','kuaishouOperationManager','operationAssistant')
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -1038,7 +1024,7 @@
|
|
left join sys_user u on ud.user_id = u.id
|
|
left join sys_user u on ud.user_id = u.id
|
|
left join sys_user_role ur on u.id = ur.user_id
|
|
left join sys_user_role ur on u.id = ur.user_id
|
|
left join sys_role r on ur.role_id = r.id
|
|
left join sys_role r on ur.role_id = r.id
|
|
- WHERE b.parent_id = 'c869de6bedc44a50803e45a4611df05e' <!-- 头条运营部 -->
|
|
|
|
|
|
+ WHERE b.parent_id = 'c869de6bedc44a50803e45a4611df05e'
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 获取快手单个优化师当前账户下的总消耗 -->
|
|
<!-- 获取快手单个优化师当前账户下的总消耗 -->
|
|
@@ -1080,12 +1066,12 @@
|
|
<!-- 获取头条单个优化师其下所有的账户下当前的消耗 -->
|
|
<!-- 获取头条单个优化师其下所有的账户下当前的消耗 -->
|
|
<select id="getToutiaoAccountTotalCost" resultType="cn.com.ctop.userefficientvideomap.entity.AccountDTO">
|
|
<select id="getToutiaoAccountTotalCost" resultType="cn.com.ctop.userefficientvideomap.entity.AccountDTO">
|
|
select
|
|
select
|
|
- SUM(dailiAccount.cost) as totalCost, <!-- 账户当前消耗 -->
|
|
|
|
- allocation.account_id as accountId, <!-- 账户id -->
|
|
|
|
- allocation.user_name as userName, <!-- 优化师 -->
|
|
|
|
- allocation.advertiser_name as advertiserName, <!-- 广告主名称 -->
|
|
|
|
- allocation.project_name as projectName, <!-- 项目名称 -->
|
|
|
|
- allocation.auth_name as authName <!-- 授权名称 -->
|
|
|
|
|
|
+ SUM(dailiAccount.cost) as totalCost,
|
|
|
|
+ allocation.account_id as accountId,
|
|
|
|
+ allocation.user_name as userName,
|
|
|
|
+ allocation.advertiser_name as advertiserName,
|
|
|
|
+ allocation.project_name as projectName,
|
|
|
|
+ allocation.auth_name as authName
|
|
from
|
|
from
|
|
ctop_bytedance_report_advertiser_daily dailiAccount
|
|
ctop_bytedance_report_advertiser_daily dailiAccount
|
|
LEFT JOIN
|
|
LEFT JOIN
|
|
@@ -1104,12 +1090,12 @@
|
|
<!-- 获取快手单个优化师其下所有账户下当前的消耗 -->
|
|
<!-- 获取快手单个优化师其下所有账户下当前的消耗 -->
|
|
<select id="getKuaishouAccountTotalCost" resultType="cn.com.ctop.userefficientvideomap.entity.AccountDTO">
|
|
<select id="getKuaishouAccountTotalCost" resultType="cn.com.ctop.userefficientvideomap.entity.AccountDTO">
|
|
SELECT
|
|
SELECT
|
|
- SUM(dailiAccount.charge) as totalCost, <!-- 账户当前消耗 -->
|
|
|
|
- allocation.account_id as accountId, <!-- 账户id -->
|
|
|
|
- allocation.user_name as userName, <!-- 优化师 -->
|
|
|
|
- allocation.advertiser_name as advertiserName, <!-- 广告主名称 -->
|
|
|
|
- allocation.project_name as projectName, <!-- 项目名称 -->
|
|
|
|
- allocation.auth_name as authName <!-- 授权名称 -->
|
|
|
|
|
|
+ SUM(dailiAccount.charge) as totalCost,
|
|
|
|
+ allocation.account_id as accountId,
|
|
|
|
+ allocation.user_name as userName,
|
|
|
|
+ allocation.advertiser_name as advertiserName,
|
|
|
|
+ allocation.project_name as projectName,
|
|
|
|
+ allocation.auth_name as authName
|
|
FROM
|
|
FROM
|
|
ctop_kuaishou_report_daily_account dailiAccount
|
|
ctop_kuaishou_report_daily_account dailiAccount
|
|
LEFT JOIN
|
|
LEFT JOIN
|
|
@@ -1132,7 +1118,6 @@
|
|
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 app_type = #{appType}
|
|
and app_type = #{appType}
|
|
and calc_date <= #{endDate}
|
|
and calc_date <= #{endDate}
|
|
and calc_date >= #{startDate}
|
|
and calc_date >= #{startDate}
|
|
@@ -1146,8 +1131,8 @@
|
|
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 <!-- 原本的角色 -->
|
|
|
|
|
|
+ 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
|
|
left join (select id,code,url,material_name,watermark_material_name from ctop_material_info group by code) i on
|
|
@@ -1169,8 +1154,8 @@
|
|
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, <!-- 原本的角色 -->
|
|
|
|
|
|
+ m.role_id as videoRoleCode,
|
|
|
|
+ r.role_name as originRoleName,
|
|
su.realname as realname
|
|
su.realname as realname
|
|
from
|
|
from
|
|
ctop_user_efficient_video_map m
|
|
ctop_user_efficient_video_map m
|
|
@@ -1305,20 +1290,6 @@
|
|
|
|
|
|
<!-- 按时间段获取视频总量 -->
|
|
<!-- 按时间段获取视频总量 -->
|
|
<select id="getVideoByDates" resultType="string">
|
|
<select id="getVideoByDates" resultType="string">
|
|
- <!-- select
|
|
|
|
- code
|
|
|
|
- from (
|
|
|
|
- select
|
|
|
|
- code,
|
|
|
|
- create_time
|
|
|
|
- from
|
|
|
|
- ctop_material_info
|
|
|
|
- where
|
|
|
|
- date_format(create_time, '%Y-%m-%d') >= #{startDate} and
|
|
|
|
- date_format(create_time, '%Y-%m-%d') <= #{endDate}
|
|
|
|
- order by create_time
|
|
|
|
- ) a
|
|
|
|
- group by code -->
|
|
|
|
select
|
|
select
|
|
b.signature
|
|
b.signature
|
|
from ctop_kuaishou_creative a
|
|
from ctop_kuaishou_creative a
|
|
@@ -1405,8 +1376,8 @@
|
|
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 <!-- 原本的角色 -->
|
|
|
|
|
|
+ m.role_id as videoRoleCode,
|
|
|
|
+ r.role_name as originRoleName
|
|
from
|
|
from
|
|
ctop_user_video_map m
|
|
ctop_user_video_map m
|
|
left join (
|
|
left join (
|
|
@@ -1490,7 +1461,7 @@
|
|
left join sys_user u on ud.user_id = u.id
|
|
left join sys_user u on ud.user_id = u.id
|
|
left join sys_user_role ur on u.id = ur.user_id
|
|
left join sys_user_role ur on u.id = ur.user_id
|
|
left join sys_role r on ur.role_id = r.id
|
|
left join sys_role r on ur.role_id = r.id
|
|
- WHERE b.parent_id = '024b0dc0840045afb048022a8c61253f' <!-- 快手运营部 -->
|
|
|
|
|
|
+ WHERE b.parent_id = '024b0dc0840045afb048022a8c61253f'
|
|
and r.role_code = 'kuaishouOperationManager'
|
|
and r.role_code = 'kuaishouOperationManager'
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -1507,7 +1478,7 @@
|
|
left join sys_user u on ud.user_id = u.id
|
|
left join sys_user u on ud.user_id = u.id
|
|
left join sys_user_role ur on u.id = ur.user_id
|
|
left join sys_user_role ur on u.id = ur.user_id
|
|
left join sys_role r on ur.role_id = r.id
|
|
left join sys_role r on ur.role_id = r.id
|
|
- WHERE b.parent_id = 'c869de6bedc44a50803e45a4611df05e' <!-- 头条运营部 -->
|
|
|
|
|
|
+ WHERE b.parent_id = 'c869de6bedc44a50803e45a4611df05e'
|
|
and r.role_code = 'toutiaoOperationManager'
|
|
and r.role_code = 'toutiaoOperationManager'
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -1604,9 +1575,9 @@
|
|
select
|
|
select
|
|
id as projectId,
|
|
id as projectId,
|
|
project_name as projectName,
|
|
project_name as projectName,
|
|
- advertiser_name as advertiserName, <!-- 广告主 -->
|
|
|
|
- responsible_name as responsibleName, <!-- 负责人名称 -->
|
|
|
|
- design_responsible_name as designResponsibleName, <!-- 设计负责人名称 -->
|
|
|
|
|
|
+ advertiser_name as advertiserName,
|
|
|
|
+ responsible_name as responsibleName,
|
|
|
|
+ design_responsible_name as designResponsibleName,
|
|
(select sum(cost) from ctop_performance_account where account_id in (
|
|
(select sum(cost) from ctop_performance_account where account_id in (
|
|
select
|
|
select
|
|
account_id
|
|
account_id
|
|
@@ -1678,12 +1649,11 @@
|
|
d4.realname as clip,
|
|
d4.realname as clip,
|
|
d4.id as clipId
|
|
d4.id as clipId
|
|
from
|
|
from
|
|
- (
|
|
|
|
- select signature, sum(charge) as charge from ctop_kuaishou_report_daily_creative where creative_id in (
|
|
|
|
|
|
+ (select signature, sum(charge) as charge from ctop_kuaishou_report_daily_creative where creative_id in (
|
|
select creative_id from ctop_kuaishou_creative where photo_id != 0 and account_id = #{accountId}
|
|
select creative_id from ctop_kuaishou_creative where photo_id != 0 and account_id = #{accountId}
|
|
)
|
|
)
|
|
- and stat_date >= #{startDate} and stat_date <= #{endDate} <!-- and signature is not null --> group by
|
|
|
|
- signature
|
|
|
|
|
|
+ and stat_date >= #{startDate} and stat_date <= #{endDate}
|
|
|
|
+ group by signature
|
|
) a
|
|
) a
|
|
left join (select id,url,code from ctop_material_info group by code) b on a.signature = b.code
|
|
left join (select id,url,code from ctop_material_info group by code) b on a.signature = b.code
|
|
left join ctop_material_ascription c on b.id = c.material_id
|
|
left join ctop_material_ascription c on b.id = c.material_id
|
|
@@ -1691,7 +1661,7 @@
|
|
left join sys_user d2 on d2.id = c.plan_id
|
|
left join sys_user d2 on d2.id = c.plan_id
|
|
left join sys_user d3 on d3.id = c.plane_id
|
|
left join sys_user d3 on d3.id = c.plane_id
|
|
left join sys_user d4 on d4.id = c.clip_id
|
|
left join sys_user d4 on d4.id = c.clip_id
|
|
- where b.url is not null <!-- TODO delete -->
|
|
|
|
|
|
+ where b.url is not null
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 头条根据账户获取其下视频制作信息以及消耗 -->
|
|
<!-- 头条根据账户获取其下视频制作信息以及消耗 -->
|
|
@@ -1717,7 +1687,7 @@
|
|
)
|
|
)
|
|
and date_format(stat_datetime,'%Y-%m-%d') >= #{startDate}
|
|
and date_format(stat_datetime,'%Y-%m-%d') >= #{startDate}
|
|
and date_format(stat_datetime,'%Y-%m-%d') <= #{endDate}
|
|
and date_format(stat_datetime,'%Y-%m-%d') <= #{endDate}
|
|
- <!--and signature is not null --> group by signature
|
|
|
|
|
|
+ group by signature
|
|
) a
|
|
) a
|
|
left join (select id,url,code from ctop_material_info group by code) b on a.signature = b.code
|
|
left join (select id,url,code from ctop_material_info group by code) b on a.signature = b.code
|
|
left join ctop_material_ascription c on b.id = c.material_id
|
|
left join ctop_material_ascription c on b.id = c.material_id
|
|
@@ -1725,7 +1695,7 @@
|
|
left join sys_user d2 on d2.id = c.plan_id
|
|
left join sys_user d2 on d2.id = c.plan_id
|
|
left join sys_user d3 on d3.id = c.plane_id
|
|
left join sys_user d3 on d3.id = c.plane_id
|
|
left join sys_user d4 on d4.id = c.clip_id
|
|
left join sys_user d4 on d4.id = c.clip_id
|
|
- where b.url is not null <!-- TODO delete -->
|
|
|
|
|
|
+ where b.url is not null
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 根据设计师组员姓名获取组长姓名 -->
|
|
<!-- 根据设计师组员姓名获取组长姓名 -->
|
|
@@ -1737,7 +1707,7 @@
|
|
left join sys_user_depart b on a.id = b.user_id
|
|
left join sys_user_depart b on a.id = b.user_id
|
|
left join sys_user_role c on a.id = c.user_id
|
|
left join sys_user_role c on a.id = c.user_id
|
|
where b.dep_id = (select dep_id from sys_user_depart where user_id = #{userId})
|
|
where b.dep_id = (select dep_id from sys_user_depart where user_id = #{userId})
|
|
- and c.role_id = '8d3e2ed58bdedf17716f698ea674da27' <!-- 设计组长roleid -->
|
|
|
|
|
|
+ and c.role_id = '8d3e2ed58bdedf17716f698ea674da27'
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getUserQuarterVideo" resultType="cn.com.ctop.userefficientvideomap.entity.VideoDTO">
|
|
<select id="getUserQuarterVideo" resultType="cn.com.ctop.userefficientvideomap.entity.VideoDTO">
|