id,
banner_template_id as bannerTemplateId,
order_id as orderId,
campaign_id as campaignId,
adgroup_id as adGroupId,
visit_address as visitAddress,
click_address as clickAddress,
impression_address as impressionAddress
status,
checked,
updated,
supdated
b.id as bannerId,
banner_template_id as bannerTemplateId,
order_id as orderId,
campaign_id as campaignId,
adgroup_id as adGroupId,
visit_address as visitAddress,
click_address as clickAddress,
impression_address as impressionAddress,
b.checked as checked,
IFNULL(bo.checked,-1) as operatorChecked,
b.updated as updated,
memo
bt.id as banner_templateId,
advertiser_id as advertiserId,
name,
path,
path_small as pathSmall,
type,
width,
height,
bt.status as status,
bt.updated as bannerTemplateUpdated
delete from t_banner where
id in
#{id}
update t_banner
set status=#{status},updated = #{updated},supdated = #{supdated}
where id in
#{id}
update t_banner
set checked = #{checked},updated = #{updated}
where id in
#{bannerId}
insert into
t_banner(banner_template_id,order_id,campaign_id,adgroup_id,visit_address,click_address,impression_address,checked,memo,updated,supdated
)
values (
#{bannerTemplateId},#{orderId},#{campaignId},#{adGroupId},#{visitAddress},#{clickAddress},#{impressionAddress},#{checked},#{memo},#{updated},#{supdated}
)
update t_banner a,t_banner_template b
set b.name = #{bannerTemplate.name},
b.updated = #{bannerTemplate.updated},
a.visit_address = #{visitAddress},
a.click_address = #{clickAddress},
a.impression_address = #{impressionAddress},
a.checked = 0,
a.updated = #{updated},
a.supdated = #{supdated}
WHERE b.id = a.banner_template_id and a.id = #{id}
update t_banner a,t_banner_template b
set a.banner_template_id = #{bannerTemplateId},
b.name = #{bannerTemplate.name},
b.updated = #{bannerTemplate.updated},
a.visit_address = #{visitAddress},
a.click_address = #{clickAddress},
a.impression_address = #{impressionAddress},
a.checked = 0,
a.updated = #{updated},
a.supdated = #{supdated}
WHERE b.id = #{bannerTemplate.id} and a.id = #{id}
update t_banner_operator
set checked = 0,supdated = #{supdated}
WHERE banner_id in
#{id}
update t_banner
set t_banner.supdated= #{modifyDate}
where t_banner.adgroup_id in
#{adgroupId}
update t_banner
set t_banner.supdated=#{modifyDate}
where t_banner.order_id in
#{orderId}
update t_banner
set t_banner.supdated=#{modifyDate}
where t_banner.campaign_id in
#{campaignId}
update t_banner a,t_banner_template b
set b.status=#{status},b.updated = #{modifyDate},a.updated = #{modifyDate}
where
a.banner_template_id = b.id and
a.order_id in
#{orderId}
update t_banner a,t_banner_template b
set b.status=#{status},b.updated = #{modifyDate},a.updated = #{modifyDate}
where
a.banner_template_id = b.id and
a.campaign_id in
#{campaignId}
update t_banner a,t_banner_template b
set b.status=#{status},b.updated = #{modifyDate},a.updated = #{modifyDate}
where
a.banner_template_id = b.id and
a.adgroup_id in
#{adGroupId}
update t_banner_operator
set supdated = #{supdated}
where banner_id in
#{id}
update t_banner_operator
set operator_id=#{operatorId},checked = #{operatorChecked},supdated = #{supdated}
where banner_id = #{bannerId}