2023-11-13 17:52:20 +08:00
|
|
|
syntax = "v1"
|
|
|
|
|
|
|
|
|
|
info (
|
|
|
|
|
title: // TODO: add title
|
|
|
|
|
desc: // TODO: add description
|
|
|
|
|
author: ""
|
|
|
|
|
email: ""
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
import "basic.api"
|
|
|
|
|
|
|
|
|
|
service ldap-admin {
|
|
|
|
|
//获取部门列表
|
|
|
|
|
@handler GetDepartmentsHandler
|
|
|
|
|
post /api/ldap-admin/get_departments(GetDepartmentsReq) returns (response);
|
2023-11-14 11:45:25 +08:00
|
|
|
|
|
|
|
|
// 新增部门
|
|
|
|
|
@handler AddDepartmentHandler
|
|
|
|
|
post /api/ldap-admin/add_department(AddDepartmentReq) returns (response);
|
|
|
|
|
|
|
|
|
|
// 编辑部门
|
|
|
|
|
@handler EditDepartmentHandler
|
|
|
|
|
post /api/ldap-admin/edit_department(EditDepartmentReq) returns (response);
|
|
|
|
|
|
|
|
|
|
// 删除部门
|
|
|
|
|
@handler DeleteDepartmentHandler
|
|
|
|
|
post /api/ldap-admin/delete_department(DeleteDepartmentReq) returns (response);
|
|
|
|
|
|
|
|
|
|
//获取菜单列表--树形
|
|
|
|
|
@handler GetMenusTreeHandler
|
|
|
|
|
post /api/ldap-admin/get_menus_tree(GetMenusTreeReq) returns (response);
|
|
|
|
|
|
|
|
|
|
// 新增菜单
|
|
|
|
|
@handler AddMenuHandler
|
|
|
|
|
post /api/ldap-admin/add_menu(AddMenuHandler) returns (response);
|
|
|
|
|
|
|
|
|
|
// 编辑菜单
|
|
|
|
|
@handler EditMenuHandler
|
|
|
|
|
post /api/ldap-admin/edit_menu(EditMenuHandler) returns (response);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type EditMenuHandler {
|
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Title string `json:"title"`
|
|
|
|
|
Icon string `json:"icon"`
|
|
|
|
|
Path string `json:"path"`
|
|
|
|
|
Sort int64 `json:"sort"`
|
|
|
|
|
Status int64 `json:"status"`
|
|
|
|
|
ParentId int64 `json:"parent_id"`
|
|
|
|
|
Creator string `json:"creator"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type AddMenuHandler {
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Title string `json:"title"`
|
|
|
|
|
Icon string `json:"icon"`
|
|
|
|
|
Path string `json:"path"`
|
|
|
|
|
Sort int64 `json:"sort"`
|
|
|
|
|
Status int64 `json:"status"`
|
|
|
|
|
ParentId int64 `json:"parent_id"`
|
|
|
|
|
Creator string `json:"creator"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//获取菜单列表--树形
|
|
|
|
|
type GetMenusTreeReq {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 新增部门
|
|
|
|
|
type AddDepartmentReq {
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Remark string `json:"remark"`
|
|
|
|
|
Creator string `json:"creator"`
|
|
|
|
|
Type string `json:"type"`
|
|
|
|
|
ParentId int64 `json:"parent_id"`
|
|
|
|
|
Dn string `json:"dn"`
|
|
|
|
|
SyncState int64 `json:"sync_state"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 编辑部门
|
|
|
|
|
type EditDepartmentReq {
|
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Remark string `json:"remark"`
|
|
|
|
|
Creator string `json:"creator"`
|
|
|
|
|
Type string `json:"type"`
|
|
|
|
|
ParentId int64 `json:"parent_id"`
|
|
|
|
|
Dn string `json:"dn"`
|
|
|
|
|
SyncState int64 `json:"sync_state"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 删除部门
|
|
|
|
|
type DeleteDepartmentReq {
|
|
|
|
|
Id int64 `json:"id"`
|
2023-11-13 17:52:20 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//获取部门列表
|
|
|
|
|
type GetDepartmentsReq {
|
|
|
|
|
CurrentPage int `form:"current_page"`
|
|
|
|
|
PageSize int `form:"page_size"`
|
|
|
|
|
}
|