This commit is contained in:
zlwu committed 2026-05-12 22:07:53 +08:00
1 parent c87732fcd5
commit 058811ae77
107 files changed
+16983 -12758

No files matched your search

+18 -9
View File
@@ -1,6 +1,8 @@
# 中科兴皖一体化门户后端(空壳)
# zkxw 后端骨架(FastAPI)
当前 `app.main` **不连接数据库、不注册任何业务路由**,仅提供根路径与 `/health`,便于占位或 CI。原 `app/api` 下 Python 文件已删除(请从 git 历史恢复)。`app/models`、`app/crud` 等目录仍保留为未引用代码,可按需继续清理。
基于 FastAPI 的精简后端:**Web 鉴权**(登录 RSA、登录、刷新 Token、登出、当前用户、菜单 code)、**静态运营菜单树**、**运营端路由占位**。原叁强鲜配业务 API 已移除,可按模块在 `app/api/admin.py` 等位置扩展。
数据库最小初始化见:`docs/sql/zkxw-backend-skeleton.sql`(默认账号 `admin` / `111111`,角色 `super_admin`)。
## 技术栈
@@ -15,12 +17,19 @@
```
backend/
├── app/
│ ├── api/ # 包占位(路由实现已删除)
│ ├── api/ # API 路由
│ │ ├── admin/ # 运营端接口
│ │ ├── supplier/ # 供应商端接口
│ │ ├── client/ # 客户端接口
│ │ └── deliver/ # 配送员端接口
│ ├── core/ # 核心配置
│ ├── models/ # 数据库模型
│ ├── schemas/ # Pydantic schemas
│ ├── services/ # 业务逻辑
│ └── main.py # 应用入口
│ │ ├── config.py # 应用配置
│ │ ├── security.py # 安全认证
│ │ └── database.py # 数据库连接
│ ├── models/ # 数据库模型
│ ├── schemas/ # Pydantic schemas
│ ├── services/ # 业务逻辑
│ └── main.py # 应用入口
├── requirements.txt
└── README.md
```
@@ -47,7 +56,7 @@ pip install -r requirements.txt
```env
# 数据库配置
DATABASE_URL=mysql+pymysql://root:password@localhost:3306/zkxw
DATABASE_URL=mysql+pymysql://root:password@localhost:3306/sanqiang
# JWT配置
SECRET_KEY=your-secret-key-change-in-production
@@ -55,7 +64,7 @@ ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
# 应用配置
APP_NAME=中科兴皖一体化门户
APP_NAME=陇耘鲜达
DEBUG=true
```