| | |
| | | <mapper namespace="cc.mrbird.febs.mall.mapper.MallMemberMapper"> |
| | | |
| | | <select id="selectMallMemberListInPage" resultType="cc.mrbird.febs.mall.entity.MallMember"> |
| | | SELECT m.*,a.name referrerName,IFNULL(c.balance,0) balance,IFNULL(c.score,0) score,IFNULL(c.prize_score,0) prizeScore,IFNULL(c.commission,0) commission |
| | | SELECT |
| | | m.* |
| | | FROM mall_member m |
| | | <where> |
| | | <if test="record != null" > |
| | | <if test="record.name!=null and record.name!=''"> |
| | | and m.name like concat('%', #{record.name},'%') |
| | | </if> |
| | | <if test="record.account!=null and record.account!=''"> |
| | | and ( |
| | | m.phone like concat('%', #{record.account},'%') |
| | | or m.email like concat('%', #{record.account},'%') |
| | | or m.bind_phone like concat('%', #{record.account},'%') |
| | | or m.invite_id like concat('%', #{record.account},'%') |
| | | ) |
| | | </if> |
| | | <if test="record.accountStatus!=null"> |
| | | and m.account_status = #{record.accountStatus} |
| | | </if> |
| | | <if test="record.accountType != null" > |
| | | and m.account_type = #{record.accountType} |
| | | </if> |
| | | <if test="record.level!=null and record.level!=''"> |
| | | and m.level=#{record.level} |
| | | </if> |
| | | <if test="record.isSale!=null and record.isSale!=''"> |
| | | and m.is_sale=#{record.isSale} |
| | | </if> |
| | | </if> |
| | | </where> |
| | | GROUP BY m.id order by m.CREATED_TIME desc |
| | | </select> |
| | | |
| | | <select id="selectMallMemberListInPageV2" resultType="cc.mrbird.febs.mall.entity.MallMember"> |
| | | SELECT |
| | | m.*, |
| | | a.name referrerName, |
| | | IFNULL(c.balance,0) balance, |
| | | IFNULL(c.score,0) score, |
| | | IFNULL(c.prize_score,0) prizeScore, |
| | | IFNULL(c.commission,0) commission |
| | | ,vipConfig.name levelName |
| | | FROM mall_member m |
| | | left join mall_member a on m.referrer_id = a.invite_id |