|
|
@@ -391,10 +391,12 @@
|
|
|
|
|
|
<select id="unbindData" resultType="java.util.Map">
|
|
|
select tb1.advertiser_id, tb1.advertiser_name, ifnull(tb2.ca,0) as today_cost, tb3.ca as last_30_cost from
|
|
|
- (select cast(advertiser_id as char) advertiser_id, advertiser_name from tidb.deepthink.advertiser_unbind_info
|
|
|
- where 1=1
|
|
|
+ (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
|
|
|
<if test="list != null and list.size > 0">
|
|
|
- and advertiser_id in
|
|
|
+ and ub.advertiser_id in
|
|
|
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
|
|
|
#{item}
|
|
|
</foreach>
|