repository = $repository; } /** * Common: 列表获取 * Author: wu-hui * Time: 2024/04/10 18:20 * @return mixed * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ public function getList(){ [$page, $limit] = $this->getPage(); $params = $this->request->params(['mer_take_name']); $data = $this->repository->getList((array)$params,(int)$page,(int)$limit); return app('json')->success($data); } /** * Common: 编辑信息 * Author: wu-hui * Time: 2024/04/10 18:19 * @return mixed * @throws \think\db\exception\DbException */ public function editInfo(){ $params = $this->request->params([ ['id', 0], 'mer_take_name', 'mer_take_phone', 'mer_take_location', 'mer_take_address', 'mer_take_day', 'mer_take_time' ]); $params['mer_id'] = (int)$this->request->merId(); $this->repository->editInfo($params); return app('json')->success(); } /** * Common: 删除信息 * Author: wu-hui * Time: 2024/04/10 18:42 * @param $id * @return mixed */ public function delInfo($id){ $id = (int)$this->request->param('id'); $this->repository->update($id,['is_del' => 1]); return app('json')->success('删除成功'); } }