|  |  |  | 
|---|
|  |  |  | where level=#{level} | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <select id="selectMemberWithLevelAndMemberId" resultType="cc.mrbird.febs.mall.entity.MallMember"> | 
|---|
|  |  |  | select * from mall_member | 
|---|
|  |  |  | where level=#{level} | 
|---|
|  |  |  | and find_in_set(#{inviteId}, referrer_ids) | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <select id="selectMemberIdWithLevel" resultType="java.lang.Long"> | 
|---|
|  |  |  | select id from mall_member | 
|---|
|  |  |  | where level = #{level} | 
|---|
|  |  |  | 
|---|
|  |  |  | b.fcm_cnt_ava fcmCntAva, | 
|---|
|  |  |  | b.fcm_cnt_frozen fcmCntFrozen, | 
|---|
|  |  |  | b.token_ava tokenAva, | 
|---|
|  |  |  | b.total_perk totalPerk, | 
|---|
|  |  |  | b.token_frozen tokenFrozen, | 
|---|
|  |  |  | a.account_login referrerName, | 
|---|
|  |  |  | d.description levelName | 
|---|
|  |  |  | FROM mall_member m | 
|---|
|  |  |  | left join mall_member a on m.referrer_id = a.invite_id | 
|---|
|  |  |  | left join mall_member_amount b on b.member_id = m.id | 
|---|
|  |  |  | LEFT JOIN data_dictionary_custom d on d.code = m.level and type='AGENT_LEVEL_REQUIRE' | 
|---|
|  |  |  | LEFT JOIN data_dictionary_custom d on d.code = m.level and d.type = m.level | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | <if test="record != null" > | 
|---|
|  |  |  | <if test="record.name!=null and record.name!=''"> | 
|---|
|  |  |  | 
|---|
|  |  |  | FROM mall_member_amount a | 
|---|
|  |  |  | where a.member_id = #{memberId} | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <select id="getMemberChargeListInPage" resultType="cc.mrbird.febs.mall.entity.MallMemberCharge"> | 
|---|
|  |  |  | select | 
|---|
|  |  |  | a.*, | 
|---|
|  |  |  | b.account_login accountLogin | 
|---|
|  |  |  | from mall_member_charge a | 
|---|
|  |  |  | left join mall_member b on a.member_id = b.id | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | <if test="record.accountLogin!=null and record.accountLogin!=''"> | 
|---|
|  |  |  | and b.account_login like concat('%',  #{record.accountLogin},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="record.address!=null and record.address!=''"> | 
|---|
|  |  |  | and a.address like concat('%',  #{record.address},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="record.status!=null"> | 
|---|
|  |  |  | and a.state = #{record.status} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | order by a.CREATED_TIME desc | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <select id="getMemberWithDrawListInPage" resultType="cc.mrbird.febs.mall.entity.MallMemberWithdraw"> | 
|---|
|  |  |  | select | 
|---|
|  |  |  | a.*, | 
|---|
|  |  |  | b.account_login accountLogin | 
|---|
|  |  |  | from mall_member_withdraw a | 
|---|
|  |  |  | left join mall_member b on a.member_id = b.id | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | <if test="record.accountLogin!=null and record.accountLogin!=''"> | 
|---|
|  |  |  | and b.account_login like concat('%',  #{record.accountLogin},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="record.address!=null and record.address!=''"> | 
|---|
|  |  |  | and a.remark like concat('%',  #{record.address},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="record.status!=null"> | 
|---|
|  |  |  | and a.status = #{record.status} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | order by a.CREATED_TIME desc | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | </mapper> | 
|---|