瀏覽代碼

把Integer key改成int key

gaodm 5 年之前
父節點
當前提交
3d1ecf11b0
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5 5
      bi-service/src/main/java/com/diagbot/enums/StatisticsTypeEnum.java

+ 5 - 5
bi-service/src/main/java/com/diagbot/enums/StatisticsTypeEnum.java

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