<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.easyproject.service.mapper.member.MemberInviteMapper">

    <!--用户邀请关系-->

    <!--处理父节点其他节点左值 左序大于当前节点右序的左序号都自增2-->
    <update id="updatOtherNodeLeft" parameterType="Long">
        update member_invite set left_no = left_no+2 where left_no &gt; #{currentNodeRightNo} and group_no = #{groupNo}
    </update>

    <!--处理父节点其他节点右值 右序大于等于当前节点右序的右序号都自增2-->
    <update id="updatOtherNodeRight" parameterType="Long">
        update member_invite set right_no = right_no+2 where right_no &gt;= #{currentNodeRightNo} and group_no = #{groupNo}
    </update>

</mapper>
