升级php版本后错误修复

This commit is contained in:
2024-12-02 09:18:54 +08:00
parent f93a4b0dba
commit c1f4a1c7ce

View File

@@ -69,15 +69,17 @@ class PrescripDetailController extends BaseAppController
$query->andWhere(['p.prescription_type'=>$post['prescription_type']]);
}
if($post['start_time']?? false&&!$post['end_time']?? false){
$post['start_time'] = $post['start_time']?? false;
$post['end_time'] = $post['end_time']?? false;
if($post['start_time']&&!$post['end_time']){
$query->andWhere(['>=','p.created_at',strtotime($post['start_time'])]);
}
if(!$post['start_time']?? false&&$post['end_time']?? false){
if(!$post['start_time']&&$post['end_time']){
$query->andWhere(['<=','p.created_at',strtotime($post['end_time'])]);
}
if($post['start_time']?? false&&$post['end_time']?? false){
if($post['start_time']&&$post['end_time']){
$query->andWhere(['between','p.created_at',strtotime($post['start_time']),strtotime($post['end_time'])]);
}