datai-vue/docs/api-docs/system/2026-01-21-002-03-30-api-删除菜单.md
Kris a66ecad0f9 feat: 修复初始化从库接口参数并完善环境管理功能
- 更新 environment.js 中 initSlaveDatasource 函数参数从 environmentCode 改为 environmentId
- 更新 SourceEnvironmentTab.vue 中的初始化从库功能以使用 environmentId
- 在 TargetEnvironmentTab.vue 中添加完整的初始化从库功能
- 初始化项目单一真源(SSOT)文档结构,包括:
  - 创建主 index.md 作为项目单一真源
  - 创建 Authentication.canvas 可视化文件
  - 创建所有必需的文档目录和 README.md 文件
  - 建立完整的双向索引关系
2026-01-26 17:23:15 +08:00

79 lines
1.8 KiB
Markdown
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.

# API 文档:删除菜单接口
## 元数据
- **需求编号**2026-01-21-002-03-30
- **创建时间**2026-01-26
- **创建人**SSOT 架构师
- **父需求**2026-01-21-002-03-数据库国际化需求
## 接口概述
删除一条菜单。
## 接口详情
### 基本信息
- **接口名称**:删除菜单
- **接口描述**:删除菜单
- **请求方式**DELETE
- **请求路径**`/system/menu/{menuId}`
- **权限要求**`system:menu:remove`
### 请求参数
| 参数名 | 类型 | 必选 | 说明 |
|--------|------|------|------|
| menuId | Long | 是 | 菜单ID路径参数 |
### 请求示例
```bash
curl -X DELETE 'http://localhost:8080/system/menu/2' \
-H 'Authorization: Bearer {token}'
```
### 响应数据结构
| 参数名 | 类型 | 说明 |
|--------|------|------|
| code | Integer | 状态码200 成功500 失败) |
| msg | String | 提示信息 |
| data | Object | 数据对象(通常为 null |
### 响应示例
**成功响应:**
```json
{
"code": 200,
"msg": "操作成功",
"data": null
}
```
**失败响应:**
```json
{
"code": 500,
"msg": "存在子菜单,不允许删除",
"data": null
}
```
```json
{
"code": 500,
"msg": "菜单已分配,不允许删除",
"data": null
}
```
### 业务规则
1. 存在子菜单时不允许删除
2. 菜单已分配给角色时不允许删除
3. 删除成功后,清除菜单缓存
### 性能要求
- **响应时间**< 100ms
- **数据库删除时间**< 50ms
### 相关文档
- [需求文档](file:///d:/idea_demo/datai/datai-scenes/datai-scene-salesforce/docs/requirements/2026-01-21-002-03-数据库国际化需求.md)
- [设计文档](file:///d:/idea_demo/datai/datai-scenes/datai-scene-salesforce/docs/design/2026-01-21-002-03-数据库国际化设计.md)