<?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.sundot.airport.exam.mapper.ExamRecMapper">

    <select id="getCountExamRec" resultType="com.sundot.airport.exam.common.model.result.ExamCountResult">
        SELECT `pc_id`, COUNT(0) count
        FROM `edu_cs_exam_rec`
        WHERE `del_status` = 0
        AND `usr_id` = #{uid}
        AND `er_client_type` = #{clientType}
        AND `enable_status` = true
        <if test="pcIds != null and pcIds.size() > 0">
            AND `pc_id` IN
            <foreach collection="pcIds" item="pcId" index="index" open="(" close=")" separator=",">
                #{pcId}
            </foreach>
        </if>
    </select>
</mapper>
