Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yujianwangzivayy
MaxKey
提交
c230ca78
MaxKey
项目概览
yujianwangzivayy
/
MaxKey
与 Fork 源项目一致
Fork自
MaxKey单点登录官方(MaxKeyTop) / MaxKey
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MaxKey
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c230ca78
编写于
1月 22, 2022
作者:
M
MaxKey
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
synchronizers
上级
d4ca0408
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
39 addition
and
40 deletion
+39
-40
maxkey-identitys/maxkey-synchronizers-activedirectory/src/main/java/org/maxkey/synchronizer/activedirectory/ActiveDirectoryOrganizationService.java
...r/activedirectory/ActiveDirectoryOrganizationService.java
+3
-3
maxkey-identitys/maxkey-synchronizers-activedirectory/src/main/java/org/maxkey/synchronizer/activedirectory/ActiveDirectoryUsersService.java
...hronizer/activedirectory/ActiveDirectoryUsersService.java
+2
-1
maxkey-identitys/maxkey-synchronizers-dingtalk/src/main/java/org/maxkey/synchronizer/dingtalk/DingtalkOrganizationService.java
...ey/synchronizer/dingtalk/DingtalkOrganizationService.java
+1
-8
maxkey-identitys/maxkey-synchronizers-dingtalk/src/main/java/org/maxkey/synchronizer/dingtalk/DingtalkUsersService.java
...rg/maxkey/synchronizer/dingtalk/DingtalkUsersService.java
+2
-8
maxkey-identitys/maxkey-synchronizers-ldap/src/main/java/org/maxkey/synchronizer/ldap/LdapOrganizationService.java
...org/maxkey/synchronizer/ldap/LdapOrganizationService.java
+3
-3
maxkey-identitys/maxkey-synchronizers-ldap/src/main/java/org/maxkey/synchronizer/ldap/LdapUsersService.java
...n/java/org/maxkey/synchronizer/ldap/LdapUsersService.java
+2
-0
maxkey-identitys/maxkey-synchronizers-workweixin/src/main/java/org/maxkey/synchronizer/workweixin/WorkweixinOrganizationService.java
...ynchronizer/workweixin/WorkweixinOrganizationService.java
+1
-9
maxkey-identitys/maxkey-synchronizers-workweixin/src/main/java/org/maxkey/synchronizer/workweixin/WorkweixinUsersService.java
...axkey/synchronizer/workweixin/WorkweixinUsersService.java
+2
-8
maxkey-persistence/src/main/java/org/maxkey/persistence/service/OrganizationsService.java
.../org/maxkey/persistence/service/OrganizationsService.java
+10
-0
maxkey-persistence/src/main/java/org/maxkey/persistence/service/UserInfoService.java
.../java/org/maxkey/persistence/service/UserInfoService.java
+13
-0
未找到文件。
maxkey-identitys/maxkey-synchronizers-activedirectory/src/main/java/org/maxkey/synchronizer/activedirectory/ActiveDirectoryOrganizationService.java
浏览文件 @
c230ca78
...
@@ -67,9 +67,9 @@ public class ActiveDirectoryOrganizationService extends AbstractSynchronizerSer
...
@@ -67,9 +67,9 @@ public class ActiveDirectoryOrganizationService extends AbstractSynchronizerSer
attributeMap
.
put
(
objAttrs
.
getID
().
toLowerCase
(),
objAttrs
);
attributeMap
.
put
(
objAttrs
.
getID
().
toLowerCase
(),
objAttrs
);
}
}
Organizations
org
=
buildOrganization
(
attributeMap
,
si
.
getName
(),
si
.
getNameInNamespace
());
Organizations
org
anization
=
buildOrganization
(
attributeMap
,
si
.
getName
(),
si
.
getNameInNamespace
());
organizationsService
.
saveOrUpdate
(
organization
);
_logger
.
info
(
"Organizations "
+
org
);
_logger
.
info
(
"Organizations "
+
org
anization
);
}
}
}
}
...
...
maxkey-identitys/maxkey-synchronizers-activedirectory/src/main/java/org/maxkey/synchronizer/activedirectory/ActiveDirectoryUsersService.java
浏览文件 @
c230ca78
...
@@ -70,7 +70,8 @@ public class ActiveDirectoryUsersService extends AbstractSynchronizerService
...
@@ -70,7 +70,8 @@ public class ActiveDirectoryUsersService extends AbstractSynchronizerService
UserInfo
userInfo
=
buildUserInfo
(
attributeMap
,
si
.
getName
(),
si
.
getNameInNamespace
());
UserInfo
userInfo
=
buildUserInfo
(
attributeMap
,
si
.
getName
(),
si
.
getNameInNamespace
());
userInfo
.
setPassword
(
userInfo
.
getUsername
()
+
"Maxkey@888"
);
userInfoService
.
saveOrUpdate
(
userInfo
);
_logger
.
info
(
"userInfo "
+
userInfo
);
_logger
.
info
(
"userInfo "
+
userInfo
);
}
}
}
}
...
...
maxkey-identitys/maxkey-synchronizers-dingtalk/src/main/java/org/maxkey/synchronizer/dingtalk/DingtalkOrganizationService.java
浏览文件 @
c230ca78
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
package
org.maxkey.synchronizer.dingtalk
;
package
org.maxkey.synchronizer.dingtalk
;
import
java.sql.Types
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.NoSuchElementException
;
import
java.util.NoSuchElementException
;
import
java.util.concurrent.LinkedBlockingQueue
;
import
java.util.concurrent.LinkedBlockingQueue
;
...
@@ -56,13 +55,7 @@ public class DingtalkOrganizationService extends AbstractSynchronizerService im
...
@@ -56,13 +55,7 @@ public class DingtalkOrganizationService extends AbstractSynchronizerService im
deptsQueue
.
add
(
dept
.
getDeptId
());
deptsQueue
.
add
(
dept
.
getDeptId
());
deptMap
.
put
(
dept
.
getDeptId
(),
dept
);
deptMap
.
put
(
dept
.
getDeptId
(),
dept
);
Organizations
organization
=
buildOrganization
(
dept
,
deptMap
.
get
(
dept
.
getParentId
()));
Organizations
organization
=
buildOrganization
(
dept
,
deptMap
.
get
(
dept
.
getParentId
()));
if
(
organizationsService
.
findOne
(
"id = ? and instid = ?"
,
organizationsService
.
saveOrUpdate
(
organization
);
new
Object
[]
{
organization
.
getId
().
toString
(),
organization
.
getInstId
()
},
new
int
[]
{
Types
.
VARCHAR
,
Types
.
VARCHAR
})
==
null
)
{
organizationsService
.
insert
(
organization
);
}
else
{
organizationsService
.
update
(
organization
);
}
_logger
.
info
(
"Organizations : "
+
organization
);
_logger
.
info
(
"Organizations : "
+
organization
);
}
}
}
}
...
...
maxkey-identitys/maxkey-synchronizers-dingtalk/src/main/java/org/maxkey/synchronizer/dingtalk/DingtalkUsersService.java
浏览文件 @
c230ca78
...
@@ -68,14 +68,8 @@ public class DingtalkUsersService extends AbstractSynchronizerService implement
...
@@ -68,14 +68,8 @@ public class DingtalkUsersService extends AbstractSynchronizerService implement
_logger
.
info
(
"name : "
+
user
.
getName
()+
" , "
+
user
.
getLoginId
()+
" , "
+
user
.
getUserid
());
_logger
.
info
(
"name : "
+
user
.
getName
()+
" , "
+
user
.
getLoginId
()+
" , "
+
user
.
getUserid
());
UserInfo
userInfo
=
buildUserInfo
(
user
);
UserInfo
userInfo
=
buildUserInfo
(
user
);
_logger
.
info
(
"userInfo "
+
userInfo
);
_logger
.
info
(
"userInfo "
+
userInfo
);
if
(
userInfoService
.
findOne
(
"username = ? and instid = ?"
,
new
Object
[]
{
userInfo
.
getUsername
(),
this
.
getSynchronizer
().
getInstId
()
},
new
int
[]
{
Types
.
VARCHAR
,
Types
.
VARCHAR
})
==
null
)
{
userInfo
.
setPassword
(
userInfo
.
getUsername
()
+
"Maxkey@888"
);
userInfo
.
setPassword
(
userInfo
.
getUsername
()
+
"Maxkey@888"
);
this
.
userInfoService
.
insert
(
userInfo
);
userInfoService
.
saveOrUpdate
(
userInfo
);
}
else
{
userInfoService
.
update
(
userInfo
);
}
}
}
}
}
...
...
maxkey-identitys/maxkey-synchronizers-ldap/src/main/java/org/maxkey/synchronizer/ldap/LdapOrganizationService.java
浏览文件 @
c230ca78
...
@@ -67,9 +67,9 @@ public class LdapOrganizationService extends AbstractSynchronizerService implem
...
@@ -67,9 +67,9 @@ public class LdapOrganizationService extends AbstractSynchronizerService implem
attributeMap
.
put
(
objAttrs
.
getID
().
toLowerCase
(),
objAttrs
);
attributeMap
.
put
(
objAttrs
.
getID
().
toLowerCase
(),
objAttrs
);
}
}
Organizations
org
=
buildOrganization
(
attributeMap
,
si
.
getName
(),
si
.
getNameInNamespace
());
Organizations
org
anization
=
buildOrganization
(
attributeMap
,
si
.
getName
(),
si
.
getNameInNamespace
());
organizationsService
.
saveOrUpdate
(
organization
);
_logger
.
info
(
"Organizations "
+
org
);
_logger
.
info
(
"Organizations "
+
org
anization
);
}
}
}
}
...
...
maxkey-identitys/maxkey-synchronizers-ldap/src/main/java/org/maxkey/synchronizer/ldap/LdapUsersService.java
浏览文件 @
c230ca78
...
@@ -65,6 +65,8 @@ public class LdapUsersService extends AbstractSynchronizerService implements IS
...
@@ -65,6 +65,8 @@ public class LdapUsersService extends AbstractSynchronizerService implements IS
}
}
UserInfo
userInfo
=
buildUserInfo
(
attributeMap
,
si
.
getName
(),
si
.
getNameInNamespace
());
UserInfo
userInfo
=
buildUserInfo
(
attributeMap
,
si
.
getName
(),
si
.
getNameInNamespace
());
userInfo
.
setPassword
(
userInfo
.
getUsername
()
+
"Maxkey@888"
);
userInfoService
.
saveOrUpdate
(
userInfo
);
_logger
.
info
(
"userInfo "
+
userInfo
);
_logger
.
info
(
"userInfo "
+
userInfo
);
}
}
}
}
...
...
maxkey-identitys/maxkey-synchronizers-workweixin/src/main/java/org/maxkey/synchronizer/workweixin/WorkweixinOrganizationService.java
浏览文件 @
c230ca78
...
@@ -17,8 +17,6 @@
...
@@ -17,8 +17,6 @@
package
org.maxkey.synchronizer.workweixin
;
package
org.maxkey.synchronizer.workweixin
;
import
java.sql.Types
;
import
org.maxkey.constants.ConstsStatus
;
import
org.maxkey.constants.ConstsStatus
;
import
org.maxkey.entity.Organizations
;
import
org.maxkey.entity.Organizations
;
import
org.maxkey.synchronizer.AbstractSynchronizerService
;
import
org.maxkey.synchronizer.AbstractSynchronizerService
;
...
@@ -48,13 +46,7 @@ public class WorkweixinOrganizationService extends AbstractSynchronizerService i
...
@@ -48,13 +46,7 @@ public class WorkweixinOrganizationService extends AbstractSynchronizerService i
for
(
WorkWeixinDepts
dept
:
rsp
.
getDepartment
())
{
for
(
WorkWeixinDepts
dept
:
rsp
.
getDepartment
())
{
_logger
.
info
(
"dept : "
+
dept
.
getId
()+
" "
+
dept
.
getName
()+
" "
+
dept
.
getParentid
());
_logger
.
info
(
"dept : "
+
dept
.
getId
()+
" "
+
dept
.
getName
()+
" "
+
dept
.
getParentid
());
Organizations
organization
=
buildOrganization
(
dept
);
Organizations
organization
=
buildOrganization
(
dept
);
if
(
organizationsService
.
findOne
(
"id = ? and instid = ?"
,
organizationsService
.
saveOrUpdate
(
organization
);
new
Object
[]
{
organization
.
getId
(),
organization
.
getInstId
()
},
new
int
[]
{
Types
.
VARCHAR
,
Types
.
VARCHAR
})
==
null
)
{
organizationsService
.
insert
(
organization
);
}
else
{
organizationsService
.
update
(
organization
);
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
maxkey-identitys/maxkey-synchronizers-workweixin/src/main/java/org/maxkey/synchronizer/workweixin/WorkweixinUsersService.java
浏览文件 @
c230ca78
...
@@ -56,14 +56,8 @@ public class WorkweixinUsersService extends AbstractSynchronizerService implemen
...
@@ -56,14 +56,8 @@ public class WorkweixinUsersService extends AbstractSynchronizerService implemen
for
(
WorkWeixinUsers
user
:
usersResponse
.
getUserlist
())
{
for
(
WorkWeixinUsers
user
:
usersResponse
.
getUserlist
())
{
UserInfo
userInfo
=
buildUserInfo
(
user
);
UserInfo
userInfo
=
buildUserInfo
(
user
);
_logger
.
info
(
"userInfo : "
+
userInfo
);
_logger
.
info
(
"userInfo : "
+
userInfo
);
if
(
userInfoService
.
findOne
(
"username = ? and instid = ?"
,
new
Object
[]
{
userInfo
.
getUsername
(),
this
.
getSynchronizer
().
getInstId
()
},
new
int
[]
{
Types
.
VARCHAR
,
Types
.
VARCHAR
})
==
null
)
{
userInfo
.
setPassword
(
userInfo
.
getUsername
()
+
"Maxkey@888"
);
userInfo
.
setPassword
(
userInfo
.
getUsername
()
+
"Maxkey@888"
);
this
.
userInfoService
.
insert
(
userInfo
);
userInfoService
.
saveOrUpdate
(
userInfo
);
}
else
{
userInfoService
.
update
(
userInfo
);
}
}
}
}
}
...
...
maxkey-persistence/src/main/java/org/maxkey/persistence/service/OrganizationsService.java
浏览文件 @
c230ca78
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
package
org.maxkey.persistence.service
;
package
org.maxkey.persistence.service
;
import
java.sql.Types
;
import
java.util.List
;
import
java.util.List
;
import
org.apache.mybatis.jpa.persistence.JpaBaseService
;
import
org.apache.mybatis.jpa.persistence.JpaBaseService
;
import
org.apache.poi.ss.usermodel.Cell
;
import
org.apache.poi.ss.usermodel.Cell
;
...
@@ -66,6 +67,15 @@ public class OrganizationsService extends JpaBaseService<Organizations>{
...
@@ -66,6 +67,15 @@ public class OrganizationsService extends JpaBaseService<Organizations>{
return
false
;
return
false
;
}
}
public
void
saveOrUpdate
(
Organizations
organization
)
{
if
(
findOne
(
" id = ? and instid = ?"
,
new
Object
[]
{
organization
.
getId
().
toString
(),
organization
.
getInstId
()
},
new
int
[]
{
Types
.
VARCHAR
,
Types
.
VARCHAR
})
==
null
)
{
insert
(
organization
);
}
else
{
update
(
organization
);
}
}
public
List
<
Organizations
>
queryOrgs
(
Organizations
organization
){
public
List
<
Organizations
>
queryOrgs
(
Organizations
organization
){
return
getMapper
().
queryOrgs
(
organization
);
return
getMapper
().
queryOrgs
(
organization
);
}
}
...
...
maxkey-persistence/src/main/java/org/maxkey/persistence/service/UserInfoService.java
浏览文件 @
c230ca78
...
@@ -18,6 +18,8 @@
...
@@ -18,6 +18,8 @@
package
org.maxkey.persistence.service
;
package
org.maxkey.persistence.service
;
import
java.sql.Types
;
import
org.apache.mybatis.jpa.persistence.JpaBaseService
;
import
org.apache.mybatis.jpa.persistence.JpaBaseService
;
import
org.maxkey.constants.ConstsStatus
;
import
org.maxkey.constants.ConstsStatus
;
import
org.maxkey.crypto.password.PasswordReciprocal
;
import
org.maxkey.crypto.password.PasswordReciprocal
;
...
@@ -163,6 +165,17 @@ public class UserInfoService extends JpaBaseService<UserInfo> {
...
@@ -163,6 +165,17 @@ public class UserInfoService extends JpaBaseService<UserInfo> {
}
}
public
void
saveOrUpdate
(
UserInfo
userInfo
)
{
if
(
findOne
(
" username = ? and instid = ?"
,
new
Object
[]
{
userInfo
.
getUsername
(),
userInfo
.
getInstId
()
},
new
int
[]
{
Types
.
VARCHAR
,
Types
.
VARCHAR
})
==
null
)
{
insert
(
userInfo
);
}
else
{
userInfo
.
setPassword
(
null
);
update
(
userInfo
);
}
}
public
boolean
updateProtectedApps
(
UserInfo
userinfo
)
{
public
boolean
updateProtectedApps
(
UserInfo
userinfo
)
{
try
{
try
{
if
(
WebContext
.
getUserInfo
()
!=
null
)
{
if
(
WebContext
.
getUserInfo
()
!=
null
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录