<?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.CountyDailyUpdateRankingMapper">
    
    <resultMap type="CountyDailyUpdateRanking" id="CountyDailyUpdateRankingResult">
    	<id     property="id"      column="id"      />
        <result property="ranking"    column="ranking"    />
        <result property="renewName"     column="renew_name"     />
        <result property="renewCount"     column="renew_count"     />
    </resultMap>
    
    <sql id="selectCountyDailyUpdateRankingVo">
        select id, ranking, renew_name, renew_count from sooka_county_daily_update_ranking
    </sql>

    <select id="selectCountyDailyUpdateRankingList" parameterType="CountyDailyUpdateRanking" resultMap="CountyDailyUpdateRankingResult">
        <include refid="selectCountyDailyUpdateRankingVo"/>
        order by ranking asc
    </select>

	<delete id="deleteCountyDailyUpdateRankingAll" parameterType="Long">
		delete from sooka_county_daily_update_ranking
	</delete>

	<insert id="insertBatch">
		insert into sooka_county_daily_update_ranking (ranking, renew_name, renew_count) values
		<foreach item="item" collection="list" separator=",">
			(#{item.ranking},#{item.renewName},#{item.renewCount})
		</foreach>
	</insert>


</mapper>