浏览代码

【功能优化】IoT:同步最新代码

YunaiV 6 月之前
父节点
当前提交
eb2d4fdbc0

+ 4 - 4
yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/plugin/IotPluginDeployTypeEnum.java

@@ -1,6 +1,6 @@
 package cn.iocoder.yudao.module.iot.enums.plugin;
 
-import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
+import cn.iocoder.yudao.framework.common.core.ArrayValuable;
 import lombok.Getter;
 
 import java.util.Arrays;
@@ -11,12 +11,12 @@ import java.util.Arrays;
  * @author haohao
  */
 @Getter
-public enum IotPluginDeployTypeEnum implements IntArrayValuable {
+public enum IotPluginDeployTypeEnum implements ArrayValuable<Integer> {
 
     JAR(0, "JAR 部署"),
     STANDALONE(1, "独立部署");
 
-    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotPluginDeployTypeEnum::getDeployType).toArray();
+    public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotPluginDeployTypeEnum::getDeployType).toArray(Integer[]::new);
 
     /**
      * 部署方式
@@ -45,7 +45,7 @@ public enum IotPluginDeployTypeEnum implements IntArrayValuable {
     }
 
     @Override
-    public int[] array() {
+    public Integer[] array() {
         return ARRAYS;
     }
 

+ 4 - 4
yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/plugin/IotPluginStatusEnum.java

@@ -1,6 +1,6 @@
 package cn.iocoder.yudao.module.iot.enums.plugin;
 
-import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
+import cn.iocoder.yudao.framework.common.core.ArrayValuable;
 import lombok.Getter;
 
 import java.util.Arrays;
@@ -11,12 +11,12 @@ import java.util.Arrays;
  * @author haohao
  */
 @Getter
-public enum IotPluginStatusEnum implements IntArrayValuable {
+public enum IotPluginStatusEnum implements ArrayValuable<Integer> {
 
     STOPPED(0, "停止"),
     RUNNING(1, "运行");
 
-    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotPluginStatusEnum::getStatus).toArray();
+    public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotPluginStatusEnum::getStatus).toArray(Integer[]::new);
 
     /**
      * 状态
@@ -41,7 +41,7 @@ public enum IotPluginStatusEnum implements IntArrayValuable {
     }
 
     @Override
-    public int[] array() {
+    public Integer[] array() {
         return ARRAYS;
     }
 

+ 4 - 4
yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/plugin/IotPluginTypeEnum.java

@@ -1,6 +1,6 @@
 package cn.iocoder.yudao.module.iot.enums.plugin;
 
-import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
+import cn.iocoder.yudao.framework.common.core.ArrayValuable;
 import lombok.AllArgsConstructor;
 import lombok.Getter;
 
@@ -13,12 +13,12 @@ import java.util.Arrays;
  */
 @AllArgsConstructor
 @Getter
-public enum IotPluginTypeEnum implements IntArrayValuable {
+public enum IotPluginTypeEnum implements ArrayValuable<Integer> {
 
     NORMAL(0, "普通插件"),
     DEVICE(1, "设备插件");
 
-    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotPluginTypeEnum::getType).toArray();
+    public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotPluginTypeEnum::getType).toArray(Integer[]::new);
 
     /**
      * 类型
@@ -31,7 +31,7 @@ public enum IotPluginTypeEnum implements IntArrayValuable {
     private final String name;
 
     @Override
-    public int[] array() {
+    public Integer[] array() {
         return ARRAYS;
     }
 

+ 1 - 1
yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProductStatusEnum.java

@@ -18,7 +18,7 @@ public enum IotProductStatusEnum implements ArrayValuable<Integer> {
     UNPUBLISHED(0, "开发中"),
     PUBLISHED(1, "已发布");
 
-    public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotProductStatusEnum::getType).toArray(Integer[]::new);
+    public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotProductStatusEnum::getStatus).toArray(Integer[]::new);
 
     /**
      * 类型