This commit is contained in:
laodaming 2023-11-13 18:05:42 +08:00
parent f279c4edc9
commit b7e67a9000

View File

@ -1,6 +1,7 @@
package logic
import (
"fusenapi/constants"
"fusenapi/utils/auth"
"fusenapi/utils/basic"
@ -31,7 +32,17 @@ func NewGetDepartmentsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Ge
// }
func (l *GetDepartmentsLogic) GetDepartments(req *types.GetDepartmentsReq, userinfo *auth.UserInfo) (resp *basic.Response) {
l.svcCtx.AllModels.LdapDepartment
if req.CurrentPage <= 0{
req.CurrentPage = constants.DEFAULT_PAGE
}
if req.PageSize <= 0{
req.PageSize = constants.DEFAULT_PAGE_SIZE
}
/*departList,total,err := l.svcCtx.AllModels.LdapDepartment.GetList(l.ctx,req.CurrentPage,req.PageSize,"")
if err != nil{
logx.Error(err)
return resp.SetStatusWithMessage(basic.CodeDbSqlErr,"获取部门列表失败")
}*/
return resp.SetStatus(basic.CodeOK)
}