Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
e62e1172d7
|
|
@ -57,7 +57,7 @@ public class SysUser extends BaseEntity
|
|||
private String avatar;
|
||||
|
||||
/** 密码 */
|
||||
@JsonIgnore
|
||||
// @JsonIgnore
|
||||
private transient String password;
|
||||
|
||||
/** 帐号状态(0正常 1停用) */
|
||||
|
|
|
|||
|
|
@ -93,6 +93,13 @@ public class SysLoginService {
|
|||
throw new ServiceException("对不起,您的账号:" + username + " 已停用");
|
||||
}
|
||||
passwordService.validate(user, password);
|
||||
|
||||
// 检查用户是否需要更改初始密码
|
||||
if (user.getForceChangePwd().equals(1)) {
|
||||
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "请先修改初始密码");
|
||||
throw new ServiceException("请先修改初始密码");
|
||||
}
|
||||
|
||||
recordLogService.recordLogininfor(username, Constants.LOGIN_SUCCESS, "登录成功");
|
||||
return userInfo;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -165,12 +165,12 @@ public class Constants
|
|||
/**
|
||||
* 解密私钥
|
||||
*/
|
||||
public static String privateKey;
|
||||
public static String privateKey = "MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAqhHyZfSsYourNxaY7Nt+PrgrxkiA50efORdI5U5lsW79MmFnusUA355oaSXcLhu5xxB38SMSyP2KvuKNPuH3owIDAQABAkAfoiLyL+Z4lf4Myxk6xUDgLaWGximj20CUf+5BKKnlrK+Ed8gAkM0HqoTt2UZwA5E2MzS4EI2gjfQhz5X28uqxAiEA3wNFxfrCZlSZHb0gn2zDpWowcSxQAgiCstxGUoOqlW8CIQDDOerGKH5OmCJ4Z21v+F25WaHYPxCFMvwxpcw99EcvDQIgIdhDTIqD2jfYjPTY8Jj3EDGPbH2HHuffvflECt3Ek60CIQCFRlCkHpi7hthhYhovyloRYsM+IS9h/0BzlEAuO0ktMQIgSPT3aFAgJYwKpqRYKlLDVcflZFCKY7u3UP8iWi1Qw0Y=";
|
||||
|
||||
@Value("${sgzb.system.privateKey}")
|
||||
public void setServerPort(String privateKey){
|
||||
this.privateKey= privateKey;
|
||||
}
|
||||
// @Value("${sgzb.system.privateKey}")
|
||||
// public void setServerPort(String privateKey){
|
||||
// this.privateKey= privateKey;
|
||||
// }
|
||||
|
||||
public static final String INNER_PROTOCAL = "1"; //内部单位协议
|
||||
|
||||
|
|
|
|||
|
|
@ -198,6 +198,7 @@ public class SysUserController extends BaseController {
|
|||
ajax.put("posts", postService.selectPostAll());
|
||||
if (StringUtils.isNotNull(userId)) {
|
||||
SysUser sysUser = userService.selectUserById(userId);
|
||||
sysUser.setPassword(null);
|
||||
ajax.put(AjaxResult.DATA_TAG, sysUser);
|
||||
ajax.put("postIds", postService.selectPostListByUserId(userId));
|
||||
ajax.put("roleIds", sysUser.getRoles().stream().map(SysRole::getRoleId).collect(Collectors.toList()));
|
||||
|
|
|
|||
|
|
@ -196,6 +196,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="companyId != null and companyId != ''">company_id,</if>
|
||||
force_change_pwd,
|
||||
create_time
|
||||
)values(
|
||||
<if test="userId != null and userId != ''">#{userId},</if>
|
||||
|
|
@ -211,6 +212,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="companyId != null and companyId != ''">#{companyId},</if>
|
||||
1,
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
|
@ -231,6 +233,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="loginDate != null">login_date = #{loginDate},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
force_change_pwd = 1,
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where user_id = #{userId}
|
||||
|
|
|
|||
Loading…
Reference in New Issue