pangu-user-platform/backend/pangu-modules/pangu-business/sql/快速导入.txt

48 lines
1.5 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

========================================
应用管理模块 - 数据库快速导入指南
========================================
📋 需要导入的 SQL 文件:
----------------------------
1. pangu_tables.sql - 表结构3张表
2. pangu_menu.sql - 菜单数据7条菜单
3. open_api_dict_data.sql - API字典1条数据
🚀 最简单的导入方式:
----------------------------
cd /Users/felix/pgWorkSpace/pangu-user-platform/backend/pangu-modules/pangu-business/sql
./check_and_import.sh -p 数据库密码
✨ 脚本会自动:
✓ 检查表是否存在
✓ 检查菜单是否存在
✓ 检查数据是否存在
✓ 缺失则自动导入
💡 手动导入命令:
----------------------------
mysql -h 8.148.25.55 -u root -p pguser-db < pangu_tables.sql
mysql -h 8.148.25.55 -u root -p pguser-db < pangu_menu.sql
mysql -h 8.148.25.55 -u root -p pguser-db < open_api_dict_data.sql
✅ 验证导入:
----------------------------
mysql -h 8.148.25.55 -u root -p pguser-db -e "
SHOW TABLES LIKE 'pg_%';
SELECT COUNT(*) FROM pg_application;
SELECT * FROM pg_api_dict;
SELECT menu_name FROM sys_menu WHERE menu_id=2300;
"
🔄 导入后操作:
----------------------------
1. 重启后端cd backend && ./build.sh -r
2. 刷新前端:浏览器访问 http://localhost:80
3. 检查菜单:登录后查看是否有"应用管理"菜单
📖 详细文档:
----------------------------
README_导入说明.md
========================================