<?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.project.mapper.secondary.SecondaryWcmmetatablegovdocnewsMapper">

    <!-- 查询最近10分钟内的数据（多siteid条件） -->
    <select id="selectRecentDataBySiteids" resultType="com.ruoyi.project.domain.Wcmmetatablegovdocnews">
        select '1955079551836528641' as tenantId,wd.docid as id,99 as record,wd.docid,wd.doctitle as title,wd.doccontent as content,wd.docreltime as time,wd.opertime as scantime,wd.docpuburl as url,wb.sitedesc as sitename,1 as version from wcmdocument wd
        left join wcmwebsite wb on wd.siteid=wb.siteid
        WHERE wd.opertime >= #{tenMinutesAgo} and wd.doctype=20 and wd.docstatus in(8,10,12,1027) and wd.docpuburl is not null
        <!--AND wd.siteid IN
        <foreach collection="siteids" item="siteid" open="(" separator="," close=")">
            #{siteid}
        </foreach>-->
        ORDER BY wd.opertime DESC
    </select>

</mapper>