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(<<