insert into tb_dormitory_student(
dormitory_id,
bed_id,
student_id,
checkin,
status
)values(
#{dormitoryId},
#{bedId},
#{studentId},
#{checkin},
#{status}
)
delete from tb_dormitory_student where id = #{id}
delete from tb_dormitory_student where student_id = #{studentId}
update tb_dormitory_student set
dormitory_id=#{dormitoryId},
bed_id=#{bedId},
student_id=#{studentId},
checkin=#{checkin},
status=#{status}
where id = #{id}
update tb_dormitory_student set
dormitory_id = #{dormitoryId},
bed_id = #{bedId},
student_id = #{studentId},
checkin = #{checkin},
status = #{status}
where id = #{id}
and id = #{id}and dormitory_id = #{dormitoryId}and bed_id = #{bedId}and student_id = #{studentId}and status = #{status}