This commit is contained in:
laodaming
2023-11-15 15:50:18 +08:00
parent d457c5391f
commit 6d7a88ef29
11 changed files with 417 additions and 5 deletions

View File

@@ -24,6 +24,15 @@ service ldap-admin {
//保存菜单
@handler SaveMenuHandler
post /api/ldap-admin/save_menu(SaveMenuReq) returns (response);
//删除菜单
@handler DeleteMenuHandler
post /api/ldap-admin/delete_menu(DeleteMenuReq) returns (response);
//获取菜单详情
@handler GetMenuDetailHandler
get /api/ldap-admin/get_menu_detail(GetMenuDetailReq) returns (response);
//获取菜单列表
@handler GetMenusHandler
get /api/ldap-admin/get_menus(GetMenusReq) returns (response);
}
type GetApisReq {
@@ -65,6 +74,46 @@ type Member {
}
//保存菜单
type SaveMenuReq {
Id int64 `json:"id"`
Name string `json:"name"`
Title string `json:"title"`
Icon string `json:"icon"`
Path string `json:"path"`
Sort int64 `json:"sort"`
ParentId int64 `json:"parent_id"`
Status int64 `json:"status,options=0|1"`
}
//删除菜单
type DeleteMenuReq {
Id int64 `json:"id"`
}
//获取菜单详情
type GetMenuDetailReq {
Id int64 `form:"id"`
}
type GetMenuDetailRsp {
Id int64 `json:"id"`
Name string `json:"name"`
Title string `json:"title"`
Icon string `json:"icon"`
Path string `json:"path"`
Sort int64 `json:"sort"`
ParentId int64 `json:"parent_id"`
Status int64 `json:"status"`
}
//获取菜单列表
type GetMenusReq {
CurrentPage int64 `form:"current_page"`
Name string `form:"name"`
Title string `form:"title"`
Path string `form:"path"`
ParentId int64 `form:"parent_id"`
}
type GetMenusRsp {
List []MenuItem `json:"list"`
Meta Meta `json:"meta"`
}
type MenuItem {
Id int64 `json:"id"`
Name string `json:"name"`
Title string `json:"title"`