<!-- AdLogMapper.xml -->
<mapper namespace="com.ruoyi.novel.mapper.AdLogMapper">

    <resultMap id="AdLogResult" type="AdLog">
        <id property="id" column="id" />
        <result property="userId" column="user_id" />
        <result property="chapterId" column="chapter_id" />
        <result property="adPlatform" column="ad_platform" />
        <result property="viewTime" column="view_time" />
        <result property="deviceInfo" column="device_info" />
        <result property="syncStatus" column="sync_status" />
    </resultMap>

    <sql id="selectAdLogVo">
        SELECT id, user_id, chapter_id, ad_platform, view_time, device_info, sync_status
        FROM novel_ad_log
    </sql>

    <update id="updateSyncStatus">
        UPDATE novel_ad_log
        SET sync_status = #{status}
        WHERE id IN
        <foreach item="id" collection="ids" open="(" separator="," close=")">
            #{id}
        </foreach>
    </update>
</mapper>