select detail_id, zone_id, postcode, match_type, create_time, update_time
from prc_zone_detail
insert into prc_zone_detail (
zone_id,postcode,
match_type,
create_time
) values (
#{zoneId},#{postcode},
#{matchType},
sysdate()
)
insert into prc_zone_detail (zone_id, postcode, match_type, create_time) values
(#{item.zoneId}, #{item.postcode}, #{item.matchType}, sysdate())
update prc_zone_detail
zone_id = #{zoneId},postcode = #{postcode},match_type = #{matchType},
update_time = sysdate()
where detail_id = #{detailId}
delete from prc_zone_detail where detail_id in
#{detailId}
delete from prc_zone_detail where zone_id = #{zoneId}
delete d from prc_zone_detail d
inner join prc_zone z on z.zone_id = d.zone_id
where z.region_id = #{regionId}
and z.zone_type = 'REGULAR'
and z.product_id is null
delete d from prc_zone_detail d
inner join prc_zone z on z.zone_id = d.zone_id
where z.product_id = #{productId}
and z.zone_type = 'LABEL'