专家账号枚举类

master
yangjie 4 years ago
parent 26b98f81cb
commit 1c63c752fb
  1. 41
      src/main/java/com/yipin/liuwanr/entity/UserIdEnum.java

@ -0,0 +1,41 @@
package com.yipin.liuwanr.entity;
public enum UserIdEnum {
USER_ONE(1504,"10000000"),
USER_TWO(1505,"10000000"),
USER_THREE(1506,"10000000"),
USER_FOUR(1507,"10000000"),
USER_FIVE(1508,"10000000"),
USER_SIX(1509,"10000000"),
USER_SEVEN(1510,"10000000"),
USER_EIGHT(1511,"10000000"),
USER_NINE(1512,"10000000"),
USER_TEN(1513,"10000000");
private final Integer userId;
private final String name;
UserIdEnum(Integer value, String name) {
this.userId = value;
this.name = name;
}
public static Integer getUserId(int userValue){
for (UserIdEnum value : UserIdEnum.values()) {
if (value.userId==userValue){
return value.userId;
}
}
return 0;
}
public Integer getUserId() {
return userId;
}
public String getName() {
return name;
}
}
Loading…
Cancel
Save