新增登录优化需要的枚举和字段

yun-zuoyi
yanyujia 2 years ago
parent 76d35b42e1
commit 27b8c1133e

@ -576,6 +576,66 @@ public class CommonEnumUtil {
}
/**
*
* 1.
* 2.
* 3.
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum LOCK_TYPE {
NOT_LOGGED_A_LONG_TIME(1, "not logger a long time", "长时间未登录锁定"),
LOGGER_TOO_MANY_FAILURES(2, "logger too many failures", "登录失败次数过多锁定"),
ADMIN_HAND_MOVEMENT_LOCKING(3, "admin hand movement locking", "管理员手动锁定");
private int value;
private String code;
private String description;
private LOCK_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public String getCode() {
return code;
}
public static String valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static String valueOfDescription(int val) {
return valueOf(val);
}
public static int descOf(String desc) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(desc)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
/**
*
* 1
* 2

@ -179,6 +179,9 @@ public class UserDetailModel extends BaseBean {
@ApiParam(value = "账号类型")
private String userAccountType;
@ApiParam(value ="密码是否过期(枚举1是,2否)" , example ="-1")
private Integer userPasswordOverdue;
public SysUser getSysUser(){
SysUser user = new SysUser();

@ -110,6 +110,26 @@ public class SysUser extends BaseBean {
@Column(name = "USER_ACCOUNT_TYPE")
@ApiParam(value = "用户账号类型")
private String userAccountType;
@Column(name = "LOCK_TYPE")
@ApiParam(value = "锁定状态(枚举1用户长时间未登录锁定,2登录失败次数过多锁定,3管理员手动锁定)", example = "-1")
private Integer lockType;
@Column(name = "AUTO_UNLOCK_NUM")
@ApiParam(value = "自动解锁次数(大于三次账号将锁定)", example = "0")
private Integer autoUnlockNum;
@Column(name = "MODIFY_PWD_NUM")
@ApiParam(value = "修改密码的次数", example = "0")
private Integer modifyPwdNum;
@Column(name = "USER_PASSWORD_OVERDUE")
@ApiParam(value = "密码是否过期", example = "-1")
private Integer userPasswordOverdue;
@Column(name = "RESET_PASSWORD_TIME")
@ApiParam(value = "重置密码的时间")
private String resetPasswordTime;
/********************************** 关系信息 ********************************/
@Column(name = "DEPARTMENT_ID")

Loading…
Cancel
Save