select id, branch_id, act_id, review_conditions, path_id from audit_paths_acts insert into audit_paths_acts branch_id, act_id, review_conditions, path_id, #{branchId}, #{actId}, #{reviewConditions}, #{pathId}, update audit_paths_acts branch_id = #{branchId}, act_id = #{actId}, review_conditions = #{reviewConditions}, path_id = #{pathId}, where id = #{id} delete from audit_paths_acts where id = #{id} delete act.*, leve.* from audit_paths_acts act left JOIN audit_paths_levels leve ON leve.path_id = act.id where act.id in #{id}