| | |
| | | <if test="record.level!=null and record.level!=''"> |
| | | and m.level=#{record.level} |
| | | </if> |
| | | <if test="record.accountLevel!=null and record.accountLevel!=''"> |
| | | and m.account_level=#{record.accountLevel} |
| | | </if> |
| | | </if> |
| | | </where> |
| | | order by m.CREATED_TIME desc |
| | |
| | | a.account_status, |
| | | a.CREATED_TIME, |
| | | IFNULL(c.balance,0) balance, |
| | | IFNULL(c.score,0) score, |
| | | IFNULL(c.prize_score,0) prizeScore, |
| | | d.description levelName, |
| | | b.name |
| | | FROM mall_member a |
| | | LEFT JOIN mall_member b on a.referrer_id = b.invite_id |
| | | LEFT JOIN mall_member_wallet c on c.member_id = a.id |
| | | LEFT JOIN data_dictionary_custom d on d.code = a.level |
| | | LEFT JOIN data_dictionary_custom d on d.description = a.level |
| | | where a.id = #{id} |
| | | GROUP BY a.id |
| | | </select> |
| | | |
| | | <select id="selectInfoByAccount" resultType="cc.mrbird.febs.mall.entity.MallMember"> |
| | |
| | | or find_in_set(m.invite_id, e.referrer_ids) |
| | | ),0) amount |
| | | FROM mall_member m |
| | | left join data_dictionary_custom a on a.code = m.level |
| | | left join data_dictionary_custom a on a.description = m.level |
| | | <where> |
| | | and m.level != '代理' |
| | | <if test="record != null" > |
| | | <if test="record.name!=null and record.name!=''"> |
| | | and m.name like concat('%', #{record.name},'%') |
| | |
| | | |
| | | <select id="getAgentLevelListInPage" resultType="cc.mrbird.febs.mall.vo.AdminAgentLevelVo"> |
| | | SELECT |
| | | a.id,b.description name |
| | | a.id,a.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 |
| | | where a.type = 'MEMBER_AGENT_LEVEL' |
| | | 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 |
| | | left join data_dictionary_custom a on a.description = m.level |
| | | where find_in_set(#{record.inviteId}, m.referrer_ids) |
| | | GROUP BY m.id |
| | | ORDER BY |
| | |
| | | |
| | | |
| | | <select id="getAgentLevelSetInfoByMemberId" resultType="cc.mrbird.febs.mall.vo.AdminAgentLevelSetInfoVo"> |
| | | SELECT a.id,d.code levelCode |
| | | SELECT d.description levelCode |
| | | FROM mall_member a |
| | | LEFT JOIN data_dictionary_custom d on d.code = a.level |
| | | where a.id = #{id} and d.type = 'AGENT_LEVEL' |
| | | LEFT JOIN data_dictionary_custom d on d.description = a.level |
| | | where a.id = #{id} and d.type = 'MEMBER_AGENT_LEVEL' |
| | | GROUP BY a.id |
| | | </select> |
| | | |
| | |
| | | where level = #{level} |
| | | and FIND_IN_SET(#{inviteId}, referrer_ids) |
| | | </select> |
| | | |
| | | <update id="updateAccountLevelById"> |
| | | update mall_member |
| | | set |
| | | account_level = #{accountLevel} |
| | | where |
| | | id = #{id} |
| | | </update> |
| | | |
| | | <update id="updateLevelStatusById"> |
| | | update mall_member |
| | | set |
| | | level_status = #{levelStatus} |
| | | where |
| | | id = #{id} |
| | | </update> |
| | | </mapper> |