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}"; }