<?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.EduSecondClassVenueGuideMapper">
  <select id="listGuide" resultType="com.yida.data.school.vo.secondClass.VenueGuideVO">
    select id, name, avatar, status, remark
    from edu_second_class_venue_guide
      where del_flag = 0
        and venue_id = #{dto.venueId}
    <if test="dto.name != null and dto.name != ''">
      and name like concat('%', #{dto.name}, '%')
    </if>
    <if test="dto.status != null">
      and status = #{dto.status}
    </if>
    order by create_date desc
  </select>
</mapper>
