DeleteMenu 删除指定ID的菜单
(ctx context.Context, id int)
| 82 | |
| 83 | // DeleteMenu 删除指定ID的菜单 |
| 84 | func (m *menuService) DeleteMenu(ctx context.Context, id int) error { |
| 85 | if id <= 0 { |
| 86 | m.l.Warn("菜单ID无效", zap.Int("ID", id)) |
| 87 | return errors.New("菜单ID无效") |
| 88 | } |
| 89 | |
| 90 | return m.repo.DeleteMenu(ctx, id) |
| 91 | } |
| 92 | |
| 93 | // GetMenuTree 获取菜单树形结构 |
| 94 | func (m *menuService) GetMenuTree(ctx context.Context) ([]*domain.Menu, error) { |
nothing calls this directly
no test coverage detected