From 425694a865eeaa92084c6f14457e8c6009d34abb Mon Sep 17 00:00:00 2001 From: zhangwenjian Date: Sun, 15 Mar 2020 20:42:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=8F=9C=E5=8D=95=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/goadmin/models/menu.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/goadmin/models/menu.go b/src/goadmin/models/menu.go index 7595546e..0d68b086 100644 --- a/src/goadmin/models/menu.go +++ b/src/goadmin/models/menu.go @@ -230,6 +230,12 @@ func (e *Menu) Get() (Menus []Menu, err error) { if e.MenuName != "" { table = table.Where("menuName = ?", e.MenuName) } + if e.Path != "" { + table = table.Where("path = ?", e.Path) + } + if e.Action != "" { + table = table.Where("action = ?", e.Action) + } if e.MenuType != "" { table = table.Where("menuType = ?", e.MenuType) }