<?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.MunicipalErrorLinkMonitorMapper">
    
    <resultMap type="MunicipalErrorLinkMonitor" id="MunicipalErrorLinkMonitorResult">
    	<id     property="id"      column="id"      />
        <result property="siteName"    column="site_name"    />
        <result property="errorCount"     column="error_count"     />
        <result property="maliciousCount"     column="malicious_count"     />
        <result property="gambleCount"     column="gamble_count"     />
    </resultMap>
    
    <sql id="selectMunicipalErrorLinkMonitorVo">
        select id, site_name, error_count, malicious_count, gamble_count from sooka_municipal_error_link_monitor
    </sql>

    <select id="selectMunicipalErrorLinkMonitorList" parameterType="MunicipalErrorLinkMonitor" resultMap="MunicipalErrorLinkMonitorResult">
        <include refid="selectMunicipalErrorLinkMonitorVo"/>
    </select>

	<delete id="deleteMunicipalErrorLinkMonitorAll" parameterType="Long">
		delete from sooka_municipal_error_link_monitor
	</delete>

	<insert id="insertBatch">
		insert into sooka_municipal_error_link_monitor (site_name, error_count, malicious_count, gamble_count) values
		<foreach item="item" collection="list" separator=",">
			(#{item.siteName},#{item.errorCount},#{item.maliciousCount},#{item.gambleCount})
		</foreach>
	</insert>


</mapper>