<?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.ruoyi.xq.mapper.UserVisitorMapper">

    <update id="incsVisitorCount">
        update xq_user_visitor
        set visitor_num = visitor_num + 1
        where id = #{id}
    </update>
    <select id="pageApp" resultType="com.ruoyi.xq.dto.app.uservisitor.vo.UserVisitorListVo">
        select t2.id as user_id, t2.avatar, t2.gender, t2.nickname, t2.birthday, t2.residence_city,
               t2.education, t2.profession, t1.visitor_num
        from xq_user_visitor t1
        join xq_user t2 on t1.user_id = t2.id
        where tar_id = #{query.userId}
    </select>


</mapper>
