<?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.template.mapper.AlumniReturnMapper">
    <resultMap type="com.template.model.vo.ApplicationReturnPageVo" id="ApplicationReturnDatasMap">
        <result property="id" column="id"/>
        <result property="name" column="name"/>
        <result property="cardNumber" column="card_number"/>
        <result property="phone" column="phone"/>
        <result property="schoolId" column="school_id"/>
        <result property="returnsTime" column="returns_time"/>
        <result property="returneTime" column="returne_time"/>
        <result property="createTime" column="create_time"/>
        <result property="isPass" column="is_pass"/>
        <result property="remark" column="remark"/>
    </resultMap>
    <select id="applicationReturnDatas" resultType="com.template.model.vo.ApplicationReturnPageVo"
            resultMap="ApplicationReturnDatasMap">
        select id,name,card_number,phone,school_id,returns_time,returne_time,create_time,is_pass,remark
        from alumni_return
        where deleted = 0
        <if test="userId != null and userId != 0">
            and create_user = #{userId}
        </if>
        <if test="weekType != null and weekType != ''">
            ${weekType}
        </if>
        order by create_time desc
    </select>
</mapper>
