Helius
2021-09-27 2c74d176be9d103bf47f69868ca7975a3a73256d
src/main/resources/mapper/modules/MallMemberMapper.xml
@@ -115,7 +115,8 @@
    </select>
    <select id="getAgentListInPage" resultType="cc.mrbird.febs.mall.vo.AdminAgentVo">
        SELECT * FROM mall_member m
        SELECT m.*,a.description levelName FROM mall_member m
        left join data_dictionary_custom a on a.code = m.level
        <where>
            <if test="record != null" >
                <if test="record.name!=null and record.name!=''">
@@ -129,6 +130,7 @@
                </if>
            </if>
        </where>
        group by m.id
        order by m.CREATED_TIME desc
    </select>
@@ -139,4 +141,31 @@
    <select id="selectAllChildAgentListByInviteId" resultType="cc.mrbird.febs.mall.entity.MallMember">
        select * from mall_member where  find_in_set(#{inviteId}, referrer_ids)
    </select>
    <select id="selectMemberParentAgentList" resultType="cc.mrbird.febs.mall.entity.MallMember">
        select * from mall_member
        where level != 'FIRST_LEVEL' and  invite_id IN
        <foreach collection = "list" item = "item"  separator=","  open = "(" close = ")" >
            #{item}
        </foreach >
        order by id desc
    </select>
    <select id="getAgentLevelListInPage" resultType="cc.mrbird.febs.mall.vo.AdminAgentLevelVo">
        SELECT
            a.id,b.description name
        FROM
            data_dictionary_custom a
                left JOIN data_dictionary_custom b on a.code = b.code
        where a.type = 'AGENT_LEVEL_REQUIRE'
        GROUP BY a.id
        ORDER BY
            a.CREATED_TIME DESC
    </select>
    <select id="getAgentChildInPage" resultType="cc.mrbird.febs.mall.vo.AdminAgentMemberVo">
        select m.*,a.description levelName from mall_member m
            left join data_dictionary_custom a on a.code = m.level
        where  find_in_set(#{record.inviteId}, m.referrer_ids)
    </select>
</mapper>