基于spring-ladp的统一用户中心结构设计以及代码结构设计

基于spring-ladp的统一用户中心结构设计以及代码结构设计

1、 目录设计

1.1 公司

attribute describe require
objectClass organization,dcObject,top y
o 公司名称(惟一) y
dc 域(暂存域名) y

1.2 部门

attribute describe require
objectClass organizationalUnit,top y
ou 部门名称 y

1.3 注册人员

attribute describe require
objectClass inetOrgPerson,organizationalPerson,top y
uid 登陆名称(惟一) y
cn 登陆名称 y
sn 姓名 y
userpassword 密码 y
o 公司名称 n
ou 部门名称 n
mobile 手机号 n
employeetype 职位 n
mail 邮箱 n

1.4层级人员

attribute describe require
objectClass inetOrgPerson,organizationalPerson,top y
cn 登陆名称(对应注册人员uid) y
sn 姓名 y

2、 规则

1 注册

自行注册人员放到模拟公司的目录下,等所属公司组织结构创建完毕,将此人员迁移到所属公司(或者删除此人员,所属公司新建此人员)。java

模拟公司以下 imagegit

2 人员添加

人员添加须要指定具体目录。github

例如:要在“财务部”下添加人员,须要指定ou=财务部,o=用友超客 imagespring

目前咱们的人员上下级关系所有用人员去处理,不用添加部门上下级关系。json

3、 接口

一、增长公司

Request describeapp

Item value
PATH /usercenter/organization/create
Http Method post
Accept application/json
Conten-Type application/json;charset=UTF-8

Request Parameterdom

parameter type require comment
organization_name String y 公司名称
domain_name String y 域(暂存域名)

二、删除公司

Request describepost

Item value
PATH /usercenter/organization/delete
Http Method delete
Accept application/json
Conten-Type application/json;charset=UTF-8

Request Parameterui

parameter type require comment
organization_name String y 公司名称

三、增长部门

Request describespa

Item value
PATH /usercenter/ou/create
Http Method post
Accept application/json
Conten-Type application/json;charset=UTF-8

Request Parameter

parameter type require comment
rdn String y 部门的具体路径(不包括部门名称)
ou_name String y 部门名称

四、删除部门

Request describe

Item value
PATH /usercenter/ou/delete
Http Method delete
Accept application/json
Conten-Type application/json;charset=UTF-8

Request Parameter

parameter type require comment
rdn String y 部门的具体路径(包括部门名称)

五、增长人员

Request describe

Item value
PATH /usercenter/ouperson/create
Http Method post
Accept application/json
Conten-Type application/json;charset=UTF-8

Request Parameter

parameter type require comment
rdn String y 增长人员的具体路径(不包括登陆名称)
login_name String y 登陆名称
user_password String y 登陆密码
user_name String y 人员名称
mobile String n 联系电话
company String n 所属公司
department String n 所属部门
email String n 邮箱
employee_type String n 职位

六、 删除人员

Request describe

Item value
PATH /usercenter/ouperson/delete
Http Method delete
Accept application/json
Conten-Type application/json;charset=UTF-8

Request Parameter

parameter type require comment
rdn String y 增长人员的具体路径(包括登陆名称)

七、 人员注册

Request describe

Item value
PATH /usercenter/ouperson/register
Http Method post
Accept application/json
Conten-Type application/json;charset=UTF-8

Request Parameter

parameter type require comment
login_name String y 登陆名称
user_password String y 登陆密码
user_name String y 人员名称
mobile String n 联系电话
company String n 所属公司
department String n 所属部门
employee_type String n 职位
email String n 邮箱

八、人员登陆

Request describe

Item value
PATH /usercenter/ouperson/account
Http Method get
Accept application/json
Conten-Type application/json;charset=UTF-8

Request Parameter

parameter type require comment
login_name String y 登陆名称
user_password String y 登陆密码

Response Parameter

parameter type comment
login_name String 登陆名称
user_password String 登陆密码
user_name String 人员名称
mobile String 联系电话
company String 所属公司
department String 所属部门
employee_type String 职位

九、人员迁移

Request describe

Item value
PATH /usercenter/ouperson/move
Http Method get
Accept application/json
Conten-Type application/json;charset=UTF-8

Request Parameter

parameter type require comment
oldrdn String y 人员的具体路径(包括登陆名称)
newrdn String y 人员的具体路径(包括登陆名称(能够重命名)

十、添加层级人员

Request describe

Item value
PATH /usercenter/ouperson/hierarchy
Http Method post
Accept application/json
Conten-Type application/json;charset=UTF-8

Request Parameter

parameter type require comment
rdn String y 增长人员的具体路径
login_name String y 对应人员的uid
user_name String y 人员名称

十一、查询人员信息的具体路径

Request describe

Item value
PATH /usercenter/ouperson/rdn
Http Method get
Accept application/json
Conten-Type application/json;charset=UTF-8

Request Parameter

parameter type require comment
login_name String y 登陆名称

Response Parameter

parameter type comment
path String 路径

十二、人员的全部下一级

Request describe

Item value
PATH /usercenter/ouperson/nexthierarchy
Http Method get
Accept application/json
Conten-Type application/json;charset=UTF-8

Request Parameter

parameter type require comment
rdn String y 人员的具体路径(包括登陆名称)

Response Parameter

parameter type comment
login_name String 登陆名称
user_name String 人员名称

十一、删除层级人员

Request describe

Item value
PATH /usercenter/ouperson/delhierarchy
Http Method delete
Accept application/json
Conten-Type application/json;charset=UTF-8

Request Parameter

parameter type require comment
rdn String y 人员的具体路径(包括登陆名称)

十二、更改密码

Request describe

Item value
PATH /usercenter/ouperson/replacepwd
Http Method put
Accept application/json
Conten-Type application/json;charset=UTF-8

Request Parameter

parameter type require comment
login_name String y 登陆uid
user_oldpassword String y 旧密码
user_newpassword String y 新密码

1三、找回密码

Request describe

Item value
PATH /usercenter/ouperson/retrievepwd
Http Method put
Accept application/json
Conten-Type application/json;charset=UTF-8

Request Parameter

parameter type require comment
login_name String y 登陆uid
user_newpassword String y 新密码