<?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.system.mapper.UnableToAccessWebsiteListTodayMapper">
    
    <resultMap type="UnableToAccessWebsiteListToday" id="UnableToAccessWebsiteListTodayResult">
    	<id     property="id"      column="id"      />
        <result property="siteName"    column="site_name"    />
        <result property="accessCountFail"     column="access_count_fail"     />
        <result property="lastMonitorTime"     column="last_monitor_time"     />
    </resultMap>
    
    <sql id="selectUnableToAccessWebsiteListTodayVo">
        select id, site_name, access_count_fail, last_monitor_time from put_unable_to_access_website_list_today
    </sql>

    <select id="selectUnableToAccessWebsiteListTodayList" parameterType="UnableToAccessWebsiteListToday" resultMap="UnableToAccessWebsiteListTodayResult">
        <include refid="selectUnableToAccessWebsiteListTodayVo"/>
    </select>

	<delete id="deleteUnableToAccessWebsiteListTodayAll" parameterType="Long">
		delete from put_unable_to_access_website_list_today
	</delete>

	<insert id="insertBatch">
		insert into put_unable_to_access_website_list_today (site_name, access_count_fail,last_monitor_time) values
		<foreach item="item" collection="list" separator=",">
			(#{item.siteName},#{item.accessCountFail},#{item.lastMonitorTime})
		</foreach>
	</insert>


</mapper>