This commit is contained in:
laodaming
2023-11-16 16:59:51 +08:00
parent 7d9f271b7c
commit a8cddf020f
4 changed files with 11 additions and 11 deletions

View File

@@ -15,14 +15,14 @@ import (
"github.com/zeromicro/go-zero/core/logx"
)
type GetorginationsLogic struct {
type GetLdapOrginationsLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
}
func NewGetorginationsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetorginationsLogic {
return &GetorginationsLogic{
func NewGetLdapOrginationsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetLdapOrginationsLogic {
return &GetLdapOrginationsLogic{
Logger: logx.WithContext(ctx),
ctx: ctx,
svcCtx: svcCtx,
@@ -30,7 +30,7 @@ func NewGetorginationsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Ge
}
// 处理进入前逻辑w,r
// func (l *GetorginationsLogic) BeforeLogic(w http.ResponseWriter, r *http.Request) {
// func (l *GetLdapOrginationsLogic) 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 *GetorginationsLogic) Getorginations(req *types.Request, userinfo *auth.UserInfo) (resp *basic.Response) {
func (l *GetLdapOrginationsLogic) GetLdapOrginations(req *types.Request, userinfo *auth.UserInfo) (resp *basic.Response) {
//从ldap获取组织架构数据
rootCn := strings.Split(l.svcCtx.Config.Ldap.RootDN, ",")
if len(rootCn) == 0 {
@@ -119,6 +119,6 @@ func (l *GetorginationsLogic) Getorginations(req *types.Request, userinfo *auth.
}
// 处理逻辑后 w,r 如:重定向, resp 必须重新处理
// func (l *GetorginationsLogic) AfterLogic(w http.ResponseWriter, r *http.Request, resp *basic.Response) {
// func (l *GetLdapOrginationsLogic) AfterLogic(w http.ResponseWriter, r *http.Request, resp *basic.Response) {
// // httpx.OkJsonCtx(r.Context(), w, resp)
// }