<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="cc.mrbird.febs.mall.mapper.MallMemberMapper">
|
|
<select id="selectMallMemberListInPage" resultType="cc.mrbird.febs.mall.entity.MallMember">
|
SELECT * 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.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>
|
</where>
|
order by m.CREATED_TIME desc
|
</select>
|
|
<select id="getMallMemberInfoById" resultType="cc.mrbird.febs.mall.vo.MallMemberVo">
|
SELECT a.name,
|
a.phone,
|
a.email,
|
a.sex,
|
a.invite_id,
|
a.level,
|
a.account_status,
|
a.CREATED_TIME,
|
c.balance,
|
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
|
where a.id = #{id}
|
</select>
|
|
<select id="selectInfoByAccount" resultType="cc.mrbird.febs.mall.entity.MallMember">
|
select * from mall_member where phone=#{account} or email=#{account}
|
</select>
|
|
<select id="selectInfoByInviteId" resultType="cc.mrbird.febs.mall.entity.MallMember">
|
select * from mall_member where invite_id=#{inviteId}
|
</select>
|
|
<select id="selectInfoByAccountAndPwd" resultType="cc.mrbird.febs.mall.entity.MallMember">
|
select * from mall_member where (phone=#{account} or email=#{account}) and password=#{password}
|
</select>
|
</mapper>
|