|
@@ -22,26 +22,26 @@ public enum StatisticsTypeEnum implements KeyedNamed {
|
|
|
CONCEPT_DETAIL(11, "静态知识");
|
|
|
|
|
|
@Setter
|
|
|
- private Integer key;
|
|
|
+ private int key;
|
|
|
|
|
|
@Setter
|
|
|
private String name;
|
|
|
|
|
|
- StatisticsTypeEnum(Integer key, String name) {
|
|
|
+ StatisticsTypeEnum(int key, String name) {
|
|
|
this.key = key;
|
|
|
this.name = name;
|
|
|
}
|
|
|
|
|
|
- public static StatisticsTypeEnum getEnum(Integer key) {
|
|
|
+ public static StatisticsTypeEnum getEnum(int key) {
|
|
|
for (StatisticsTypeEnum item : StatisticsTypeEnum.values()) {
|
|
|
- if (item.key.equals(key)) {
|
|
|
+ if (item.key == key) {
|
|
|
return item;
|
|
|
}
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
- public static String getName(Integer key) {
|
|
|
+ public static String getName(int key) {
|
|
|
StatisticsTypeEnum item = getEnum(key);
|
|
|
return item != null ? item.name : null;
|
|
|
}
|