xiaoyong931011
2021-12-16 d59a9f1237c790375d34abf29b6fc9b3c1a7feac
src/main/resources/mapper/modules/VideoMemberMapper.xml
@@ -3,7 +3,7 @@
<mapper namespace="cc.mrbird.febs.video.mapper.VideoMemberMapper">
    <select id="selectInfoByAccount" resultType="cc.mrbird.febs.video.entity.VideoMemberEntity">
        select * from video_member where phone=#{account} or email=#{account} or invite_id=#{account}
        select * from video_member where account=#{account}  or invite_id=#{account}
    </select>
    <select id="selectInfoByInviteId" resultType="cc.mrbird.febs.video.entity.VideoMemberEntity">
@@ -11,7 +11,34 @@
    </select>
    <select id="selectInfoByAccountAndPwd" resultType="cc.mrbird.febs.video.entity.VideoMemberEntity">
        select * from video_member where (phone=#{account} or email=#{account}) and password=#{password}
        select * from video_member where account=#{account} and password=#{password}
    </select>
    <select id="selectVideoMemberListInPage" resultType="cc.mrbird.febs.video.entity.VideoMemberEntity">
        SELECT a.*
        FROM video_member a
        <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>
        </where>
        order by m.CREATED_TIME desc
    </select>
</mapper>