gaodm 6 роки тому
батько
коміт
8ed4a98a29

+ 1 - 9
diagbotman-service/src/main/java/com/diagbot/dto/ProductLineDTO.java

@@ -46,15 +46,7 @@ public class ProductLineDTO {
         String[] strs =accessType.split(",");
         List<String> list =new ArrayList();
         for (int i =0;i<strs.length;i++){
-            if(Integer.parseInt(strs[i])==AccessTypeEnum.Online.getKey()){
-                list.add(AccessTypeEnum.Online.getName());
-            }
-            if(Integer.parseInt(strs[i])==AccessTypeEnum.InterfaceType.getKey()){
-                list.add(AccessTypeEnum.InterfaceType.getName());
-            }
-            if(Integer.parseInt(strs[i])==AccessTypeEnum.Embedded.getKey()){
-                list.add(AccessTypeEnum.Embedded.getName());
-            }
+            list.add(AccessTypeEnum.getName(Integer.valueOf(strs[i])));
         }
         String[] strs1 =new String[list.size()];
         return list.toArray(strs1);