作者 王智

修改

... ... @@ -362,7 +362,7 @@ class Question extends Api
//指定日起止时间戳
$YMD = explode('-', $v['date']);
$StarTime = mktime(0, 0, 0, $YMD[1], $YMD[2], $YMD[0]);
$EndTime = mktime(0, 0, 0, $YMD[1], $YMD[2], $YMD[0]) - 1;
$EndTime = mktime(0, 0, 0, $YMD[1], $YMD[2] + 1, $YMD[0]) - 1;
$map['createtime'] = ['between', [$StarTime, $EndTime]];
$List = Db::name('sleep')->where('user_id', $UserId)->where('type', 1)->where($map)->select();
foreach ($List as $key => $value) {
... ...