From 5e7a9ed0cb01278e936c0983be853d4213bfd6b1 Mon Sep 17 00:00:00 2001 From: air <30444667+sszdot@users.noreply.github.com> Date: Thu, 12 Jun 2025 12:02:51 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=B1=BB=20=20=E5=9E=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9Afeat=20=E3=80=90=E5=8E=9F=20=20=E5=9B=A0=E3=80=91?= =?UTF-8?q?=EF=BC=9A=E7=A6=81=E9=A3=9E=E5=8C=BA=20=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20=20=E6=9C=AA=E5=AE=8C=E5=BE=85=E7=BB=AD=20?= =?UTF-8?q?=E3=80=90=E8=BF=87=20=20=E7=A8=8B=E3=80=91=EF=BC=9A=20=E3=80=90?= =?UTF-8?q?=E5=BD=B1=20=20=E5=93=8D=E3=80=91=EF=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动 --- .../Controller/PlaneController.class.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/FlyCube/MpApi/Controller/PlaneController.class.php b/FlyCube/MpApi/Controller/PlaneController.class.php index eabd0e5..7fd695e 100644 --- a/FlyCube/MpApi/Controller/PlaneController.class.php +++ b/FlyCube/MpApi/Controller/PlaneController.class.php @@ -518,6 +518,30 @@ class PlaneController extends PublicController echo json_encode(array('status' => 0, 'msg' => '删除失败')); } } + /** + * @description: 设置禁飞区 + */ + public function setNofly() + { + //总管理员 可接收任何shop_id 非总管理员 只可以调用自身shop_id 否则会中断 + $this->isPower(); + + if ($_REQUEST['shop_id']) { + $noflyDb = D('nofly'); + $where['shop_id'] = $_REQUEST['shop_id']; + $data['nofly_data'] = $_REQUEST['nofly_data']; + $data['restrictfly_data'] = $_REQUEST['restrictfly_data']; + + //录入数据库 + if ($noflyDb->where($where)->save($data)) { + echo json_encode(array('status' => 1, 'msg' => '创建成功')); + } else { + echo json_encode(array('status' => 0, 'msg' => '创建失败')); + } + } else { + echo json_encode(array('status' => 0, 'msg' => '参数有误')); + } + } /** * @description: 飞机在站点上注册航线或注销航线 并处理对应的订单 ps:用处理事务 保证两表同步 */