self::whereTime('time','today')->select() //获取今天的数据
self::whereTime('time','yesterday')->select() //获取昨天的数据
self::whereTime('time','week')->select() //获取本周的数据
self::whereTime('time','last week')->select() //获取上一周的数据
self::whereTime('time','month')->select() //获取本月的数据
self::whereTime('time','year')->select() //获取今年的数据
self::whereTime('time','last year')->select() //获取去年的数据
获取上周、上个月、去年数据只需在时间前面加last即可!