SELECT d.device_id, d.ip_address, d.port, d.warehouse_id, d.scene_id, w.warehouse_name AS warehouse_name, s.scene_name AS scene_name, d.create_by, d.create_time, d.update_by, d.update_time, d.is_delete FROM device_info d LEFT JOIN warehouse_info w ON d.warehouse_id = w.warehouse_code LEFT JOIN scene_mapping s ON d.scene_id = s.scene_code insert into device_info device_id, ip_address, port, warehouse_id, scene_id, create_by, create_time, update_by, update_time, is_delete, #{deviceId}, #{ipAddress}, #{port}, #{warehouseId}, #{sceneId}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{isDelete}, update device_info ip_address = #{ipAddress}, port = #{port}, warehouse_id = #{warehouseId}, scene_id = #{sceneId}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, is_delete = #{isDelete}, where device_id = #{deviceId} delete from device_info where device_id = #{deviceId} delete from device_info where device_id in #{deviceId}