DELETE FROM state WHERE state.mac=#{0} and state.mac_key=#{1} insert into offlinelog(equipment_name,equipment_address,repairman,time) VALUES(#{0},#{1},#{2},NOW())