<?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.CountyAndDistrictMisprintMapper">
    
    <resultMap type="CountyAndDistrictMisprint" id="CountyAndDistrictMisprintResult">
    	<id     property="id"      column="id"      />
        <result property="misprintName"    column="misprint_name"    />
        <result property="misprintCount"     column="misprint_count"     />
    </resultMap>
    
    <sql id="selectCountyAndDistrictMisprintVo">
        select id, misprint_name, misprint_count from sooka_county_and_district_misprint
    </sql>

    <select id="selectCountyAndDistrictMisprintList" parameterType="CountyAndDistrictMisprint" resultMap="CountyAndDistrictMisprintResult">
        <include refid="selectCountyAndDistrictMisprintVo"/>
    </select>

	<delete id="deleteCountyAndDistrictMisprintAll" parameterType="Long">
		delete from sooka_county_and_district_misprint
	</delete>

	<insert id="insertBatch">
		insert into sooka_county_and_district_misprint (misprint_name, misprint_count) values
		<foreach item="item" collection="list" separator=",">
			(#{item.misprintName},#{item.misprintCount})
		</foreach>
	</insert>


</mapper>