<?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.form.apply.mapper.CoreApplyFormMapper">

    <!-- 查询申请表单列表数据 -->
    <select id="listApplyFormPage"
            resultType="com.yida.data.customForm.vo.apply.ApplyFormSelectPageVO">
        select
            *
        from core_apply_form
        where del_flag = 0
        and school_id = #{dto.deptId}
        <if test='dto.formTitle != null and dto.formTitle != ""'>
            and form_title like concat ('%', #{dto.formTitle}, '%')
        </if>
        <if test='dto.status !=null'>
            and status = #{dto.status}
        </if>
        order by
            create_date desc
    </select>

    <!-- 返回int类型数据的动态sql -->
    <select id="initSqlReturnInt" resultType="int">
        ${sql}
    </select>

    <!-- 没有返回值的动态sql -->
    <select id="initSqlReturnVoid">
        ${sql}
    </select>

</mapper>
