|
@@ -106,9 +106,9 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="channelNumberUsageDetailsList" resultType="com.alibaba.fastjson.JSONObject">
|
|
<select id="channelNumberUsageDetailsList" resultType="com.alibaba.fastjson.JSONObject">
|
|
- SELECT (SELECT MAX(tt.create_time)
|
|
|
|
|
|
+ SELECT IFNULL((SELECT MAX(tt.create_time)
|
|
FROM ctop_kuaishou_creative tt
|
|
FROM ctop_kuaishou_creative tt
|
|
- WHERE tt.unit_id = t1.unit_id) as 'createTime', CASE t1.usage_range WHEN 1 THEN '账户' WHEN 2 THEN '项目' ELSE '' END as 'usageRange', IFNULL(t1.channel_code, '') as 'channelCode', IFNULL(t1.project_name, '') as 'projectName', IFNULL(t2.auth_name, '') as 'authName', IFNULL(t1.account_id, '') as 'accountId', IFNULL(t1.campaign_id, '') as 'campaignId', IFNULL(t1.unit_id, '') as 'unitId'
|
|
|
|
|
|
+ WHERE tt.unit_id = t1.unit_id),'-') as 'createTime', CASE t1.usage_range WHEN 1 THEN '账户' WHEN 2 THEN '项目' ELSE '' END as 'usageRange', IFNULL(t1.channel_code, '') as 'channelCode', IFNULL(t1.project_name, '') as 'projectName', IFNULL(t2.auth_name, '') as 'authName', IFNULL(t1.account_id, '') as 'accountId', IFNULL(t1.campaign_id, '') as 'campaignId', IFNULL(t1.unit_id, '') as 'unitId'
|
|
FROM ctop_kuaishou_channel t1
|
|
FROM ctop_kuaishou_channel t1
|
|
LEFT JOIN ctop_user_allocation t2 ON t1.account_id = t2.account_id
|
|
LEFT JOIN ctop_user_allocation t2 ON t1.account_id = t2.account_id
|
|
WHERE t1.account_id = #{accountId}
|
|
WHERE t1.account_id = #{accountId}
|