<?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.ytpm.dao.AppVideoWatchMapper">

    <select id="getVideoPlayCount" resultType="java.lang.Integer">
        select
        COUNT(*)
        from yt_app_video_watch_record
        where user_id = #{userId}
        and app_id = #{appId}
        and DATE_FORMAT(watch_time, '%Y-%m-%d') = CURRENT_DATE()
    </select>
</mapper>