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,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.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}