From 6f14021f87600100692bf8c41ded670a859d0403 Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Sat, 8 Oct 2022 12:16:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=BB=84=E4=BB=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/module/FormHandleModule.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/module/FormHandleModule.php b/app/module/FormHandleModule.php index 7e53fb166..280cd0b53 100644 --- a/app/module/FormHandleModule.php +++ b/app/module/FormHandleModule.php @@ -421,11 +421,11 @@ class FormHandleModule } } else { // 默认条件 - $this->where = empty($form_data['detail_where']) ? [] : $form_data['detail_where']; + $this->where = empty($this->out_params['detail_where']) ? ((!empty($form_data['detail_where']) && is_array($form_data['detail_where'])) ? $form_data['detail_where'] : []) : $this->out_params['detail_where']; // 单独处理条件 - $detail_dkey = empty($form_data['detail_dkey']) ? 'id' : $form_data['detail_dkey']; - $detail_pkey = empty($form_data['detail_pkey']) ? 'id' : $form_data['detail_pkey']; + $detail_dkey = empty($this->out_params['detail_dkey']) ? (empty($form_data['detail_dkey']) ? 'id' : $form_data['detail_dkey']) : $this->out_params['detail_dkey']; + $detail_pkey = empty($this->out_params['detail_pkey']) ? (empty($form_data['detail_pkey']) ? 'id' : $form_data['detail_pkey']) : $this->out_params['detail_pkey']; $value = empty($this->out_params[$detail_pkey]) ? 0 : $this->out_params[$detail_pkey]; $this->where[] = [$detail_dkey, '=', $value]; $db->where($this->where);