select id, resource_id, target_id from t_tool_relation insert into t_tool_relation id, resource_id, target_id, #{id}, #{resourceId}, #{targetId}, update t_tool_relation resource_id = #{resourceId}, target_id = #{targetId}, where id = #{id} delete from t_tool_relation where id = #{id} delete from t_tool_relation where resource_id = #{resourceId} and target_id = #{targetId} delete from t_tool_relation where target_id = #{targetId} and resource_id = #{resourceId} delete from t_tool_relation where id in #{id} insert into t_tool_relation (id, resource_id, target_id) values #{item.id}, #{item.resourceId}, #{item.targetId}