作者 景龙
1 个管道 的构建 通过 耗费 6 秒

修改培训演习时间检索

... ... @@ -239,7 +239,7 @@ class PersonController extends RestBaseController
if($res){
$this->success('重置密码成功');
}else{
$this->error('重置密码失败');
$this->error('重置密码与原密码一致,请重新重置');
}
}else{
$this->error('请求方式错误!');
... ...
... ... @@ -246,11 +246,11 @@ class CommonController extends RestBaseController
$startTime = isset($data['start_time'])&&!empty($data['start_time'])?$data['start_time']:'';
$endTime = isset($data['end_time'])&&!empty($data['end_time'])?$data['end_time']:'';
if (!empty($startTime)) {
$startTime = strtotime(date('Y-m-d'),$startTime);
$startTime = strtotime(date('Y-m-d',$startTime));
$query->where('t.train_time', '>=', $startTime);
}
if (!empty($endTime)) {
$endTime = strtotime(date('Y-m-d'),$endTime)+86400;
$endTime = strtotime(date('Y-m-d',$endTime))+86400;
$query->where('t.train_time', '<=', $endTime);
}
})
... ... @@ -279,11 +279,11 @@ class CommonController extends RestBaseController
$startTime = isset($data['start_time'])&&!empty($data['start_time'])?$data['start_time']:'';
$endTime = isset($data['end_time'])&&!empty($data['end_time'])?$data['end_time']:'';
if (!empty($startTime)) {
$startTime = strtotime(date('Y-m-d'),$startTime);
$startTime = strtotime(date('Y-m-d',$startTime));
$query->where('t.train_time', '>=', $startTime);
}
if (!empty($endTime)) {
$endTime = strtotime(date('Y-m-d'),$endTime)+86400;
$endTime = strtotime(date('Y-m-d',$endTime))+86400;
$query->where('t.train_time', '<=', $endTime);
}
})
... ... @@ -308,11 +308,11 @@ class CommonController extends RestBaseController
$startTime = isset($data['start_time'])&&!empty($data['start_time'])?$data['start_time']:'';
$endTime = isset($data['end_time'])&&!empty($data['end_time'])?$data['end_time']:'';
if (!empty($startTime)) {
$startTime = strtotime(date('Y-m-d'),$startTime);
$startTime = strtotime(date('Y-m-d',$startTime));
$query->where('t.exercise_time', '>=', $startTime);
}
if (!empty($endTime)) {
$endTime = strtotime(date('Y-m-d'),$endTime)+86400;
$endTime = strtotime(date('Y-m-d',$endTime))+86400;
$query->where('t.exercise_time', '<=', $endTime);
}
})
... ... @@ -341,11 +341,11 @@ class CommonController extends RestBaseController
$startTime = isset($data['start_time'])&&!empty($data['start_time'])?$data['start_time']:'';
$endTime = isset($data['end_time'])&&!empty($data['end_time'])?$data['end_time']:'';
if (!empty($startTime)) {
$startTime = strtotime(date('Y-m-d'),$startTime);
$startTime = strtotime(date('Y-m-d',$startTime));
$query->where('t.exercise_time', '>=', $startTime);
}
if (!empty($endTime)) {
$endTime = strtotime(date('Y-m-d'),$endTime)+86400;
$endTime = strtotime(date('Y-m-d',$endTime))+86400;
$query->where('t.exercise_time', '<=', $endTime);
}
})
... ...