<?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.chinacreator.video.mapper.FlowLimitDao" >    
    <select id="getSpAopConf" parameterType="list" resultType="HashMap">
		SELECT * FROM TB_SP_AOP_CONFIG 
		<where>
		    1 = 1
		    <if test="productids != null and productids.size() > 0 ">
		        AND PRODUCT_ID IN
		        <foreach collection="productids" close=")" open="(" item="item" separator=",">
		            '${item}'
		        </foreach>
		    </if>
		</where>	
	</select>
	
	
	<select id="qrySpAopConfBySpid" parameterType="string" resultType="map">
		SELECT * FROM TB_SP_AOP_CONFIG WHERE SP_ID = #{spid}
	</select> 
    
    
    <select id="getSpAopConfBySpids" parameterType="list" resultType="HashMap">
		SELECT DISTINCT PRODUCT_ID, SP_ID FROM TB_SP_AOP_CONFIG 
		<where>
		    1 = 1
		    <if test="spids != null and spids.size() > 0 ">
		        AND SP_ID IN
		        <foreach collection="spids" close=")" open="(" item="item" separator=",">
		            '${item}'
		        </foreach>
		    </if>
		</where>	
	</select>
</mapper>