添加搜索条件

This commit is contained in:
zhangwenjian committed 2020-04-22 23:17:05 +08:00
1 parent 8630a8c784
commit 2d697ec80b
1 file changed
+6
+6
View File
@@ -248,6 +248,12 @@ func (e *Menu) GetPage() (Menus []Menu, err error) {
if e.MenuName != "" {
table = table.Where("menu_name = ?", e.MenuName)
}
if e.Title != "" {
table = table.Where("title = ?", e.Title)
}
if e.Visible != "" {
table = table.Where("visible = ?", e.Visible)
}
if e.MenuType != "" {
table = table.Where("menu_type = ?", e.MenuType)
}