作者 wangzhi

xiugai

... ... @@ -481,15 +481,28 @@ class Sun extends Api
$Params = $this->request->param();
$Date = input('date');
$Map['s.createtime'] = ['between', [strtotime($Date), strtotime($Date) + 86399]];
$Info = Db::name('sun')
->alias('s')
->order('s.id desc')
->where($Map)
->join('time t', 't.id=s.time_id')
->join('plane p', 'p.id=s.plane_id')
->where('p.base_id', $Params['base_id'])
->field('s.id,s.plane_id,t.title as time_title,p.title as plane_title,s.status,s.user_id')
->select();
if (strtotime($Date) > 1629734400 || strtotime($Date) == 1629734400) {
$Info = Db::name('sun')
->alias('s')
->order('s.id desc')
->where($Map)
->join('time t', 't.id=s.time_id')
->join('plane p', 'p.id=s.plane_id')
->where('p.base_id', $Params['base_id'])
->field('s.id,s.plane_id,t.title as time_title,p.title as plane_title,s.status,s.user_id')
->select();
} else {
$Info = Db::name('sun')
->alias('s')
->order('s.id desc')
->where($Map)
->join('time t', 't.id=s.time_id')
->where('t.id', 'NEQ', 12)
->join('plane p', 'p.id=s.plane_id')
->where('p.base_id', $Params['base_id'])
->field('s.id,s.plane_id,t.title as time_title,p.title as plane_title,s.status,s.user_id')
->select();
}
if (empty($Info)) {
$List = [
'Time' => [],
... ...