<?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.yd.dal.mapper.practitioner.PractitionerArticleMapper">
    <select id="articleTrackQuery" resultType="com.yd.dal.entity.practitioner.article.ArticleTrackQueryInfo">
        SELECT ost.image_path imagePath,
               ost.nickname nickName,
               date_format(ost.track_in_time,'%Y-%m-%d %H:%i:%s') trackInTime,
               ost.gender gender
        FROM ag_acl_customer_object_share_track ost
        WHERE share_id IN (SELECT os.id
                           FROM ag_acl_customer_object_share os
                           WHERE os.practitioner_id = #{practitionerId,jdbcType=BIGINT}
                             AND item_type = 1
                             AND item_id = #{sharingId,jdbcType=BIGINT})
        ORDER BY ost.track_in_time DESC
    </select>
</mapper>