insert into tb_dormitory_set(
prefix,
start,
end,
building_id,
storey_id,
capacity
)values(
#{prefix},
#{start},
#{end},
#{buildingId},
#{storeyId},
#{capacity}
)
delete from tb_dormitory_set where id = #{id}
update tb_dormitory_set set
prefix=#{prefix},
start=#{start},
end=#{end},
building_id=#{buildingId},
storey_id=#{storeyId},
capacity=#{capacity}
where id = #{id}
update tb_dormitory_set set
prefix = #{prefix},
start = #{start},
end = #{end},
building_id = #{buildingId},
storey_id = #{storeyId},
capacity = #{capacity}
where id = #{id}
and id = #{id}
and prefix = #{prefix}
and start = #{start}
and end = #{end}
and building_id = #{buildingId}
and storey_id = #{storeyId}
and capacity = #{capacity}