select id, template_id, policy_id, item_type, metric_key, metric_name, data_type, monitor_status, collection_cycle, create_time, update_time, create_by, update_by from rm_template_linux insert into rm_template_linux template_id, policy_id, item_type, metric_key, metric_name, data_type, monitor_status, collection_cycle, create_time, update_time, create_by, update_by, #{templateId}, #{policyId}, #{itemType}, #{metricKey}, #{metricName}, #{dataType}, #{monitorStatus}, #{collectionCycle}, #{createTime}, #{updateTime}, #{createBy}, #{updateBy}, update rm_template_linux template_id = #{templateId}, policy_id = #{policyId}, item_type = #{itemType}, metric_key = #{metricKey}, metric_name = #{metricName}, data_type = #{dataType}, monitor_status = #{monitorStatus}, collection_cycle = #{collectionCycle}, create_time = #{createTime}, update_time = #{updateTime}, create_by = #{createBy}, update_by = #{updateBy}, where id = #{id} delete from rm_template_linux where id = #{id} delete from rm_template_linux where id in #{id} insert into rm_template_linux (template_id, policy_id, item_type, metric_key, metric_name, data_type, monitor_status, create_time, update_time, create_by, update_by) values ( #{item.templateId}, #{item.policyId}, #{item.itemType}, #{item.metricKey}, #{item.metricName}, #{item.dataType}, #{item.monitorStatus}, #{item.createTime}, #{item.updateTime}, #{item.createBy}, #{item.updateBy} ) delete from rm_template_linux where template_id = #{templateId} update rm_template_linux set collection_cycle = null where template_id = #{templateId}