<?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.ColumnPageViewMapper">
    
    <resultMap type="ColumnPageView" id="ColumnPageViewResult">
    	<id     property="id"      column="id"      />
        <result property="columnRanking"    column="column_ranking"    />
        <result property="ranking"     column="ranking"     />
        <result property="browse"     column="browse"     />
    </resultMap>
    
    <sql id="selectColumnPageViewVo">
        select id, column_ranking, ranking, browse from sooka_column_pageview
    </sql>

    <select id="selectColumnPageViewList" parameterType="ColumnPageView" resultMap="ColumnPageViewResult">
        <include refid="selectColumnPageViewVo"/>
        order by column_ranking asc
    </select>

	<delete id="deleteColumnPageViewAll" parameterType="Long">
		delete from sooka_column_pageview
	</delete>

	<insert id="insertBatch">
		insert into sooka_column_pageview (column_ranking, ranking, browse) values
		<foreach item="item" collection="list" separator=",">
			(#{item.columnRanking},#{item.ranking},#{item.browse})
		</foreach>
	</insert>


</mapper>