当天:
<![CDATA[ and wi.alarm_time >= DATE_FORMAT(NOW(), '%Y-%m-%d') and wi.alarm_time < DATE_ADD(DATE_FORMAT(NOW(), '%Y-%m-%d'), INTERVAL 1 day) ]]>
本月:
<![CDATA[ and wi.alarm_time>=DATE_ADD(curdate(),interval -day(curdate())+1 day) and wi.alarm_time
本周:
<![CDATA[ and wi.alarm_time>=date_sub(curdate(),INTERVAL WEEKDAY(curdate()) DAY) and wi.alarm_time
近七天:
<![CDATA[ and wi.alarm_time>=DATE_SUB(CURDATE(), INTERVAL 6 DAY) and wi.alarm_time