fix
Hentua
2023-04-24 c33c9c03bb90e49ad12fd237058c877e87e96ca4
src/main/resources/mapper/modules/MallMemberMapper.xml
@@ -445,4 +445,61 @@
            </if>
        </where>
    </select>
    <select id="selectParentMemberList" resultType="cc.mrbird.febs.mall.entity.MallMember">
        select * from mall_member
        where invite_id!=#{refererId} and invite_id IN
        <foreach collection = "list" item = "item"  separator=","  open = "(" close = ")" >
            #{item}
        </foreach >
        order by id desc
        <if test="limit != null">
            limit #{limit}
        </if>
    </select>
    <select id="selectMemberAfterLevelList" resultType="cc.mrbird.febs.mall.entity.MallMember">
        SELECT
            m.*, b.
            VALUE
        FROM
            mall_member m
                INNER JOIN data_dictionary_custom b ON m.LEVEL = b. CODE
        WHERE 1=1
          AND b.type = 'AGENT_LEVEL'
          AND b.VALUE > (
            SELECT
                VALUE
            FROM
                data_dictionary_custom a
            WHERE
                a. CODE = #{level}
              AND a.type = 'AGENT_LEVEL'
        )
        GROUP BY
            m.id
    </select>
    <select id="selectAgentOrPartnetMemberList" resultType="cc.mrbird.febs.mall.entity.MallMember">
        select * from mall_membebr a
        where 1=1
        <if test="level == 2">
            a.account_level in (2, 3)
        </if>
        <if test="level == 3">
            a.account_level = 3
        </if>
    </select>
    <select id="selectOwnCntByInviteIdAndAccountLevel" resultType="cc.mrbird.febs.mall.entity.MallMember">
        select IFNULL(count(1),0) from mall_member x where x.referrer_id=#{inviteId}
        and x.level != 'ZERO_LEVEL'
        <if test="accountLevel == 2">
            and x.account_level = 2
        </if>
        <if test="accountLevel == 3">
            and x.accountLevel in (2, 3)
        </if>
    </select>
</mapper>