<?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="com.wzj.soopin.content.mapper.FansMapperCustom" >

    <select id="queryMyFollows" resultType="com.wzj.soopin.content.domain.vo.VlogerVO" parameterType="map">

        SELECT
            m.id as vlogerId,
            m.nickname as nickname,
            m.avatar as face,
            f.is_fan_friend_of_mine as bothFriend,
            f.created_time as createdTime
        FROM
            ums_fans f
        LEFT JOIN
            ums_member m
        ON
            f.vloger_id = m.id
        WHERE
            f.fan_id = #{paramMap.myId}
        ORDER BY
            f.created_time
        ASC

    </select>

  <select id="queryMyFans" resultType="com.wzj.soopin.member.domain.vo.FansVO" parameterType="map">

        SELECT
            m.id as fanId,
            m.nickname as nickname,
            m.avatar as face,
            f.is_fan_friend_of_mine as bothFriend,
            f.created_time as createdTime
        FROM
            ums_fans f
        LEFT JOIN
            ums_member m
        ON
            f.fan_id = m.id
        WHERE
            f.vloger_id = #{paramMap.myId}
        ORDER BY
            m.nickname
        ASC

    </select>

</mapper>
