<?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.njcn.gather.err.mapper.PqErrSysMapper">


    <select id="getCountBoundByIds" resultType="java.lang.Integer">
        SELECT COUNT(*) FROM ad_plan
        <if test="ids!= null and ids.size() > 0">
            <where>
                AND Error_Sys_Id IN
                <foreach collection="ids" item="id" open="(" separator="," close=")">
                    #{id}
                </foreach>
            </where>
        </if>
        and State = 1
    </select>
</mapper>

