From 0d7e569cf8ebec23e490bff321de9c24844fce7e Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Mon, 15 Jan 2024 17:10:07 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E5=9F=BA=E5=9C=B0=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/FenceHouseController.php | 49 +++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 app/api/controller/FenceHouseController.php diff --git a/app/api/controller/FenceHouseController.php b/app/api/controller/FenceHouseController.php new file mode 100644 index 0000000..fd4dfa5 --- /dev/null +++ b/app/api/controller/FenceHouseController.php @@ -0,0 +1,49 @@ +dataLists(new FenceHouseLists()); + } + + public function add() + { + $params = (new FenceHouseValidate())->post()->goCheck('add'); + $result = FenceHouseLogic::add($params); + if (true === $result) { + return $this->success('添加成功', [], 1, 1); + } + return $this->fail(FenceHouseLogic::getError()); + } + + + /** + * @notes 编辑 + * @return \think\response\Json + * @author likeadmin + * @date 2024/01/10 15:15 + */ + public function edit() + { + $params = (new FenceHouseValidate())->post()->goCheck('edit'); + $result = FenceHouseLogic::edit($params); + if (true === $result) { + return $this->success('编辑成功', [], 1, 1); + } + return $this->fail(FenceHouseLogic::getError()); + } + + public function detail() + { + $params = (new FenceHouseValidate())->goCheck('detail'); + $result = FenceHouseLogic::detail($params); + return $this->data($result); + } +} \ No newline at end of file