xiaoyong931011
2023-05-08 e94e6721a4aeb8c21e97878239ec3429fc76d1ad
src/main/resources/mapper/modules/MallMemberMapper.xml
@@ -12,6 +12,8 @@
               IFNULL(c.commission,0) commission,
               IFNULL(c.star,0) star,
               IFNULL(c.total_score,0) totalScore,
               IFNULL(c.voucher_cnt,0) voucherCnt,
               IFNULL(c.voucher_amount,0) voucherAmount,
               d.description levelName
        FROM mall_member m
        left join mall_member a on m.referrer_id = a.invite_id
@@ -21,6 +23,9 @@
            <if test="record != null" >
                <if test="record.name!=null and record.name!=''">
                    and m.name like concat('%',  #{record.name},'%')
                </if>
                <if test="record.accountLogin!=null and record.accountLogin!=''">
                    and m.account_login like concat('%',  #{record.accountLogin},'%')
                </if>
                <if test="record.account!=null and record.account!=''">
                    and (
@@ -161,6 +166,9 @@
        left join data_dictionary_custom a on a.code = m.level
        <where>
            <if test="record != null" >
                <if test="record.accountLogin!=null and record.accountLogin!=''">
                    and m.account_login like concat('%',  #{record.accountLogin},'%')
                </if>
                <if test="record.name!=null and record.name!=''">
                    and m.name like concat('%',  #{record.name},'%')
                </if>
@@ -431,4 +439,31 @@
        from mall_member
        where store_master = #{state}
    </select>
    <select id="selectByRole" resultType="cc.mrbird.febs.mall.entity.MallMember">
        select * from mall_member
        <where>
            <if test="type == 3">
                and creater = #{state}
            </if>
            <if test="type == 4">
                and partner = #{state}
            </if>
        </where>
    </select>
    <select id="selectByLevel" resultType="cc.mrbird.febs.mall.entity.MallMember">
        select * from mall_member
        where level = #{level}
    </select>
    <select id="selectByAccountLogin" resultType="cc.mrbird.febs.mall.entity.MallMember">
        select * from mall_member
        where account_login = #{accountLogin}
    </select>
    <select id="selectInfoByAccountLoginAndPwd" resultType="cc.mrbird.febs.mall.entity.MallMember">
        select * from mall_member
        where account_login = #{accountLogin} and password = #{password}
    </select>
</mapper>