<?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.program.mapper.EduSmallProgramMapper">
	
	<!-- 查询小程序列表数据 -->
	<select id="listSmallProgramPage"
			resultType="com.yida.data.common.core.entity.program.EduSmallProgram">
		SELECT
			*
		FROM
			edu_small_program
		WHERE
			del_flag = 0
			and dept_id = #{dto.deptId}
		<if test='dto.smallProgramName != null and dto.smallProgramName != ""'>
			AND small_program_name LIKE CONCAT( '%', #{dto.smallProgramName}, '%' )
		</if>
		<if test="dto.showPosition != null">
			and show_position = #{dto.showPosition}
		</if>
		ORDER BY
			create_date DESC
	</select>
    <select id="listSmallProgramDeptVO" resultType="com.yida.data.school.vo.program.ListSmallProgramDeptVO">
		select
		dept_id,
		dept_name
		from
		edu_small_program
		where
		del_flag = 0
	</select>
</mapper>
