<?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.VisitingWebsiteRankingMapper">
    
    <resultMap type="VisitingWebsiteRanking" id="VisitingWebsiteRankingResult">
    	<id     property="id"      column="id"      />
        <result property="deptNames"    column="dept_names"    />
        <result property="deptDatas"     column="dept_datas"     />
    </resultMap>
    
    <sql id="selectVisitingWebsiteRankingVo">
        select id, dept_names, dept_datas from sooka_visiting_website_ranking
    </sql>

    <select id="selectVisitingWebsiteRankingList" parameterType="VisitingWebsiteRanking" resultMap="VisitingWebsiteRankingResult">
        <include refid="selectVisitingWebsiteRankingVo"/>
    </select>

	<delete id="deleteVisitingWebsiteRankingAll" parameterType="Long">
		delete from sooka_visiting_website_ranking
	</delete>

	<insert id="insertBatch">
		insert into sooka_visiting_website_ranking (dept_names, dept_datas) values
		<foreach item="item" collection="list" separator=",">
			(#{item.deptNames},#{item.deptDatas})
		</foreach>
	</insert>


</mapper>