<?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.yunzhi.marketing.mapper.TaUvMapper">
    <select id="getLastVisitors" resultType="java.util.HashMap">
        SELECT
            t.person_id AS personId,
            t.name_ornick AS nikename,
            t.photo_oravatar AS avatar,
            date_format(t.create_date, "%Y-%m-%d %T") AS time
        FROM
            ta_uv t
        WHERE
            t.tagert_type = #{tagertType}
        AND t.be_uv = #{personId}
        ORDER BY
            t.create_date DESC
        LIMIT #{limit}
    </select>
</mapper>
