insert into condition(condition_id, condition_name, operator_type, condition_value, parent_id) values (#{item.conditionId}, #{item.conditionName}, #{item.operator}, #{item.conditionValue}, #{parentId}) insert into condition_mapping(condition_id, parent_type, parent_id) values (#{item.conditionId}, #{parentType}, #{parentId}) insert into condition(condition_id, condition_name, operator_type, condition_value, parent_id) values (#{condition.conditionId}, #{condition.conditionName}, #{condition.operator}, #{condition.conditionValue}, #{parentId}) update condition condition_name = #{condition.conditionName}, operator_type = #{condition.operator}, condition_value = #{condition.conditionValue}, where condition_id = #{condition.conditionId} DELETE FROM condition WHERE condition_id = #{conditionId} DELETE FROM condition WHERE parent_id = #{parentId}