|
|
@@ -394,7 +394,7 @@
|
|
|
(select cast(ub.advertiser_id as char) advertiser_id, ub.advertiser_name
|
|
|
from tidb.deepthink.advertiser_unbind_info ub
|
|
|
left join tidb.deepthink.advertiser_bind_info b on ub.advertiser_id = b.advertiser_id
|
|
|
- where b.advertiser_id is null
|
|
|
+ where ub.advertiser_create_time < date_format(#{date},'yyyy-MM-dd') and b.advertiser_id is null
|
|
|
<if test="list != null and list.size > 0">
|
|
|
and ub.advertiser_id in
|
|
|
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
|
|
|
@@ -407,7 +407,7 @@
|
|
|
on tb1.advertiser_id = tb2.advertiser_id
|
|
|
left join
|
|
|
(select advertiser_id, ifnull(sum(cost_amount),0) as ca from application.media_ad_report_daily
|
|
|
- where stat_date >= #{last90Day} and stat_date <= #{date} group by advertiser_id) tb3
|
|
|
+ where stat_date >= #{last90Day} and stat_date < #{date} group by advertiser_id) tb3
|
|
|
on tb1.advertiser_id = tb3.advertiser_id
|
|
|
where tb3.ca > 0
|
|
|
order by tb3.ca desc
|