GetMenuById 根据ID获取菜单
(ctx context.Context, id int)
| 36 | |
| 37 | // GetMenuById 根据ID获取菜单 |
| 38 | func (m *menuRepository) GetMenuById(ctx context.Context, id int) (*domain.Menu, error) { |
| 39 | menu, err := m.dao.GetMenuById(ctx, id) |
| 40 | if err != nil { |
| 41 | return nil, err |
| 42 | } |
| 43 | return m.menuFromDAO(menu), nil |
| 44 | } |
| 45 | |
| 46 | // UpdateMenu 更新菜单信息 |
| 47 | func (m *menuRepository) UpdateMenu(ctx context.Context, menu *domain.Menu) error { |
nothing calls this directly
no test coverage detected