From e59e24ee6b64f143df8318ce38c91e13364c0bcf Mon Sep 17 00:00:00 2001 From: Hentua <wangdoubleone@gmail.com> Date: Tue, 06 Jun 2023 17:10:05 +0800 Subject: [PATCH] fix --- src/main/resources/mapper/modules/MallMemberMapper.xml | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main/resources/mapper/modules/MallMemberMapper.xml b/src/main/resources/mapper/modules/MallMemberMapper.xml index 4530945..fad5e17 100644 --- a/src/main/resources/mapper/modules/MallMemberMapper.xml +++ b/src/main/resources/mapper/modules/MallMemberMapper.xml @@ -43,7 +43,7 @@ </if> </if> </where> - order by m.CREATED_TIME desc + order by m.id desc </select> <select id="getMallMemberInfoById" resultType="cc.mrbird.febs.mall.vo.MallMemberVo"> @@ -482,24 +482,25 @@ </select> <select id="selectAgentOrPartnetMemberList" resultType="cc.mrbird.febs.mall.entity.MallMember"> - select * from mall_membebr a + select * from mall_member a where 1=1 <if test="level == 2"> - a.account_level in (2, 3) + and a.account_level in (2, 3) </if> <if test="level == 3"> - a.account_level = 3 + and 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} + <select id="selectOwnCntByInviteIdAndAccountLevel" resultType="java.lang.Integer"> + 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 test="accountLevel == 1 or accountLevel == 2"> + and x.account_level = #{accountLevel} </if> <if test="accountLevel == 3"> - and x.accountLevel in (2, 3) + and x.account_level in (2, 3) </if> </select> </mapper> \ No newline at end of file -- Gitblit v1.9.1