后台时间搜索更换

This commit is contained in:
2025-09-27 17:29:15 +08:00
parent e373fe3706
commit 9fdcf751ea
7 changed files with 29 additions and 29 deletions

View File

@@ -56,11 +56,11 @@ class GiveGift extends adminApi
// 时间筛选优化
if (!empty($start_time) || !empty($end_time)) {
if (!empty($start_time) && !empty($end_time)) {
$where['createtime'] = ['between', [strtotime($start_time), strtotime($end_time.' 23:59:59')]];
$where['createtime'] = ['between', [strtotime($start_time), strtotime($end_time)]];
} elseif (!empty($start_time)) {
$where['createtime'] = ['>=', strtotime($start_time)];
} elseif (!empty($end_time)) {
$where['createtime'] = ['<=', strtotime($end_time.' 23:59:59')];
$where['createtime'] = ['<=', strtotime($end_time)];
}
}
//礼物总数