<?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.zcloud.fire.check.persistence.mapper.FireCheckListItemMapper">

    <select id="statisticListByFireCheckIdList"  resultType="com.zcloud.fire.check.persistence.dataobject.FireCheckListItemStatisticDO">
        select fire_check_id as fireCheckId, count(distinct fire_point_id) as fireCheckItemCount
            from fire_check_list_item
            where
            delete_enum='FALSE' and fire_check_id in
            <foreach collection="fireCheckIdList" item="fireCheckId" open="(" close=")" separator=",">
                #{fireCheckId}
            </foreach>
            group by fire_check_id
        order by create_time desc
    </select>
</mapper>

