<?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.epidemic.mapper.EpidemicBaseDataMapper">

    <select id="lastEpidemic" resultType="com.yida.data.common.core.entity.epidemic.EpidemicBaseData">
    SELECT * FROM `epidemic_base_data`
    WHERE del_flag = 0
    <if test="deptId != null">
        dept_id  = #{deptId}
    </if>
    ORDER BY create_date desc
    LIMIT 1
    </select>
</mapper>
