新增部门列表

This commit is contained in:
laodaming
2023-11-14 11:26:08 +08:00
parent 561ce385a1
commit 15671c02c3
7 changed files with 55 additions and 62 deletions

View File

@@ -12,29 +12,25 @@ import "basic.api"
service ldap-admin {
//获取部门列表
@handler GetDepartmentsHandler
post /api/ldap-admin/get_departments(GetDepartmentsReq) returns (response);
get /api/ldap-admin/get_departments(request) returns (response);
//保存部门信息
@handler SaveDepartmentHandler
post /api/ldap-admin/save_department(SaveDepartmentReq) returns (response);
}
//获取部门列表
type GetDepartmentsReq {
CurrentPage int `form:"current_page"`
Limit int `form:"limit"`
}
type GetDepartmentsRsp {
List []DepartmentsItem `json:"list"`
Meta Meta `json:"meta"`
List []*DepartmentsItem `json:"list"`
}
type DepartmentsItem {
Id int64 `json:"id"`
Name string `json:"name"`
Remark string `json:"remark"`
Type string `json:"type"`
ParentId int64 `json:"parent_id"`
Dn string `json:"dn"`
SyncState int64 `json:"sync_state"`
Id int64 `json:"id"`
Name string `json:"name"`
Remark string `json:"remark"`
Type string `json:"type"`
ParentId int64 `json:"parent_id"`
Dn string `json:"dn"`
SyncState int64 `json:"sync_state"`
Child []*DepartmentsItem `json:"child"`
}
//保存部门信息
type SaveDepartmentReq {