MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / CreateMenu

Method CreateMenu

internal/service/menu.go:54–61  ·  view source on GitHub ↗

CreateMenu 创建新菜单

(ctx context.Context, menu *domain.Menu)

Source from the content-addressed store, hash-verified

52
53// CreateMenu 创建新菜单
54func (m *menuService) CreateMenu(ctx context.Context, menu *domain.Menu) error {
55 if menu == nil {
56 m.l.Warn("菜单不能为空")
57 return errors.New("菜单不能为空")
58 }
59
60 return m.repo.CreateMenu(ctx, menu)
61}
62
63// GetMenuById 根据ID获取菜单
64func (m *menuService) GetMenuById(ctx context.Context, id int) (*domain.Menu, error) {

Callers

nothing calls this directly

Calls 1

CreateMenuMethod · 0.65

Tested by

no test coverage detected