From 678f3e0e614320b8674acdd8f332f50c4d1ef949 Mon Sep 17 00:00:00 2001 From: pengda <10266652509@qq.com> Date: Wed, 18 Sep 2024 19:20:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8D=AF=E6=96=B9=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/mFormula.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/model/mFormula.php b/model/mFormula.php index 904a298..1fe723a 100644 --- a/model/mFormula.php +++ b/model/mFormula.php @@ -56,6 +56,8 @@ class mFormula extends mBase { $formula_arr = $this->getFormulaHerbData($formula_ids); foreach ($data as &$da) { + //格式化日期 + $da['create_time'] = date('Y-m-d', strtotime($da['create_time'])); if (isset($formula_arr[$da['id']])) { $da['formula'] = $formula_arr[$da['id']]; } @@ -85,6 +87,10 @@ class mFormula extends mBase { foreach ($condition as $key => $val) { if ($key == 'name') { $where .= " and {$key} like '%{$val}%'"; + } elseif ($key == 'uid' && is_array($val)) { + $val = implode(',', $val); + + $where .= " and {$key} in ({$val})"; } else { $where .= " and {$key}={$val}"; }