t_banner_template.id,
agent_id as agentId,
advertiser_id as advertiserId,
name,
path,
path_small as pathSmall,
type,
width,
height,
t_banner_template.status,
t_banner_template.updated
id,
advertiser_id as advertiserId,
name,
path,
type,
width,
height,
status,
updated
update t_banner_template
set status=#{status},updated = #{updated}
where id in
#{id}
update t_banner
set supdated=#{updataTime}
where banner_template_id in
#{id}
update t_banner_operator
set supdated=#{updataTime}
where banner_id in (select id from t_banner
where t_banner.banner_template_id in
#{id}
)
update t_banner_template
set status=#{status},
updated = #{updated}
where id in
#{id}
update t_banner
set status=#{status},
updated = #{updated},supdated = #{updated}
where banner_template_id in
#{id}
update t_banner_operator
set checked =3,
supdated=#{updated}
where banner_id in (select id from t_banner
where t_banner.banner_template_id in
#{id}
)
update t_banner_template set name = #{name} , updated = now() where id = #{id}
update t_banner_template
set name = #{name},
path = #{path},
path_small = #{pathSmall},
width = #{width},
height = #{height},
type = ${type},
updated = #{updated}
WHERE id = #{id}
update t_banner
set checked = 0,
updated = #{supdated},
supdated = #{supdated}
where banner_template_id = #{id}
update t_banner_operator
set checked = 0,
supdated = #{supdated}
where banner_id in (select id from t_banner where banner_template_id =#{id})
update t_banner_template a
set a.advertiser_id = #{advertiserId},
a.agent_id = #{agentId}
WHERE a.id = #{id}
update t_banner_template a,t_banner b
set a.name = #{name},
a.updated = #{updated},
b.visit_address = #{banner.visitAddress},
b.click_address = #{banner.clickAddress},
b.impression_address = #{banner.impressionAddress}
WHERE a.id = b.banner_template_id and a.id = #{id}
insert into t_banner_template (agent_id,advertiser_id,name,path,path_small,type,width,height,status,updated)
values(#{agentId},#{advertiserId},#{name},#{path},#{pathSmall},#{type},#{width},#{height},#{status},#{updated})