<?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.CensusElementsMapper">
    
    <resultMap type="CensusElements" id="CensusElementsResult">
    	<id     property="id"      column="id"      />
        <result property="siteName"    column="site_name"    />
        <result property="result"     column="result"     />
        <result property="censusTime"     column="census_time"     />
        <result property="remark"     column="remark"     />
    </resultMap>
    
    <sql id="selectCensusElementsVo">
        select id, site_name, result, census_time, remark from sooka_census_elements
    </sql>

    <select id="selectCensusElementsList" parameterType="CensusElements" resultMap="CensusElementsResult">
        <include refid="selectCensusElementsVo"/>
    </select>

	<delete id="deleteCensusElementsAll" parameterType="Long">
		delete from sooka_census_elements
	</delete>

	<insert id="insertBatch">
		insert into sooka_census_elements (site_name, result, census_time, remark) values
		<foreach item="item" collection="list" separator=",">
			(#{item.siteName},#{item.result},#{item.censusTime},#{item.remark})
		</foreach>
	</insert>


</mapper>