<?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.AreaInteractiveColumnsMapper">
    
    <resultMap type="AreaInteractiveColumns" id="AreaInteractiveColumnsResult">
    	<id     property="id"      column="id"      />
        <result property="areaName"    column="area_name"    />
        <result property="areaReply"     column="area_reply"     />
        <result property="areaLeaveCount"     column="area_leave_count"     />
        <result property="areaReplyCount"     column="area_reply_count"     />
    </resultMap>
    
    <sql id="selectAreaInteractiveColumnsVo">
        select id, area_name, area_reply, area_leave_count, area_reply_count from sooka_areainteractive_columns
    </sql>

    <select id="selectAreaInteractiveColumnsList" parameterType="AreaInteractiveColumns" resultMap="AreaInteractiveColumnsResult">
        <include refid="selectAreaInteractiveColumnsVo"/>
    </select>

	<delete id="deleteAreaInteractiveColumnsAll" parameterType="Long">
		delete from sooka_areainteractive_columns
	</delete>

	<insert id="insertBatch">
		insert into sooka_areainteractive_columns (area_name, area_reply, area_leave_count, area_reply_count) values
		<foreach item="item" collection="list" separator=",">
			(#{item.areaName},#{item.areaReply},#{item.areaLeaveCount},#{item.areaReplyCount})
		</foreach>
	</insert>


</mapper>