添加菜单搜索条件

This commit is contained in:
zhangwenjian committed 2020-03-15 20:46:55 +08:00
1 parent 7d88f9a75d
commit 425694a865
1 file changed
+6
+6
View File
@@ -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)
}