<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.attendance.dao.ibatis.AttendanceStaffStatDaoImpl">

    <select id="getListExt" parameterType="com.mortals.xhx.module.attendance.model.vo.AttendanceSummaryQuery" resultMap="AttendanceStaffStatEntity-Map">
        select s.*
        from mortals_xhx_attendance_staff_stat as s
        where s.staffId=#{staffId}
        AND STR_TO_DATE(CONCAT(s.`year`,'-',s.`month`,'-',s.`day`),'%Y-%m-%d') <![CDATA[ >= ]]> STR_TO_DATE(#{summaryTimeStart},'%Y-%m-%d')
        AND STR_TO_DATE(CONCAT(s.`year`,'-',s.`month`,'-',s.`day`),'%Y-%m-%d') <![CDATA[ <= ]]> STR_TO_DATE(#{summaryTimeEnd},'%Y-%m-%d')


    </select>
</mapper>