This commit is contained in:
苏尹岚
2020-09-29 15:46:32 +08:00
parent 5ed74064a7
commit b4f5a8af7d
2 changed files with 20 additions and 1 deletions

View File

@@ -10,7 +10,11 @@ import (
)
func GetMenu(ctx *jxcontext.Context, userID string) (menus []*model.Menu, err error) {
return dao.GetMenu(dao.GetDB(), "", 0, userID)
if userID == "" {
return dao.GetMenu(dao.GetDB(), "", 0, userID)
} else {
return dao.GetMenuWithUser(dao.GetDB(), "", 0, userID)
}
}
func AddMenu(ctx *jxcontext.Context, menu *model.Menu) (err error) {