|
@@ -13,7 +13,7 @@ type EtaBusinessMenu struct {
|
|
|
MenuId int `orm:"column(menu_id);pk"`
|
|
|
ParentId int `description:"父级菜单ID"`
|
|
|
Name string `description:"菜单名称或者按钮名称"`
|
|
|
- Sort string `description:"排序"`
|
|
|
+ Sort int `description:"排序"`
|
|
|
Path string `description:"路由地址"`
|
|
|
IconPath string `description:"菜单图标地址"`
|
|
|
Component string `description:"组件路径"`
|
|
@@ -72,7 +72,7 @@ func (m *EtaBusinessMenu) MultiDel(menuIds []int) (err error) {
|
|
|
}
|
|
|
o := orm.NewOrm()
|
|
|
sql := fmt.Sprintf(`DELETE FROM %s WHERE %s IN (%s)`, m.TableName(), m.PrimaryId(), utils.GetOrmInReplace(len(menuIds)))
|
|
|
- _, err = o.Raw(sql, m.MenuId).Exec()
|
|
|
+ _, err = o.Raw(sql, menuIds).Exec()
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -136,7 +136,7 @@ func GetMenuItemsByKeyword(keyword string, fieldArr []string, orderRule string)
|
|
|
(
|
|
|
SELECT * FROM eta_business_menu WHERE parent_id = 0 AND name LIKE ?
|
|
|
UNION
|
|
|
- SELECT * FROM eta_business_menu WHERE id IN (
|
|
|
+ SELECT * FROM eta_business_menu WHERE menu_id IN (
|
|
|
SELECT
|
|
|
parent_id
|
|
|
FROM
|
|
@@ -171,7 +171,7 @@ type EtaBusinessMenuItem struct {
|
|
|
ParentId int `description:"父级菜单ID"`
|
|
|
Name string `description:"菜单名称或者按钮名称"`
|
|
|
RootId int `description:"顶层菜单ID"`
|
|
|
- Sort string `description:"排序"`
|
|
|
+ Sort int `description:"排序"`
|
|
|
Path string `description:"路由地址"`
|
|
|
PathName string `description:"路由名称"`
|
|
|
IconPath string `description:"菜单图标地址"`
|
|
@@ -188,7 +188,7 @@ type EtaBusinessMenuItem struct {
|
|
|
type EtaBusinessMenuAddReq struct {
|
|
|
ParentId int `description:"父级菜单ID"`
|
|
|
Name string `description:"菜单/按钮名称"`
|
|
|
- Sort string `description:"排序"`
|
|
|
+ Sort int `description:"排序"`
|
|
|
Path string `description:"路由地址"`
|
|
|
IconPath string `description:"图标地址"`
|
|
|
Component string `description:"组件路径"`
|