getPageValue(); $list = $this->dao->getList($where, ['*'], $page, $limit, ['user', 'systemForm']); $count = $this->dao->count($where); return compact('list', 'count'); } /** * 保存系统表单收集数据 * @param array $form * @param int $type * @return bool */ public function setFormData(array $form, int $type = 1) { if (!$form) { throw new ValidateException('缺少表单收集数据'); } /** @var SystemFormServices $systemFormServices */ $systemFormServices = app()->make(SystemFormServices::class); $form['value'] = $systemFormServices->handleForm($form['value'] ?? []); $form['value'] = json_encode($form['value']); $data = ['type' => $type, 'add_time' => time()]; switch ($type) { case 1://订单 $data = array_merge($data, $form); break; } if ($data) { $this->dao->save($data); } return true; } }