GetMenuById 根据ID获取菜单
(ctx context.Context, id int)
| 62 | |
| 63 | // GetMenuById 根据ID获取菜单 |
| 64 | func (m *menuService) GetMenuById(ctx context.Context, id int) (*domain.Menu, error) { |
| 65 | if id <= 0 { |
| 66 | m.l.Warn("菜单ID无效", zap.Int("ID", id)) |
| 67 | return nil, errors.New("菜单ID无效") |
| 68 | } |
| 69 | |
| 70 | return m.repo.GetMenuById(ctx, id) |
| 71 | } |
| 72 | |
| 73 | // UpdateMenu 更新菜单信息 |
| 74 | func (m *menuService) UpdateMenu(ctx context.Context, menu *domain.Menu) error { |
nothing calls this directly
no test coverage detected