From 06ed50c94cb2d50820fb028c9ce5125b4161a4e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Thu, 27 Oct 2022 15:14:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20221013045839_install_user_data.php | 3766 +--------------- .../20221013045840_install_user_region.php | 3780 +++++++++++++++++ .../20221013045839_install_user_data.php | 3766 +--------------- .../20221013045840_install_user_region.php | 3780 +++++++++++++++++ 4 files changed, 7562 insertions(+), 7530 deletions(-) create mode 100644 app/data/database/20221013045840_install_user_region.php create mode 100644 database/migrations/20221013045840_install_user_region.php diff --git a/app/data/database/20221013045839_install_user_data.php b/app/data/database/20221013045839_install_user_data.php index 4701a3b9b..796e64d8f 100644 --- a/app/data/database/20221013045839_install_user_data.php +++ b/app/data/database/20221013045839_install_user_data.php @@ -1,7 +1,6 @@ createMenu(); - $this->createRegion(); } /** * 创建菜单 * @return boolean */ - private function createMenu(): bool + protected function createMenu(): bool { return ToolsExtend::write2menu([ [ @@ -69,3765 +66,4 @@ class InstallUserData extends Migrator ], ], ['node' => 'data/user.admin/index']); } - - /** - * 写入默认区域数据 - * @return void - * @throws \think\db\exception\DbException - */ - private function createRegion() - { - // 检查数据 - $table = 'base_postage_region'; - if (Library::$sapp->db->table($table)->count() > 0) return; - - // 写入数据 - $this->execute(<<createRegion(); + } + + /** + * 写入默认区域数据 + * @return void + * @throws \think\db\exception\DbException + */ + private function createRegion() + { + // 检查数据 + $table = 'base_postage_region'; + if (Library::$sapp->db->table($table)->count() > 0) return; + + // 写入数据 + $this->execute(<<createMenu(); - $this->createRegion(); } /** * 创建菜单 * @return boolean */ - private function createMenu(): bool + protected function createMenu(): bool { return ToolsExtend::write2menu([ [ @@ -69,3765 +66,4 @@ class InstallUserData extends Migrator ], ], ['node' => 'data/user.admin/index']); } - - /** - * 写入默认区域数据 - * @return void - * @throws \think\db\exception\DbException - */ - private function createRegion() - { - // 检查数据 - $table = 'base_postage_region'; - if (Library::$sapp->db->table($table)->count() > 0) return; - - // 写入数据 - $this->execute(<<createRegion(); + } + + /** + * 写入默认区域数据 + * @return void + * @throws \think\db\exception\DbException + */ + private function createRegion() + { + // 检查数据 + $table = 'base_postage_region'; + if (Library::$sapp->db->table($table)->count() > 0) return; + + // 写入数据 + $this->execute(<<