id,station_id,src_id,device_type,col,col_name,sens_type,permission_id,page_location,div_location,sort,device_id insert into dynamic_config (station_id,src_id,device_type,col,col_name,col_name_en, col_name_fra,col_name_spa,col_name_de,col_name_pl,col_name_ara, sens_type,permission_id,page_location,div_location,sort,device_id) values ( #{item.stationId},#{item.srcId},#{item.deviceType},#{item.col}, #{item.colName},#{item.colNameEn}, #{item.colNameFra},#{item.colNameSpa},#{item.colNameDe},#{item.colNamePl},#{item.colNameAra}, #{item.sensType},#{item.permissionId},#{item.pageLocation},#{item.divLocation},#{item.sort},#{item.deviceId} ) update dynamic_config set src_id = #{item.srcId},device_type = #{item.deviceType}, col = #{item.col},col_name = #{item.colName},sens_type = #{item.sensType}, sort = #{item.sort} where id = #{item.id} delete from dynamic_config and id in #{item} delete from dynamic_config where id in (SELECT dynamic_config_id FROM `curve_config_relation` and curve_id in #{item} ) delete from dynamic_config where id in (SELECT dynamic_config_id FROM `point_config_relation` and point_id in #{item} ) delete from dynamic_config where station_id = #{stationId}