|
- $pending_times = [
- // 7天
- 1 => [['pend', '<=', strtotime(date('Y-m-d 23:59:59', time()) . '+7day')], ['pend', '>=', strtotime(date('Y-m-d 23:59:59', time()))]],
- // 15天
- 2 => [['pend', '<=', strtotime(date('Y-m-d 23:59:59', time()) . '+15day')], ['pend', '>=', strtotime(date('Y-m-d 23:59:59', time()))]],
- // 30
- 3 => [['pend', '<=', strtotime(date('Y-m-d 23:59:59', time()) . '+30day')], ['pend', '>=', strtotime(date('Y-m-d 23:59:59', time()))]],
- // 90
- 4 => [['pend', '<=', strtotime(date('Y-m-d 23:59:59', time()) . '+90day')], ['pend', '>=', strtotime(date('Y-m-d 23:59:59', time()))]],
- ];
- if ($pending) {
- // 根据前端的索引搜索
- $where[] = $pending_times[$pending];
- }
复制代码
|
|