|
@@ -6,9 +6,9 @@
|
|
|
SELECT * from (SELECT
|
|
|
t1.signature,
|
|
|
t2.url,
|
|
|
- (SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.clip_id=u.id where t3.material_id=t1.signature limit 1) AS clip,
|
|
|
- (SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.shot_id=u.id where t3.material_id=t1.signature limit 1) AS shot,
|
|
|
- (SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.plan_id=u.id where t3.material_id=t1.signature limit 1) AS plan,
|
|
|
+ IFNULL((SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.clip_id=u.id where t3.material_id=t1.signature limit 1),'') AS clip,
|
|
|
+ IFNULL((SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.shot_id=u.id where t3.material_id=t1.signature limit 1),'') AS shot,
|
|
|
+ IFNULL((SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.plan_id=u.id where t3.material_id=t1.signature limit 1),'') AS plan,
|
|
|
t2.cover_url as converUrl,
|
|
|
t2.material_name AS materialName,
|
|
|
(SELECT project_name FROM ctop_project t4 WHERE t4.id = t3.project_id) AS projectName,
|
|
@@ -22,18 +22,18 @@
|
|
|
t1.stat_datetime >= #{startDate}
|
|
|
AND t1.stat_datetime <= #{endDate}
|
|
|
<if test="accountIds != null">
|
|
|
- AND t1.account_id in
|
|
|
- <foreach item="item" index="index" collection="accountIds"
|
|
|
- open="(" separator="," close=")">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
+ AND t1.account_id in
|
|
|
+ <foreach item="item" index="index" collection="accountIds"
|
|
|
+ open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
</if>
|
|
|
AND t2.url!=""
|
|
|
GROUP BY t1.signature
|
|
|
) t
|
|
|
- WHERE (t.clip LIKE '%${clip}%' or t.clip is null)
|
|
|
- AND (t.shot LIKE '%${shot}%' or t.shot is null)
|
|
|
- AND (t.plan LIKE '%${plan}%' or t.plan is null)
|
|
|
+ WHERE (t.clip LIKE '%${clip}%')
|
|
|
+ AND (t.shot LIKE '%${shot}%')
|
|
|
+ AND (t.plan LIKE '%${plan}%')
|
|
|
ORDER BY ${target} ${order}
|
|
|
</select>
|
|
|
|