insert into air_switch_info(name,address,type,p_num,createtime,module_id ,box_id ,lamp_pole_id ,box_address ,serial_port ) values (#{name},#{address},#{type},#{pNum},#{createTime},#{moduleId} ,#{boxId} ,#{lampPoleId} ,#{boxAddress} ,#{serialPort} ) update air_switch_info set name=#{name}, address=#{address}, type=#{type}, p_num=#{pum}, createtime=#{createTime}, module_id=#{moduleId} ,box_id=#{boxId}, ,lamp_pole_id=#{lampPoleId} ,box_address=#{boxAddress} ,serial_port=#{serialPort} where id = #{id} delete from air_switch_info where id=#{id} delete from air_switch_info where box_id=#{boxId} update air_switch_info a set a.status = #{status} where a.id = #{id}