提交 | 用户 | 时间
|
149dd0
|
1 |
package com.iailab.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
/** |
|
4 |
* @author 251823 |
|
5 |
* @description 用户状态 |
|
6 |
* @date 2023/03/16 09:04:48 |
|
7 |
*/ |
|
8 |
public enum EM_GETUSERINFOBYCONDITION_USER_STATUS { |
|
9 |
/** |
|
10 |
* 未知 |
|
11 |
*/ |
|
12 |
EM_GETUSERINFOBYCONDITION_USER_STATUS_UNKNOWN(0, "未知"), |
|
13 |
/** |
|
14 |
* 不存在,未配置过用户信息 |
|
15 |
*/ |
|
16 |
EM_GETUSERINFOBYCONDITION_USER_STATUS_NOPRESENT(1, "不存在,未配置过用户信息"), |
|
17 |
/** |
|
18 |
* 未激活,已经配置过用户信息,但是未使能 |
|
19 |
*/ |
|
20 |
EM_GETUSERINFOBYCONDITION_USER_STATUS_INACTIVATED(2, "未激活,已经配置过用户信息,但是未使能"), |
|
21 |
/** |
|
22 |
* 已激活 |
|
23 |
*/ |
|
24 |
EM_GETUSERINFOBYCONDITION_USER_STATUS_ACTIVATED(3, "已激活"); |
|
25 |
|
|
26 |
private int value; |
|
27 |
|
|
28 |
private String note; |
|
29 |
|
|
30 |
public String getNote() { |
|
31 |
return note; |
|
32 |
} |
|
33 |
|
|
34 |
public int getValue() { |
|
35 |
return value; |
|
36 |
} |
|
37 |
|
|
38 |
EM_GETUSERINFOBYCONDITION_USER_STATUS(int givenValue, String note) { |
|
39 |
this.value = givenValue; |
|
40 |
this.note = note; |
|
41 |
} |
|
42 |
|
|
43 |
public static String getNoteByValue(int givenValue) { |
|
44 |
for (EM_GETUSERINFOBYCONDITION_USER_STATUS enumType : EM_GETUSERINFOBYCONDITION_USER_STATUS.values()) { |
|
45 |
if (givenValue == enumType.getValue()) { |
|
46 |
return enumType.getNote(); |
|
47 |
} |
|
48 |
} |
|
49 |
return null; |
|
50 |
} |
|
51 |
|
|
52 |
public static int getValueByNote(String givenNote) { |
|
53 |
for (EM_GETUSERINFOBYCONDITION_USER_STATUS enumType : EM_GETUSERINFOBYCONDITION_USER_STATUS.values()) { |
|
54 |
if (givenNote.equals(enumType.getNote())) { |
|
55 |
return enumType.getValue(); |
|
56 |
} |
|
57 |
} |
|
58 |
return -1; |
|
59 |
} |
|
60 |
} |