<?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.yida.data.school.secondClass.mapper.EduSecondclassVenueExhibitGroupMapper">
  <select id="listGroup" resultType="com.yida.data.school.vo.secondClass.VenueExhibitGroupVO">
    select a.id, a.name, count(b.id) exhibitNum,a.cover_url
    from edu_second_class_venue_exhibit_group a
           left join edu_second_class_venue_exhibit b on a.id = b.group_id and b.del_flag = 0
    where a.del_flag = 0
      and a.venue_id = #{venueId}
    group by a.id, a.name, a.create_date
    order by a.create_date
  </select>
</mapper>
