From c7ca444fe7ecc5b1bca2ca59e3ae44c4a31c8596 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Thu, 16 Nov 2023 14:29:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B7=BB=E5=8A=A0=E9=83=A8?= =?UTF-8?q?=E9=97=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...dler.go => createldaporginationhandler.go} | 8 ++--- ...dler.go => deleteldaporginationhandler.go} | 8 ++--- ...onshandler.go => getorginationshandler.go} | 6 ++-- server/ldap-admin/internal/handler/routes.go | 10 +++--- ...dler.go => updateldaporginationhandler.go} | 8 ++--- ...nlogic.go => createldaporginationlogic.go} | 26 +++++++-------- ...nlogic.go => deleteldaporginationlogic.go} | 12 +++---- ...zationslogic.go => getorginationslogic.go} | 12 +++---- ...nlogic.go => updateldaporginationlogic.go} | 12 +++---- server/ldap-admin/internal/types/types.go | 16 +++++----- server_api/ldap-admin.api | 32 +++++++++---------- 11 files changed, 75 insertions(+), 75 deletions(-) rename server/ldap-admin/internal/handler/{createldaporganizationhandler.go => createldaporginationhandler.go} (69%) rename server/ldap-admin/internal/handler/{deleteldaporganizationhandler.go => deleteldaporginationhandler.go} (69%) rename server/ldap-admin/internal/handler/{getorganizationshandler.go => getorginationshandler.go} (75%) rename server/ldap-admin/internal/handler/{updateldaporganizationhandler.go => updateldaporginationhandler.go} (69%) rename server/ldap-admin/internal/logic/{createldaporganizationlogic.go => createldaporginationlogic.go} (62%) rename server/ldap-admin/internal/logic/{updateldaporganizationlogic.go => deleteldaporginationlogic.go} (55%) rename server/ldap-admin/internal/logic/{getorganizationslogic.go => getorginationslogic.go} (86%) rename server/ldap-admin/internal/logic/{deleteldaporganizationlogic.go => updateldaporginationlogic.go} (55%) diff --git a/server/ldap-admin/internal/handler/createldaporganizationhandler.go b/server/ldap-admin/internal/handler/createldaporginationhandler.go similarity index 69% rename from server/ldap-admin/internal/handler/createldaporganizationhandler.go rename to server/ldap-admin/internal/handler/createldaporginationhandler.go index fcfe86f6..a0954734 100644 --- a/server/ldap-admin/internal/handler/createldaporganizationhandler.go +++ b/server/ldap-admin/internal/handler/createldaporginationhandler.go @@ -11,22 +11,22 @@ import ( "fusenapi/server/ldap-admin/internal/types" ) -func CreateLdapOrganizationHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { +func CreateLdapOrginationHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - var req types.CreateLdapOrganizationReq + var req types.CreateLdapOrginationReq userinfo, err := basic.RequestParse(w, r, svcCtx, &req) if err != nil { return } // 创建一个业务逻辑层实例 - l := logic.NewCreateLdapOrganizationLogic(r.Context(), svcCtx) + l := logic.NewCreateLdapOrginationLogic(r.Context(), svcCtx) rl := reflect.ValueOf(l) basic.BeforeLogic(w, r, rl) - resp := l.CreateLdapOrganization(&req, userinfo) + resp := l.CreateLdapOrgination(&req, userinfo) if !basic.AfterLogic(w, r, rl, resp) { basic.NormalAfterLogic(w, r, resp) diff --git a/server/ldap-admin/internal/handler/deleteldaporganizationhandler.go b/server/ldap-admin/internal/handler/deleteldaporginationhandler.go similarity index 69% rename from server/ldap-admin/internal/handler/deleteldaporganizationhandler.go rename to server/ldap-admin/internal/handler/deleteldaporginationhandler.go index b209a1a6..93fd0d0f 100644 --- a/server/ldap-admin/internal/handler/deleteldaporganizationhandler.go +++ b/server/ldap-admin/internal/handler/deleteldaporginationhandler.go @@ -11,22 +11,22 @@ import ( "fusenapi/server/ldap-admin/internal/types" ) -func DeleteLdapOrganizationHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { +func DeleteLdapOrginationHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - var req types.DeleteLdapOrganizationReq + var req types.DeleteLdapOrginationReq userinfo, err := basic.RequestParse(w, r, svcCtx, &req) if err != nil { return } // 创建一个业务逻辑层实例 - l := logic.NewDeleteLdapOrganizationLogic(r.Context(), svcCtx) + l := logic.NewDeleteLdapOrginationLogic(r.Context(), svcCtx) rl := reflect.ValueOf(l) basic.BeforeLogic(w, r, rl) - resp := l.DeleteLdapOrganization(&req, userinfo) + resp := l.DeleteLdapOrgination(&req, userinfo) if !basic.AfterLogic(w, r, rl, resp) { basic.NormalAfterLogic(w, r, resp) diff --git a/server/ldap-admin/internal/handler/getorganizationshandler.go b/server/ldap-admin/internal/handler/getorginationshandler.go similarity index 75% rename from server/ldap-admin/internal/handler/getorganizationshandler.go rename to server/ldap-admin/internal/handler/getorginationshandler.go index 590e1a33..2b64abcb 100644 --- a/server/ldap-admin/internal/handler/getorganizationshandler.go +++ b/server/ldap-admin/internal/handler/getorginationshandler.go @@ -11,7 +11,7 @@ import ( "fusenapi/server/ldap-admin/internal/types" ) -func GetOrganizationsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { +func GetorginationsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { var req types.Request @@ -21,12 +21,12 @@ func GetOrganizationsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { } // 创建一个业务逻辑层实例 - l := logic.NewGetOrganizationsLogic(r.Context(), svcCtx) + l := logic.NewGetorginationsLogic(r.Context(), svcCtx) rl := reflect.ValueOf(l) basic.BeforeLogic(w, r, rl) - resp := l.GetOrganizations(&req, userinfo) + resp := l.Getorginations(&req, userinfo) if !basic.AfterLogic(w, r, rl, resp) { basic.NormalAfterLogic(w, r, resp) diff --git a/server/ldap-admin/internal/handler/routes.go b/server/ldap-admin/internal/handler/routes.go index 05e78360..7b821992 100644 --- a/server/ldap-admin/internal/handler/routes.go +++ b/server/ldap-admin/internal/handler/routes.go @@ -44,23 +44,23 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { }, { Method: http.MethodGet, - Path: "/api/ldap-admin/get_organizations", - Handler: GetOrganizationsHandler(serverCtx), + Path: "/api/ldap-admin/get_ldap_orginations", + Handler: GetorginationsHandler(serverCtx), }, { Method: http.MethodPost, Path: "/api/ldap-admin/create_ldap_orgination", - Handler: CreateLdapOrganizationHandler(serverCtx), + Handler: CreateLdapOrginationHandler(serverCtx), }, { Method: http.MethodPost, Path: "/api/ldap-admin/delete_ldap_orgination", - Handler: DeleteLdapOrganizationHandler(serverCtx), + Handler: DeleteLdapOrginationHandler(serverCtx), }, { Method: http.MethodPost, Path: "/api/ldap-admin/update_ldap_orgination", - Handler: UpdateLdapOrganizationHandler(serverCtx), + Handler: UpdateLdapOrginationHandler(serverCtx), }, }, ) diff --git a/server/ldap-admin/internal/handler/updateldaporganizationhandler.go b/server/ldap-admin/internal/handler/updateldaporginationhandler.go similarity index 69% rename from server/ldap-admin/internal/handler/updateldaporganizationhandler.go rename to server/ldap-admin/internal/handler/updateldaporginationhandler.go index 8a9846a6..31e9a88b 100644 --- a/server/ldap-admin/internal/handler/updateldaporganizationhandler.go +++ b/server/ldap-admin/internal/handler/updateldaporginationhandler.go @@ -11,22 +11,22 @@ import ( "fusenapi/server/ldap-admin/internal/types" ) -func UpdateLdapOrganizationHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { +func UpdateLdapOrginationHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - var req types.UpdateLdapOrganizationReq + var req types.UpdateLdapOrginationReq userinfo, err := basic.RequestParse(w, r, svcCtx, &req) if err != nil { return } // 创建一个业务逻辑层实例 - l := logic.NewUpdateLdapOrganizationLogic(r.Context(), svcCtx) + l := logic.NewUpdateLdapOrginationLogic(r.Context(), svcCtx) rl := reflect.ValueOf(l) basic.BeforeLogic(w, r, rl) - resp := l.UpdateLdapOrganization(&req, userinfo) + resp := l.UpdateLdapOrgination(&req, userinfo) if !basic.AfterLogic(w, r, rl, resp) { basic.NormalAfterLogic(w, r, resp) diff --git a/server/ldap-admin/internal/logic/createldaporganizationlogic.go b/server/ldap-admin/internal/logic/createldaporginationlogic.go similarity index 62% rename from server/ldap-admin/internal/logic/createldaporganizationlogic.go rename to server/ldap-admin/internal/logic/createldaporginationlogic.go index b0858328..f2bfa978 100644 --- a/server/ldap-admin/internal/logic/createldaporganizationlogic.go +++ b/server/ldap-admin/internal/logic/createldaporginationlogic.go @@ -14,14 +14,14 @@ import ( "github.com/zeromicro/go-zero/core/logx" ) -type CreateLdapOrganizationLogic struct { +type CreateLdapOrginationLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } -func NewCreateLdapOrganizationLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateLdapOrganizationLogic { - return &CreateLdapOrganizationLogic{ +func NewCreateLdapOrginationLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateLdapOrginationLogic { + return &CreateLdapOrginationLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, @@ -29,31 +29,31 @@ func NewCreateLdapOrganizationLogic(ctx context.Context, svcCtx *svc.ServiceCont } // 处理进入前逻辑w,r -// func (l *CreateLdapOrganizationLogic) BeforeLogic(w http.ResponseWriter, r *http.Request) { +// func (l *CreateLdapOrginationLogic) BeforeLogic(w http.ResponseWriter, r *http.Request) { // } -func (l *CreateLdapOrganizationLogic) CreateLdapOrganization(req *types.CreateLdapOrganizationReq, userinfo *auth.UserInfo) (resp *basic.Response) { - req.OrganizationOu = strings.Trim(req.OrganizationOu, " ") - req.ParentOrganizationDN = strings.Trim(req.ParentOrganizationDN, " ") +func (l *CreateLdapOrginationLogic) CreateLdapOrgination(req *types.CreateLdapOrginationReq, userinfo *auth.UserInfo) (resp *basic.Response) { + req.OrginationOu = strings.Trim(req.OrginationOu, " ") + req.ParentOrginationDN = strings.Trim(req.ParentOrginationDN, " ") req.BusinessCategory = strings.Trim(req.BusinessCategory, " ") - if req.OrganizationOu == "" { + if req.OrginationOu == "" { return resp.SetStatusWithMessage(basic.CodeRequestParamsErr, "参数错误,organization_ou不能为空") } - if len(strings.Split(req.OrganizationOu, ",")) != 1 { + if len(strings.Split(req.OrginationOu, ",")) != 1 { return resp.SetStatusWithMessage(basic.CodeRequestParamsErr, "参数错误,不合法的organization_ou") } - if req.ParentOrganizationDN == "" { + if req.ParentOrginationDN == "" { return resp.SetStatusWithMessage(basic.CodeRequestParamsErr, "参数错误,parentOrganization_dn不能为空") } if req.BusinessCategory == "" { return resp.SetStatusWithMessage(basic.CodeRequestParamsErr, "参数错误,business_category不能为空") } //组装organization dn - organizationDN := "ou=" + req.OrganizationOu + "," + req.ParentOrganizationDN + organizationDN := "ou=" + req.OrginationOu + "," + req.ParentOrginationDN ldapServer := ldap_lib.NewLdap(l.svcCtx.Ldap, l.svcCtx.Config.Ldap.BaseDN, l.svcCtx.Config.Ldap.RootDN) err := ldapServer.Create(organizationDN, map[string][]string{ "objectClass": {"top", "organizationalUnit"}, - "ou": {req.OrganizationOu}, + "ou": {req.OrginationOu}, "businessCategory": {req.BusinessCategory}, }) if err != nil { @@ -64,6 +64,6 @@ func (l *CreateLdapOrganizationLogic) CreateLdapOrganization(req *types.CreateLd } // 处理逻辑后 w,r 如:重定向, resp 必须重新处理 -// func (l *CreateLdapOrganizationLogic) AfterLogic(w http.ResponseWriter, r *http.Request, resp *basic.Response) { +// func (l *CreateLdapOrginationLogic) AfterLogic(w http.ResponseWriter, r *http.Request, resp *basic.Response) { // // httpx.OkJsonCtx(r.Context(), w, resp) // } diff --git a/server/ldap-admin/internal/logic/updateldaporganizationlogic.go b/server/ldap-admin/internal/logic/deleteldaporginationlogic.go similarity index 55% rename from server/ldap-admin/internal/logic/updateldaporganizationlogic.go rename to server/ldap-admin/internal/logic/deleteldaporginationlogic.go index f8789210..f335462e 100644 --- a/server/ldap-admin/internal/logic/updateldaporganizationlogic.go +++ b/server/ldap-admin/internal/logic/deleteldaporginationlogic.go @@ -12,14 +12,14 @@ import ( "github.com/zeromicro/go-zero/core/logx" ) -type UpdateLdapOrganizationLogic struct { +type DeleteLdapOrginationLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } -func NewUpdateLdapOrganizationLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateLdapOrganizationLogic { - return &UpdateLdapOrganizationLogic{ +func NewDeleteLdapOrginationLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteLdapOrginationLogic { + return &DeleteLdapOrginationLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, @@ -27,10 +27,10 @@ func NewUpdateLdapOrganizationLogic(ctx context.Context, svcCtx *svc.ServiceCont } // 处理进入前逻辑w,r -// func (l *UpdateLdapOrganizationLogic) BeforeLogic(w http.ResponseWriter, r *http.Request) { +// func (l *DeleteLdapOrginationLogic) BeforeLogic(w http.ResponseWriter, r *http.Request) { // } -func (l *UpdateLdapOrganizationLogic) UpdateLdapOrganization(req *types.UpdateLdapOrganizationReq, userinfo *auth.UserInfo) (resp *basic.Response) { +func (l *DeleteLdapOrginationLogic) DeleteLdapOrgination(req *types.DeleteLdapOrginationReq, userinfo *auth.UserInfo) (resp *basic.Response) { // 返回值必须调用Set重新返回, resp可以空指针调用 resp.SetStatus(basic.CodeOK, data) // userinfo 传入值时, 一定不为null @@ -38,6 +38,6 @@ func (l *UpdateLdapOrganizationLogic) UpdateLdapOrganization(req *types.UpdateLd } // 处理逻辑后 w,r 如:重定向, resp 必须重新处理 -// func (l *UpdateLdapOrganizationLogic) AfterLogic(w http.ResponseWriter, r *http.Request, resp *basic.Response) { +// func (l *DeleteLdapOrginationLogic) AfterLogic(w http.ResponseWriter, r *http.Request, resp *basic.Response) { // // httpx.OkJsonCtx(r.Context(), w, resp) // } diff --git a/server/ldap-admin/internal/logic/getorganizationslogic.go b/server/ldap-admin/internal/logic/getorginationslogic.go similarity index 86% rename from server/ldap-admin/internal/logic/getorganizationslogic.go rename to server/ldap-admin/internal/logic/getorginationslogic.go index d009ac02..ec0747f2 100644 --- a/server/ldap-admin/internal/logic/getorganizationslogic.go +++ b/server/ldap-admin/internal/logic/getorginationslogic.go @@ -15,14 +15,14 @@ import ( "github.com/zeromicro/go-zero/core/logx" ) -type GetOrganizationsLogic struct { +type GetorginationsLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } -func NewGetOrganizationsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetOrganizationsLogic { - return &GetOrganizationsLogic{ +func NewGetorginationsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetorginationsLogic { + return &GetorginationsLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, @@ -30,7 +30,7 @@ func NewGetOrganizationsLogic(ctx context.Context, svcCtx *svc.ServiceContext) * } // 处理进入前逻辑w,r -// func (l *GetOrganizationsLogic) BeforeLogic(w http.ResponseWriter, r *http.Request) { +// func (l *GetorginationsLogic) BeforeLogic(w http.ResponseWriter, r *http.Request) { // } type DNItem struct { Attribute map[string]interface{} `json:"attribute"` @@ -40,7 +40,7 @@ type DNItem struct { Child []*DNItem `json:"child"` } -func (l *GetOrganizationsLogic) GetOrganizations(req *types.Request, userinfo *auth.UserInfo) (resp *basic.Response) { +func (l *GetorginationsLogic) Getorginations(req *types.Request, userinfo *auth.UserInfo) (resp *basic.Response) { //从ldap获取组织架构数据 rootCn := strings.Split(l.svcCtx.Config.Ldap.RootDN, ",") if len(rootCn) == 0 { @@ -115,6 +115,6 @@ func (l *GetOrganizationsLogic) GetOrganizations(req *types.Request, userinfo *a } // 处理逻辑后 w,r 如:重定向, resp 必须重新处理 -// func (l *GetOrganizationsLogic) AfterLogic(w http.ResponseWriter, r *http.Request, resp *basic.Response) { +// func (l *GetorginationsLogic) AfterLogic(w http.ResponseWriter, r *http.Request, resp *basic.Response) { // // httpx.OkJsonCtx(r.Context(), w, resp) // } diff --git a/server/ldap-admin/internal/logic/deleteldaporganizationlogic.go b/server/ldap-admin/internal/logic/updateldaporginationlogic.go similarity index 55% rename from server/ldap-admin/internal/logic/deleteldaporganizationlogic.go rename to server/ldap-admin/internal/logic/updateldaporginationlogic.go index d7964040..90603f51 100644 --- a/server/ldap-admin/internal/logic/deleteldaporganizationlogic.go +++ b/server/ldap-admin/internal/logic/updateldaporginationlogic.go @@ -12,14 +12,14 @@ import ( "github.com/zeromicro/go-zero/core/logx" ) -type DeleteLdapOrganizationLogic struct { +type UpdateLdapOrginationLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } -func NewDeleteLdapOrganizationLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteLdapOrganizationLogic { - return &DeleteLdapOrganizationLogic{ +func NewUpdateLdapOrginationLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateLdapOrginationLogic { + return &UpdateLdapOrginationLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, @@ -27,10 +27,10 @@ func NewDeleteLdapOrganizationLogic(ctx context.Context, svcCtx *svc.ServiceCont } // 处理进入前逻辑w,r -// func (l *DeleteLdapOrganizationLogic) BeforeLogic(w http.ResponseWriter, r *http.Request) { +// func (l *UpdateLdapOrginationLogic) BeforeLogic(w http.ResponseWriter, r *http.Request) { // } -func (l *DeleteLdapOrganizationLogic) DeleteLdapOrganization(req *types.DeleteLdapOrganizationReq, userinfo *auth.UserInfo) (resp *basic.Response) { +func (l *UpdateLdapOrginationLogic) UpdateLdapOrgination(req *types.UpdateLdapOrginationReq, userinfo *auth.UserInfo) (resp *basic.Response) { // 返回值必须调用Set重新返回, resp可以空指针调用 resp.SetStatus(basic.CodeOK, data) // userinfo 传入值时, 一定不为null @@ -38,6 +38,6 @@ func (l *DeleteLdapOrganizationLogic) DeleteLdapOrganization(req *types.DeleteLd } // 处理逻辑后 w,r 如:重定向, resp 必须重新处理 -// func (l *DeleteLdapOrganizationLogic) AfterLogic(w http.ResponseWriter, r *http.Request, resp *basic.Response) { +// func (l *UpdateLdapOrginationLogic) AfterLogic(w http.ResponseWriter, r *http.Request, resp *basic.Response) { // // httpx.OkJsonCtx(r.Context(), w, resp) // } diff --git a/server/ldap-admin/internal/types/types.go b/server/ldap-admin/internal/types/types.go index 467148e4..d3860ba7 100644 --- a/server/ldap-admin/internal/types/types.go +++ b/server/ldap-admin/internal/types/types.go @@ -73,18 +73,18 @@ type MenuItem struct { Status int64 `json:"status"` } -type CreateLdapOrganizationReq struct { - OrganizationOu string `json:"organization_ou"` //组织ou - BusinessCategory string `json:"business_category"` //组织分类名称 - ParentOrganizationDN string `json:"parent_organization_dn"` //父级dn +type CreateLdapOrginationReq struct { + OrginationOu string `json:"orgination_ou"` //组织ou + BusinessCategory string `json:"business_category"` //组织分类名称 + ParentOrginationDN string `json:"parent_orgination_dn"` //父级dn } -type DeleteLdapOrganizationReq struct { - OrganizationDN string `json:"organization_dn"` //组织dn +type DeleteLdapOrginationReq struct { + OrginationDN string `json:"orgination_dn"` //组织dn } -type UpdateLdapOrganizationReq struct { - OrganizationDN string `json:"organization_dn"` //组织dn +type UpdateLdapOrginationReq struct { + OrginationDN string `json:"orgination_dn"` //组织dn BusinessCategory string `json:"business_category"` //组织分类名称 } diff --git a/server_api/ldap-admin.api b/server_api/ldap-admin.api index 0215e8dd..2d2ec105 100644 --- a/server_api/ldap-admin.api +++ b/server_api/ldap-admin.api @@ -31,17 +31,17 @@ service ldap-admin { @handler GetMenusHandler get /api/ldap-admin/get_menus(GetMenusReq) returns (response); //获取ldap组织列表 - @handler GetOrganizationsHandler - get /api/ldap-admin/get_organizations(request) returns (response); + @handler GetorginationsHandler + get /api/ldap-admin/get_ldap_orginations(request) returns (response); //增加ldap组织 - @handler CreateLdapOrganizationHandler - post /api/ldap-admin/create_ldap_orgination(CreateLdapOrganizationReq) returns (response); + @handler CreateLdapOrginationHandler + post /api/ldap-admin/create_ldap_orgination(CreateLdapOrginationReq) returns (response); //删除ldap组织 - @handler DeleteLdapOrganizationHandler - post /api/ldap-admin/delete_ldap_orgination(DeleteLdapOrganizationReq) returns (response); + @handler DeleteLdapOrginationHandler + post /api/ldap-admin/delete_ldap_orgination(DeleteLdapOrginationReq) returns (response); //修改组织 - @handler UpdateLdapOrganizationHandler - post /api/ldap-admin/update_ldap_orgination(UpdateLdapOrganizationReq) returns (response); + @handler UpdateLdapOrginationHandler + post /api/ldap-admin/update_ldap_orgination(UpdateLdapOrginationReq) returns (response); } type GetApisReq { @@ -110,17 +110,17 @@ type MenuItem { Status int64 `json:"status"` } //增加ldap组织 -type CreateLdapOrganizationReq { - OrganizationOu string `json:"organization_ou"` //组织ou - BusinessCategory string `json:"business_category"` //组织分类名称 - ParentOrganizationDN string `json:"parent_organization_dn"` //父级dn +type CreateLdapOrginationReq { + OrginationOu string `json:"orgination_ou"` //组织ou + BusinessCategory string `json:"business_category"` //组织分类名称 + ParentOrginationDN string `json:"parent_orgination_dn"` //父级dn } //删除ldap组织 -type DeleteLdapOrganizationReq { - OrganizationDN string `json:"organization_dn"` //组织dn +type DeleteLdapOrginationReq { + OrginationDN string `json:"orgination_dn"` //组织dn } //修改ldap组织 -type UpdateLdapOrganizationReq { - OrganizationDN string `json:"organization_dn"` //组织dn +type UpdateLdapOrginationReq { + OrginationDN string `json:"orgination_dn"` //组织dn BusinessCategory string `json:"business_category"` //组织分类名称 } \ No newline at end of file