xiaoyong931011
2021-09-23 eda28374083dbb6cf58c4d1fb6794e6d261c2a45
src/main/resources/mapper/modules/MallMemberMapper.xml
@@ -7,10 +7,14 @@
        <where>
            <if test="record != null" >
                <if test="record.name!=null and record.name!=''">
                    and (m.name like concat('%',  #{record.name},'%')
                    and m.name like concat('%',  #{record.name},'%')
                </if>
                <if test="record.phone!=null and record.phone!=''">
                    and (m.phone like concat('%',  #{record.phone},'%') or m.email like concat('%',  #{record.phone},'%'))
                <if test="record.account!=null and record.account!=''">
                    and (
                        m.phone like concat('%',  #{record.account},'%')
                        or m.email like concat('%',  #{record.account},'%')
                        or m.invite_id like concat('%',  #{record.account},'%')
                        )
                </if>
                <if test="record.accountStatus!=null">
                    and m.account_status = #{record.accountStatus}
@@ -23,4 +27,30 @@
        order by m.CREATED_TIME desc
    </select>
    <select id="getMallMemberInfoById" resultType="cc.mrbird.febs.mall.vo.MallMemberVo">
        SELECT a.name,
               a.phone,
               a.email,
               a.sex,
               a.invite_id,
               a.level,
               a.account_status,
               a.CREATED_TIME,
               b.name
               FROM mall_member a
            LEFT JOIN mall_member b on a.referrer_id = b.invite_id
            where a.id = #{id}
    </select>
    <select id="selectInfoByAccount" resultType="cc.mrbird.febs.mall.entity.MallMember">
        select * from mall_member where phone=#{account} or email=#{account}
    </select>
    <select id="selectInfoByInviteId" resultType="cc.mrbird.febs.mall.entity.MallMember">
        select * from mall_member where invite_id=#{inviteId}
    </select>
    <select id="selectInfoByAccountAndPwd" resultType="cc.mrbird.febs.mall.entity.MallMember">
        select * from mall_member where (phone=#{account} or email=#{account}) and password=#{password}
    </select>
</mapper>