新增账号类型字段

yun-zuoyi
nies 3 years ago
parent 187c1382ca
commit dfe93ff37e

@ -2853,18 +2853,18 @@ public class CommonEnumUtil {
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum USER_ACCOUNT_TYPE { public enum USER_ACCOUNT_TYPE {
SYSTEM_USER(10, "系统用户"), SYSTEM("SYSTEM", "系统用户"),
SWEB_USER(20, "sweb用户"); SWEB("SWEB", "sweb用户");
private int value; private String value;
private String description; private String description;
USER_ACCOUNT_TYPE(int value, String description) { USER_ACCOUNT_TYPE(String value, String description) {
this.value = value; this.value = value;
this.description = description; this.description = description;
} }
public int getValue() { public String getValue() {
return value; return value;
} }
@ -2872,19 +2872,28 @@ public class CommonEnumUtil {
return description; return description;
} }
public static String valueOf(int val) { public static String valueOfDescription(String val) {
String tmp = null; String tmp = null;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) { if (values()[i].value.equalsIgnoreCase(val)) {
tmp = values()[i].description; tmp = values()[i].description;
} }
} }
return tmp; return tmp;
} }
public static USER_ACCOUNT_TYPE valueOfEnum(String val) {
USER_ACCOUNT_TYPE tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value.equalsIgnoreCase(val)) {
tmp = values()[i];
}
}
return tmp;
}
public static Integer descriptionOfValue(String desc) { public static String descriptionOfValue(String desc) {
Integer tmp = null; String tmp = null;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(desc)) { if (values()[i].description.equals(desc)) {
tmp = values()[i].value; tmp = values()[i].value;

@ -166,6 +166,11 @@ public class UserDetailModel extends BaseBean {
@ApiParam(value = "登录平台权限") @ApiParam(value = "登录平台权限")
private String authPlatform; private String authPlatform;
@ApiParam(value = "账号类型")
private String userAccountType;
public SysUser getSysUser(){ public SysUser getSysUser(){
SysUser user = new SysUser(); SysUser user = new SysUser();
user.setId(!StringUtils.isBlank(this.userId) ? Long.parseLong(this.userId) : null); user.setId(!StringUtils.isBlank(this.userId) ? Long.parseLong(this.userId) : null);
@ -180,6 +185,7 @@ public class UserDetailModel extends BaseBean {
user.setOrganizeCode(this.organizeCode); user.setOrganizeCode(this.organizeCode);
user.setUserLoginNum(this.userLoginNum); user.setUserLoginNum(this.userLoginNum);
user.setAuthPlatform(this.authPlatform); user.setAuthPlatform(this.authPlatform);
user.setUserAccountType(this.userAccountType);
return user; return user;
} }

Loading…
Cancel
Save