完善密码修改
This commit is contained in:
parent
920874a82d
commit
c191deb51e
@ -114,6 +114,23 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-card">
|
||||||
|
<div class="layui-card-header">
|
||||||
|
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||||
|
<a href="javascript:void(0);"><cite>用户首次登录修改密码(该功能需设置密码有效期)</cite></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="layui-card-body" style="padding: 15px;">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div>
|
||||||
|
<input type="radio" name="firstLoginChangePassword" value="close" title="关闭" checked>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="radio" name="firstLoginChangePassword" value="open" title="开通">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="layui-card">
|
<div class="layui-card">
|
||||||
<div class="layui-card-header">
|
<div class="layui-card-header">
|
||||||
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||||
@ -149,23 +166,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-card">
|
|
||||||
<div class="layui-card-header">
|
|
||||||
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
|
||||||
<a href="javascript:void(0);"><cite>用户首次登录修改密码</cite></a>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="layui-card-body" style="padding: 15px;">
|
|
||||||
<div class="layui-form-item">
|
|
||||||
<div>
|
|
||||||
<input type="radio" name="firstLoginChangePassword" value="close" title="关闭" checked>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<input type="radio" name="firstLoginChangePassword" value="open" title="开通">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-card">
|
<div class="layui-card">
|
||||||
<div class="layui-card-header">
|
<div class="layui-card-header">
|
||||||
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||||
|
@ -35,6 +35,7 @@ public class UserPO implements Serializable {
|
|||||||
private String userLatitude;
|
private String userLatitude;
|
||||||
private Integer loginType;
|
private Integer loginType;
|
||||||
private String gmtPasswordModified;
|
private String gmtPasswordModified;
|
||||||
|
private String gmtCreate;
|
||||||
|
|
||||||
public String getUserId() {
|
public String getUserId() {
|
||||||
return userId == null ? "" : userId;
|
return userId == null ? "" : userId;
|
||||||
@ -172,6 +173,14 @@ public class UserPO implements Serializable {
|
|||||||
this.gmtPasswordModified = gmtPasswordModified;
|
this.gmtPasswordModified = gmtPasswordModified;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getGmtCreate() {
|
||||||
|
return gmtCreate == null ? "" : gmtCreate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGmtCreate(String gmtCreate) {
|
||||||
|
this.gmtCreate = gmtCreate;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
final StringBuilder sb = new StringBuilder("{");
|
final StringBuilder sb = new StringBuilder("{");
|
||||||
@ -209,6 +218,8 @@ public class UserPO implements Serializable {
|
|||||||
.append(loginType);
|
.append(loginType);
|
||||||
sb.append(",\"gmtPasswordModified\":\"")
|
sb.append(",\"gmtPasswordModified\":\"")
|
||||||
.append(gmtPasswordModified).append('\"');
|
.append(gmtPasswordModified).append('\"');
|
||||||
|
sb.append(",\"gmtCreate\":\"")
|
||||||
|
.append(gmtCreate).append('\"');
|
||||||
sb.append('}');
|
sb.append('}');
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -382,8 +382,11 @@ public class UserServiceImpl extends DefaultBaseService implements IUserService
|
|||||||
if (config.get(FIRST_LOGIN_CHANGE_PASSWORD) != null && !StringUtils.isBlank(config.get(FIRST_LOGIN_CHANGE_PASSWORD).toString())) {
|
if (config.get(FIRST_LOGIN_CHANGE_PASSWORD) != null && !StringUtils.isBlank(config.get(FIRST_LOGIN_CHANGE_PASSWORD).toString())) {
|
||||||
firstLoginChangePassword = config.get(FIRST_LOGIN_CHANGE_PASSWORD).toString();
|
firstLoginChangePassword = config.get(FIRST_LOGIN_CHANGE_PASSWORD).toString();
|
||||||
}
|
}
|
||||||
String gmtPasswordModified = userDao.getGmtPasswordModified(securityComponent.getCurrentUser().getUserId());
|
UserPO userPO = getPO(securityComponent.getCurrentUser().getUserId());
|
||||||
if (StringUtils.equals(FIRST_LOGIN_CHANGE_PASSWORD_OPEN, firstLoginChangePassword) && StringUtils.isBlank(gmtPasswordModified)) {
|
String gmtCreate = userPO.getGmtCreate();
|
||||||
|
String gmtPasswordModified = userPO.getGmtPasswordModified();
|
||||||
|
if (StringUtils.equals(FIRST_LOGIN_CHANGE_PASSWORD_OPEN, firstLoginChangePassword) &&
|
||||||
|
(StringUtils.isBlank(gmtPasswordModified) || StringUtils.equals(gmtCreate.substring(0, 10), gmtPasswordModified.substring(0, 10)))) {
|
||||||
return new SuccessResultData<>(PASSWORD_CHANGE);
|
return new SuccessResultData<>(PASSWORD_CHANGE);
|
||||||
}
|
}
|
||||||
DateTime gmtPasswordModifiedDateTime = null;
|
DateTime gmtPasswordModifiedDateTime = null;
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
<result property="userLatitude" column="user_latitude"/>
|
<result property="userLatitude" column="user_latitude"/>
|
||||||
<result property="loginType" column="login_type"/>
|
<result property="loginType" column="login_type"/>
|
||||||
<result property="gmtPasswordModified" column="gmt_password_modified"/>
|
<result property="gmtPasswordModified" column="gmt_password_modified"/>
|
||||||
|
<result property="gmtCreate" column="gmt_create"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="userDTO" type="ink.wgink.pojo.dtos.user.UserDTO">
|
<resultMap id="userDTO" type="ink.wgink.pojo.dtos.user.UserDTO">
|
||||||
|
Loading…
Reference in New Issue
Block a user