MySQL 的yearweek函数默认是从周日~周六,需求需要从周一到周日,看了MySQL的文档后,按照如下使用即可更改开始日期。 http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_week 形如: AND yearweek(from_unixtime(createTime/1000, '%Y-%m-%d'), 1) = yearweek(#{dayTime}, 1) 转载于:https://www.cnblogs.com/asfeixue/p/4871397.html