<?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.smart.mapper.EduSmartWelcomeGuideMapper">

    <!-- 查询迎新指南列表数据 -->
    <select id="listGuidePage" resultType="com.yida.data.school.vo.smart.GuideSelectPageVO">
        SELECT
            *
        FROM
            edu_smart_welcome_guide
        WHERE
            del_flag = 0
          AND dept_id = #{dto.deptId}
          <if test='dto.guideTitle != null and dto.guideTitle != ""'>
              AND guide_title LIKE CONCAT( '%', #{dto.guideTitle}, '%' )
          </if>
          <if test="dto.enableStatus != null">
              AND enable_status = #{dto.enableStatus}
          </if>
        ORDER BY
            enable_status DESC,
            create_date DESC
    </select>

</mapper>
