Commit eb2d4fdbc06b6416cfd73bd138b2fecba927ae74

Authored by YunaiV
1 parent 8236154a

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

yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/plugin/IotPluginDeployTypeEnum.java
1 package cn.iocoder.yudao.module.iot.enums.plugin; 1 package cn.iocoder.yudao.module.iot.enums.plugin;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.Getter; 4 import lombok.Getter;
5 5
6 import java.util.Arrays; 6 import java.util.Arrays;
@@ -11,12 +11,12 @@ import java.util.Arrays; @@ -11,12 +11,12 @@ import java.util.Arrays;
11 * @author haohao 11 * @author haohao
12 */ 12 */
13 @Getter 13 @Getter
14 -public enum IotPluginDeployTypeEnum implements IntArrayValuable { 14 +public enum IotPluginDeployTypeEnum implements ArrayValuable<Integer> {
15 15
16 JAR(0, "JAR 部署"), 16 JAR(0, "JAR 部署"),
17 STANDALONE(1, "独立部署"); 17 STANDALONE(1, "独立部署");
18 18
19 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotPluginDeployTypeEnum::getDeployType).toArray(); 19 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotPluginDeployTypeEnum::getDeployType).toArray(Integer[]::new);
20 20
21 /** 21 /**
22 * 部署方式 22 * 部署方式
@@ -45,7 +45,7 @@ public enum IotPluginDeployTypeEnum implements IntArrayValuable { @@ -45,7 +45,7 @@ public enum IotPluginDeployTypeEnum implements IntArrayValuable {
45 } 45 }
46 46
47 @Override 47 @Override
48 - public int[] array() { 48 + public Integer[] array() {
49 return ARRAYS; 49 return ARRAYS;
50 } 50 }
51 51
yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/plugin/IotPluginStatusEnum.java
1 package cn.iocoder.yudao.module.iot.enums.plugin; 1 package cn.iocoder.yudao.module.iot.enums.plugin;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.Getter; 4 import lombok.Getter;
5 5
6 import java.util.Arrays; 6 import java.util.Arrays;
@@ -11,12 +11,12 @@ import java.util.Arrays; @@ -11,12 +11,12 @@ import java.util.Arrays;
11 * @author haohao 11 * @author haohao
12 */ 12 */
13 @Getter 13 @Getter
14 -public enum IotPluginStatusEnum implements IntArrayValuable { 14 +public enum IotPluginStatusEnum implements ArrayValuable<Integer> {
15 15
16 STOPPED(0, "停止"), 16 STOPPED(0, "停止"),
17 RUNNING(1, "运行"); 17 RUNNING(1, "运行");
18 18
19 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotPluginStatusEnum::getStatus).toArray(); 19 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotPluginStatusEnum::getStatus).toArray(Integer[]::new);
20 20
21 /** 21 /**
22 * 状态 22 * 状态
@@ -41,7 +41,7 @@ public enum IotPluginStatusEnum implements IntArrayValuable { @@ -41,7 +41,7 @@ public enum IotPluginStatusEnum implements IntArrayValuable {
41 } 41 }
42 42
43 @Override 43 @Override
44 - public int[] array() { 44 + public Integer[] array() {
45 return ARRAYS; 45 return ARRAYS;
46 } 46 }
47 47
yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/plugin/IotPluginTypeEnum.java
1 package cn.iocoder.yudao.module.iot.enums.plugin; 1 package cn.iocoder.yudao.module.iot.enums.plugin;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,12 +13,12 @@ import java.util.Arrays; @@ -13,12 +13,12 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum IotPluginTypeEnum implements IntArrayValuable { 16 +public enum IotPluginTypeEnum implements ArrayValuable<Integer> {
17 17
18 NORMAL(0, "普通插件"), 18 NORMAL(0, "普通插件"),
19 DEVICE(1, "设备插件"); 19 DEVICE(1, "设备插件");
20 20
21 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotPluginTypeEnum::getType).toArray(); 21 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotPluginTypeEnum::getType).toArray(Integer[]::new);
22 22
23 /** 23 /**
24 * 类型 24 * 类型
@@ -31,7 +31,7 @@ public enum IotPluginTypeEnum implements IntArrayValuable { @@ -31,7 +31,7 @@ public enum IotPluginTypeEnum implements IntArrayValuable {
31 private final String name; 31 private final String name;
32 32
33 @Override 33 @Override
34 - public int[] array() { 34 + public Integer[] array() {
35 return ARRAYS; 35 return ARRAYS;
36 } 36 }
37 37
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&lt;Integer&gt; { @@ -18,7 +18,7 @@ public enum IotProductStatusEnum implements ArrayValuable&lt;Integer&gt; {
18 UNPUBLISHED(0, "开发中"), 18 UNPUBLISHED(0, "开发中"),
19 PUBLISHED(1, "已发布"); 19 PUBLISHED(1, "已发布");
20 20
21 - public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotProductStatusEnum::getType).toArray(Integer[]::new); 21 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotProductStatusEnum::getStatus).toArray(Integer[]::new);
22 22
23 /** 23 /**
24 * 类型 24 * 类型