KKSU
2024-12-10 6b9774009b899e4759a4d59aeea93aed49d9c6ee
src/main/resources/mapper/modules/MallMemberMapper.xml
@@ -11,8 +11,8 @@
        left join mall_vip_config vipConfig on m.level = vipConfig.code
        <where>
            <if test="record != null" >
                <if test="record.birthday!=null">
                    and m.birthday = #{record.birthday}
                <if test="record.birthdayQuery!=null">
                    and date_format(m.birthday, '%m-%d') = date_format(#{record.birthdayQuery}, '%m-%d')
                </if>
                <if test="record.name!=null and record.name!=''">
                    and m.name like concat('%',  #{record.name},'%')
@@ -39,7 +39,9 @@
                </if>
            </if>
        </where>
        GROUP BY m.id order by m.CREATED_TIME desc
        GROUP BY
        m.id, a.NAME, c.balance, c.score, c.prize_score, c.commission, vipConfig.NAME
        order by m.CREATED_TIME desc
    </select>
    <select id="getMallMemberInfoById" resultType="cc.mrbird.febs.mall.vo.MallMemberVo">
@@ -63,6 +65,17 @@
            LEFT JOIN data_dictionary_custom d on d.code = a.level
            where a.id = #{id}
            GROUP BY a.id
    </select>
    <select id="getMallMemberWalletById" resultType="cc.mrbird.febs.mall.vo.MallMemberVo">
        SELECT a.id,
               a.name,
               IFNULL(c.balance,0) balance,
               IFNULL(c.score,0) score,
               IFNULL(c.prize_score,0) prizeScore
        FROM mall_member a
                 LEFT JOIN mall_member_wallet c on c.member_id = a.id
        where a.id = #{id}
    </select>
    <select id="selectInfoByAccount" resultType="cc.mrbird.febs.mall.entity.MallMember">
@@ -442,4 +455,12 @@
        where id = #{id}
    </update>
    <update id="updateLastLogin">
        update mall_member
        set last_login_time = #{lastLogin}
        where id = #{id}
    </update>
</mapper>