Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
2db59b9e
o2oa
项目概览
ghsby
/
o2oa
落后 Fork 源项目 2880 个版本
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2db59b9e
编写于
6月 10, 2020
作者:
hlwwx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
'个人信息增加密码过期时间'
上级
240ab4a9
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
13 addition
and
8 deletion
+13
-8
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/factory/PersonFactory.java
.../organization/assemble/control/factory/PersonFactory.java
+8
-3
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/function/ActionSetPassword.java
...on/assemble/control/jaxrs/function/ActionSetPassword.java
+1
-1
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/person/ActionCreate.java
...anization/assemble/control/jaxrs/person/ActionCreate.java
+2
-2
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/person/ActionResetPassword.java
...on/assemble/control/jaxrs/person/ActionResetPassword.java
+1
-1
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/person/ActionSetPassword.java
...tion/assemble/control/jaxrs/person/ActionSetPassword.java
+1
-1
未找到文件。
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/factory/PersonFactory.java
浏览文件 @
2db59b9e
...
...
@@ -3,6 +3,7 @@ package com.x.organization.assemble.control.factory;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.regex.Matcher
;
import
java.util.stream.Collectors
;
...
...
@@ -187,7 +188,7 @@ public class PersonFactory extends AbstractFactory {
throw
new
Exception
(
"find duplicate value{"
+
StringUtils
.
join
(
list
,
","
)
+
"}"
);
}
public
void
setPassword
(
Person
person
,
String
password
)
throws
Exception
{
public
void
setPassword
(
Person
person
,
String
password
,
boolean
isInitialization
)
throws
Exception
{
Calendar
cal
=
Calendar
.
getInstance
();
person
.
setChangePasswordTime
(
cal
.
getTime
());
person
.
setPassword
(
Crypto
.
encrypt
(
password
,
Config
.
token
().
getKey
()));
...
...
@@ -195,8 +196,12 @@ public class PersonFactory extends AbstractFactory {
if
(
passwordPeriod
==
null
||
passwordPeriod
<=
0
)
{
person
.
setPasswordExpiredTime
(
null
);
}
else
{
cal
.
add
(
Calendar
.
DATE
,
passwordPeriod
);
person
.
setPasswordExpiredTime
(
cal
.
getTime
());
if
(
isInitialization
)
{
person
.
setPasswordExpiredTime
(
new
Date
());
}
else
{
cal
.
add
(
Calendar
.
DATE
,
passwordPeriod
);
person
.
setPasswordExpiredTime
(
cal
.
getTime
());
}
}
}
...
...
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/function/ActionSetPassword.java
浏览文件 @
2db59b9e
...
...
@@ -27,7 +27,7 @@ public class ActionSetPassword {
}
Person
person
=
emc
.
find
(
personId
,
Person
.
class
,
ExceptionWhen
.
not_found
);
emc
.
beginTransaction
(
Person
.
class
);
business
.
person
().
setPassword
(
person
,
wrapIn
.
getValue
());
business
.
person
().
setPassword
(
person
,
wrapIn
.
getValue
()
,
false
);
emc
.
check
(
person
,
CheckPersistType
.
all
);
emc
.
commit
();
ApplicationCache
.
notify
(
Person
.
class
);
...
...
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/person/ActionCreate.java
浏览文件 @
2db59b9e
...
...
@@ -78,9 +78,9 @@ class ActionCreate extends BaseAction {
/** 不设置默认头像,可以通过为空直接显示默认头像 */
if
(
StringUtils
.
isNotEmpty
(
wi
.
getPassword
()))
{
business
.
person
().
setPassword
(
person
,
wi
.
getPassword
());
business
.
person
().
setPassword
(
person
,
wi
.
getPassword
()
,
true
);
}
else
{
business
.
person
().
setPassword
(
person
,
this
.
initPassword
(
business
,
person
));
business
.
person
().
setPassword
(
person
,
this
.
initPassword
(
business
,
person
)
,
true
);
}
/** 设置默认管理员 */
this
.
convertControllerList
(
effectivePerson
,
business
,
person
);
...
...
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/person/ActionResetPassword.java
浏览文件 @
2db59b9e
...
...
@@ -29,7 +29,7 @@ class ActionResetPassword extends BaseAction {
if
(!
business
.
editable
(
effectivePerson
,
o
))
{
throw
new
ExceptionDenyEditPerson
(
effectivePerson
,
flag
);
}
business
.
person
().
setPassword
(
o
,
this
.
initPassword
(
business
,
o
));
business
.
person
().
setPassword
(
o
,
this
.
initPassword
(
business
,
o
)
,
true
);
emc
.
beginTransaction
(
Person
.
class
);
emc
.
check
(
o
,
CheckPersistType
.
all
);
emc
.
commit
();
...
...
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/person/ActionSetPassword.java
浏览文件 @
2db59b9e
...
...
@@ -38,7 +38,7 @@ class ActionSetPassword extends BaseAction {
throw
new
ExceptionPasswordEmpty
();
}
emc
.
beginTransaction
(
Person
.
class
);
business
.
person
().
setPassword
(
o
,
wi
.
getValue
());
business
.
person
().
setPassword
(
o
,
wi
.
getValue
()
,
false
);
emc
.
check
(
o
,
CheckPersistType
.
all
);
emc
.
commit
();
ApplicationCache
.
notify
(
Person
.
class
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录