UpdateMenu 更新菜单信息
(ctx context.Context, menu *domain.Menu)
| 72 | |
| 73 | // UpdateMenu 更新菜单信息 |
| 74 | func (m *menuService) UpdateMenu(ctx context.Context, menu *domain.Menu) error { |
| 75 | if menu == nil { |
| 76 | m.l.Warn("菜单不能为空") |
| 77 | return errors.New("菜单不能为空") |
| 78 | } |
| 79 | |
| 80 | return m.repo.UpdateMenu(ctx, menu) |
| 81 | } |
| 82 | |
| 83 | // DeleteMenu 删除指定ID的菜单 |
| 84 | func (m *menuService) DeleteMenu(ctx context.Context, id int) error { |
nothing calls this directly
no test coverage detected