Merge branch 'develop' of http://139.196.179.195:3000/chenxudong/electromagnetic-data-new into develop
This commit is contained in:
commit
5bcc20782e
|
|
@ -1,6 +1,7 @@
|
|||
package com.electromagnetic.industry.software.manage.pojo.other;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
|
@ -54,7 +55,7 @@ public class SingleUserResponse {
|
|||
/**
|
||||
* 登录密码
|
||||
*/
|
||||
private String userPwd;
|
||||
// private String userPwd;
|
||||
|
||||
/**
|
||||
* 角色名称拼接字符串
|
||||
|
|
@ -93,10 +94,15 @@ public class SingleUserResponse {
|
|||
*/
|
||||
private Integer isActivated;
|
||||
|
||||
/**
|
||||
* 是否和默认密码相同
|
||||
*/
|
||||
private Integer isDefaultPwd;
|
||||
|
||||
/**
|
||||
* 盐
|
||||
*/
|
||||
private String salt;
|
||||
// private String salt;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
|
|
|
|||
|
|
@ -224,6 +224,14 @@ public class UserServiceImpl implements UserService {
|
|||
String roles = String.join(",", roleList);
|
||||
singleUserResponse.setRoles(roles);
|
||||
singleUserResponse.setRoleList(roleList);
|
||||
|
||||
// 检查密码是否和初始密码相同
|
||||
if (user.getUserPwd().equals(SignUtils.MD5(UserConstants.DEFAULT_PASSWORD + user.getSalt()))) {
|
||||
singleUserResponse.setIsDefaultPwd(1);
|
||||
} else {
|
||||
singleUserResponse.setIsDefaultPwd(0);
|
||||
}
|
||||
|
||||
list.add(singleUserResponse);
|
||||
}
|
||||
UserSearchResponse userSearchResponse = new UserSearchResponse();
|
||||
|
|
|
|||
Loading…
Reference in New Issue