Commit d83b7cd5b9d5d3e5817f51d22777fada6b1f6b4b

Authored by puhui999
1 parent e89e3c94

【代码优化】InEnum 不必须指定 int 类型,通过泛型指定

Showing 86 changed files with 357 additions and 356 deletions
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/core/IntArrayValuable.java renamed to yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/core/ArrayValuable.java
1 package cn.iocoder.yudao.framework.common.core; 1 package cn.iocoder.yudao.framework.common.core;
2 2
3 /** 3 /**
4 - * 可生成 Int 数组的接口 4 + * 可生成 T 数组的接口
5 * 5 *
6 - * @author 芋道源码 6 + * @author HUIHUI
7 */ 7 */
8 -public interface IntArrayValuable { 8 +public interface ArrayValuable<T> {
9 9
10 /** 10 /**
11 - * @return int 数组 11 + * @return 数组
12 */ 12 */
13 - int[] array(); 13 + T[] array();
14 14
15 -} 15 +}
16 \ No newline at end of file 16 \ No newline at end of file
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/CommonStatusEnum.java
1 package cn.iocoder.yudao.framework.common.enums; 1 package cn.iocoder.yudao.framework.common.enums;
2 2
3 import cn.hutool.core.util.ObjUtil; 3 import cn.hutool.core.util.ObjUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,12 +14,12 @@ import java.util.Arrays; @@ -14,12 +14,12 @@ import java.util.Arrays;
14 */ 14 */
15 @Getter 15 @Getter
16 @AllArgsConstructor 16 @AllArgsConstructor
17 -public enum CommonStatusEnum implements IntArrayValuable { 17 +public enum CommonStatusEnum implements ArrayValuable<Integer> {
18 18
19 ENABLE(0, "开启"), 19 ENABLE(0, "开启"),
20 DISABLE(1, "关闭"); 20 DISABLE(1, "关闭");
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CommonStatusEnum::getStatus).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CommonStatusEnum::getStatus).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 状态值 25 * 状态值
@@ -31,7 +31,7 @@ public enum CommonStatusEnum implements IntArrayValuable { @@ -31,7 +31,7 @@ public enum CommonStatusEnum 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-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/DateIntervalEnum.java
1 package cn.iocoder.yudao.framework.common.enums; 1 package cn.iocoder.yudao.framework.common.enums;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,7 +14,7 @@ import java.util.Arrays; @@ -14,7 +14,7 @@ import java.util.Arrays;
14 */ 14 */
15 @Getter 15 @Getter
16 @AllArgsConstructor 16 @AllArgsConstructor
17 -public enum DateIntervalEnum implements IntArrayValuable { 17 +public enum DateIntervalEnum implements ArrayValuable<Integer> {
18 18
19 DAY(1, "天"), 19 DAY(1, "天"),
20 WEEK(2, "周"), 20 WEEK(2, "周"),
@@ -23,7 +23,7 @@ public enum DateIntervalEnum implements IntArrayValuable { @@ -23,7 +23,7 @@ public enum DateIntervalEnum implements IntArrayValuable {
23 YEAR(5, "年") 23 YEAR(5, "年")
24 ; 24 ;
25 25
26 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DateIntervalEnum::getInterval).toArray(); 26 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(DateIntervalEnum::getInterval).toArray(Integer[]::new);
27 27
28 /** 28 /**
29 * 类型 29 * 类型
@@ -35,7 +35,7 @@ public enum DateIntervalEnum implements IntArrayValuable { @@ -35,7 +35,7 @@ public enum DateIntervalEnum implements IntArrayValuable {
35 private final String name; 35 private final String name;
36 36
37 @Override 37 @Override
38 - public int[] array() { 38 + public Integer[] array() {
39 return ARRAYS; 39 return ARRAYS;
40 } 40 }
41 41
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/TerminalEnum.java
1 package cn.iocoder.yudao.framework.common.enums; 1 package cn.iocoder.yudao.framework.common.enums;
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 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @RequiredArgsConstructor 14 @RequiredArgsConstructor
15 @Getter 15 @Getter
16 -public enum TerminalEnum implements IntArrayValuable { 16 +public enum TerminalEnum implements ArrayValuable<Integer> {
17 17
18 UNKNOWN(0, "未知"), // 目的:在无法解析到 terminal 时,使用它 18 UNKNOWN(0, "未知"), // 目的:在无法解析到 terminal 时,使用它
19 WECHAT_MINI_PROGRAM(10, "微信小程序"), 19 WECHAT_MINI_PROGRAM(10, "微信小程序"),
@@ -22,7 +22,7 @@ public enum TerminalEnum implements IntArrayValuable { @@ -22,7 +22,7 @@ public enum TerminalEnum implements IntArrayValuable {
22 APP(31, "手机 App"), 22 APP(31, "手机 App"),
23 ; 23 ;
24 24
25 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TerminalEnum::getTerminal).toArray(); 25 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(TerminalEnum::getTerminal).toArray(Integer[]::new);
26 26
27 /** 27 /**
28 * 终端 28 * 终端
@@ -34,7 +34,7 @@ public enum TerminalEnum implements IntArrayValuable { @@ -34,7 +34,7 @@ public enum TerminalEnum implements IntArrayValuable {
34 private final String name; 34 private final String name;
35 35
36 @Override 36 @Override
37 - public int[] array() { 37 + public Integer[] array() {
38 return ARRAYS; 38 return ARRAYS;
39 } 39 }
40 } 40 }
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/UserTypeEnum.java
1 package cn.iocoder.yudao.framework.common.enums; 1 package cn.iocoder.yudao.framework.common.enums;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -12,12 +12,12 @@ import java.util.Arrays; @@ -12,12 +12,12 @@ import java.util.Arrays;
12 */ 12 */
13 @AllArgsConstructor 13 @AllArgsConstructor
14 @Getter 14 @Getter
15 -public enum UserTypeEnum implements IntArrayValuable { 15 +public enum UserTypeEnum implements ArrayValuable<Integer> {
16 16
17 MEMBER(1, "会员"), // 面向 c 端,普通用户 17 MEMBER(1, "会员"), // 面向 c 端,普通用户
18 ADMIN(2, "管理员"); // 面向 b 端,管理后台 18 ADMIN(2, "管理员"); // 面向 b 端,管理后台
19 19
20 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(UserTypeEnum::getValue).toArray(); 20 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(UserTypeEnum::getValue).toArray(Integer[]::new);
21 21
22 /** 22 /**
23 * 类型 23 * 类型
@@ -33,7 +33,7 @@ public enum UserTypeEnum implements IntArrayValuable { @@ -33,7 +33,7 @@ public enum UserTypeEnum implements IntArrayValuable {
33 } 33 }
34 34
35 @Override 35 @Override
36 - public int[] array() { 36 + public Integer[] array() {
37 return ARRAYS; 37 return ARRAYS;
38 } 38 }
39 } 39 }
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnum.java
1 package cn.iocoder.yudao.framework.common.validation; 1 package cn.iocoder.yudao.framework.common.validation;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable;  
4 - 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import jakarta.validation.Constraint; 4 import jakarta.validation.Constraint;
6 import jakarta.validation.Payload; 5 import jakarta.validation.Payload;
  6 +
7 import java.lang.annotation.*; 7 import java.lang.annotation.*;
8 8
9 @Target({ 9 @Target({
@@ -22,9 +22,9 @@ import java.lang.annotation.*; @@ -22,9 +22,9 @@ import java.lang.annotation.*;
22 public @interface InEnum { 22 public @interface InEnum {
23 23
24 /** 24 /**
25 - * @return 实现 EnumValuable 接口的 25 + * @return 实现 ArrayValuable 接口的类
26 */ 26 */
27 - Class<? extends IntArrayValuable> value(); 27 + Class<? extends ArrayValuable<?>> value();
28 28
29 String message() default "必须在指定范围 {value}"; 29 String message() default "必须在指定范围 {value}";
30 30
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnumCollectionValidator.java
1 package cn.iocoder.yudao.framework.common.validation; 1 package cn.iocoder.yudao.framework.common.validation;
2 2
3 import cn.hutool.core.collection.CollUtil; 3 import cn.hutool.core.collection.CollUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable;  
5 - 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
6 import jakarta.validation.ConstraintValidator; 5 import jakarta.validation.ConstraintValidator;
7 import jakarta.validation.ConstraintValidatorContext; 6 import jakarta.validation.ConstraintValidatorContext;
  7 +
8 import java.util.Arrays; 8 import java.util.Arrays;
9 import java.util.Collection; 9 import java.util.Collection;
10 import java.util.Collections; 10 import java.util.Collections;
11 import java.util.List; 11 import java.util.List;
12 -import java.util.stream.Collectors;  
13 12
14 -public class InEnumCollectionValidator implements ConstraintValidator<InEnum, Collection<Integer>> { 13 +public class InEnumCollectionValidator implements ConstraintValidator<InEnum, Collection<?>> {
15 14
16 - private List<Integer> values; 15 + private List<?> values;
17 16
18 @Override 17 @Override
19 public void initialize(InEnum annotation) { 18 public void initialize(InEnum annotation) {
20 - IntArrayValuable[] values = annotation.value().getEnumConstants(); 19 + ArrayValuable<?>[] values = annotation.value().getEnumConstants();
21 if (values.length == 0) { 20 if (values.length == 0) {
22 this.values = Collections.emptyList(); 21 this.values = Collections.emptyList();
23 } else { 22 } else {
24 - this.values = Arrays.stream(values[0].array()).boxed().collect(Collectors.toList()); 23 + this.values = Arrays.asList(values[0].array());
25 } 24 }
26 } 25 }
27 26
28 @Override 27 @Override
29 - public boolean isValid(Collection<Integer> list, ConstraintValidatorContext context) { 28 + public boolean isValid(Collection<?> list, ConstraintValidatorContext context) {
  29 + if (list == null) {
  30 + return true;
  31 + }
30 // 校验通过 32 // 校验通过
31 if (CollUtil.containsAll(values, list)) { 33 if (CollUtil.containsAll(values, list)) {
32 return true; 34 return true;
33 } 35 }
34 - // 校验不通过,自定义提示语句(因为,注解上的 value 是枚举类,无法获得枚举类的实际值) 36 + // 校验不通过,自定义提示语句
35 context.disableDefaultConstraintViolation(); // 禁用默认的 message 的值 37 context.disableDefaultConstraintViolation(); // 禁用默认的 message 的值
36 context.buildConstraintViolationWithTemplate(context.getDefaultConstraintMessageTemplate() 38 context.buildConstraintViolationWithTemplate(context.getDefaultConstraintMessageTemplate()
37 .replaceAll("\\{value}", CollUtil.join(list, ","))).addConstraintViolation(); // 重新添加错误提示语句 39 .replaceAll("\\{value}", CollUtil.join(list, ","))).addConstraintViolation(); // 重新添加错误提示语句
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnumValidator.java
1 package cn.iocoder.yudao.framework.common.validation; 1 package cn.iocoder.yudao.framework.common.validation;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable;  
4 - 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import jakarta.validation.ConstraintValidator; 4 import jakarta.validation.ConstraintValidator;
6 import jakarta.validation.ConstraintValidatorContext; 5 import jakarta.validation.ConstraintValidatorContext;
  6 +
7 import java.util.Arrays; 7 import java.util.Arrays;
8 import java.util.Collections; 8 import java.util.Collections;
9 import java.util.List; 9 import java.util.List;
10 -import java.util.stream.Collectors;  
11 10
12 -public class InEnumValidator implements ConstraintValidator<InEnum, Integer> { 11 +public class InEnumValidator implements ConstraintValidator<InEnum, Object> {
13 12
14 - private List<Integer> values; 13 + private List<?> values;
15 14
16 @Override 15 @Override
17 public void initialize(InEnum annotation) { 16 public void initialize(InEnum annotation) {
18 - IntArrayValuable[] values = annotation.value().getEnumConstants(); 17 + ArrayValuable<?>[] values = annotation.value().getEnumConstants();
19 if (values.length == 0) { 18 if (values.length == 0) {
20 this.values = Collections.emptyList(); 19 this.values = Collections.emptyList();
21 } else { 20 } else {
22 - this.values = Arrays.stream(values[0].array()).boxed().collect(Collectors.toList()); 21 + this.values = Arrays.asList(values[0].array());
23 } 22 }
24 } 23 }
25 24
26 @Override 25 @Override
27 - public boolean isValid(Integer value, ConstraintValidatorContext context) { 26 + public boolean isValid(Object value, ConstraintValidatorContext context) {
28 // 为空时,默认不校验,即认为通过 27 // 为空时,默认不校验,即认为通过
29 if (value == null) { 28 if (value == null) {
30 return true; 29 return true;
@@ -33,7 +32,7 @@ public class InEnumValidator implements ConstraintValidator&lt;InEnum, Integer&gt; { @@ -33,7 +32,7 @@ public class InEnumValidator implements ConstraintValidator&lt;InEnum, Integer&gt; {
33 if (values.contains(value)) { 32 if (values.contains(value)) {
34 return true; 33 return true;
35 } 34 }
36 - // 校验不通过,自定义提示语句(因为,注解上的 value 是枚举类,无法获得枚举类的实际值) 35 + // 校验不通过,自定义提示语句
37 context.disableDefaultConstraintViolation(); // 禁用默认的 message 的值 36 context.disableDefaultConstraintViolation(); // 禁用默认的 message 的值
38 context.buildConstraintViolationWithTemplate(context.getDefaultConstraintMessageTemplate() 37 context.buildConstraintViolationWithTemplate(context.getDefaultConstraintMessageTemplate()
39 .replaceAll("\\{value}", values.toString())).addConstraintViolation(); // 重新添加错误提示语句 38 .replaceAll("\\{value}", values.toString())).addConstraintViolation(); // 重新添加错误提示语句
yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/java/cn/iocoder/yudao/framework/ip/core/enums/AreaTypeEnum.java
1 package cn.iocoder.yudao.framework.ip.core.enums; 1 package cn.iocoder.yudao.framework.ip.core.enums;
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,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum AreaTypeEnum implements IntArrayValuable { 16 +public enum AreaTypeEnum implements ArrayValuable<Integer> {
17 17
18 COUNTRY(1, "国家"), 18 COUNTRY(1, "国家"),
19 PROVINCE(2, "省份"), 19 PROVINCE(2, "省份"),
@@ -21,7 +21,7 @@ public enum AreaTypeEnum implements IntArrayValuable { @@ -21,7 +21,7 @@ public enum AreaTypeEnum implements IntArrayValuable {
21 DISTRICT(4, "地区"), // 县、镇、区等 21 DISTRICT(4, "地区"), // 县、镇、区等
22 ; 22 ;
23 23
24 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AreaTypeEnum::getType).toArray(); 24 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AreaTypeEnum::getType).toArray(Integer[]::new);
25 25
26 /** 26 /**
27 * 类型 27 * 类型
@@ -33,7 +33,7 @@ public enum AreaTypeEnum implements IntArrayValuable { @@ -33,7 +33,7 @@ public enum AreaTypeEnum implements IntArrayValuable {
33 private final String name; 33 private final String name;
34 34
35 @Override 35 @Override
36 - public int[] array() { 36 + public Integer[] array() {
37 return ARRAYS; 37 return ARRAYS;
38 } 38 }
39 } 39 }
yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/knowledge/AiKnowledgeDocumentStatusEnum.java
1 package cn.iocoder.yudao.module.ai.enums.knowledge; 1 package cn.iocoder.yudao.module.ai.enums.knowledge;
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,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum AiKnowledgeDocumentStatusEnum implements IntArrayValuable { 16 +public enum AiKnowledgeDocumentStatusEnum implements ArrayValuable<Integer> {
17 17
18 IN_PROGRESS(10, "索引中"), 18 IN_PROGRESS(10, "索引中"),
19 SUCCESS(20, "可用"), 19 SUCCESS(20, "可用"),
@@ -29,10 +29,10 @@ public enum AiKnowledgeDocumentStatusEnum implements IntArrayValuable { @@ -29,10 +29,10 @@ public enum AiKnowledgeDocumentStatusEnum implements IntArrayValuable {
29 */ 29 */
30 private final String name; 30 private final String name;
31 31
32 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AiKnowledgeDocumentStatusEnum::getStatus).toArray(); 32 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AiKnowledgeDocumentStatusEnum::getStatus).toArray(Integer[]::new);
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/music/AiMusicGenerateModeEnum.java
1 package cn.iocoder.yudao.module.ai.enums.music; 1 package cn.iocoder.yudao.module.ai.enums.music;
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,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum AiMusicGenerateModeEnum implements IntArrayValuable { 16 +public enum AiMusicGenerateModeEnum implements ArrayValuable<Integer> {
17 17
18 DESCRIPTION(1, "描述模式"), 18 DESCRIPTION(1, "描述模式"),
19 LYRIC(2, "歌词模式"); 19 LYRIC(2, "歌词模式");
@@ -27,10 +27,10 @@ public enum AiMusicGenerateModeEnum implements IntArrayValuable { @@ -27,10 +27,10 @@ public enum AiMusicGenerateModeEnum implements IntArrayValuable {
27 */ 27 */
28 private final String name; 28 private final String name;
29 29
30 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AiMusicGenerateModeEnum::getMode).toArray(); 30 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AiMusicGenerateModeEnum::getMode).toArray(Integer[]::new);
31 31
32 @Override 32 @Override
33 - public int[] array() { 33 + public Integer[] array() {
34 return ARRAYS; 34 return ARRAYS;
35 } 35 }
36 36
yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/music/AiMusicStatusEnum.java
1 package cn.iocoder.yudao.module.ai.enums.music; 1 package cn.iocoder.yudao.module.ai.enums.music;
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,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum AiMusicStatusEnum implements IntArrayValuable { 16 +public enum AiMusicStatusEnum implements ArrayValuable<Integer> {
17 17
18 IN_PROGRESS(10, "进行中"), 18 IN_PROGRESS(10, "进行中"),
19 SUCCESS(20, "已完成"), 19 SUCCESS(20, "已完成"),
@@ -29,10 +29,10 @@ public enum AiMusicStatusEnum implements IntArrayValuable { @@ -29,10 +29,10 @@ public enum AiMusicStatusEnum implements IntArrayValuable {
29 */ 29 */
30 private final String name; 30 private final String name;
31 31
32 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AiMusicStatusEnum::getStatus).toArray(); 32 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AiMusicStatusEnum::getStatus).toArray(Integer[]::new);
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/write/AiWriteTypeEnum.java
1 package cn.iocoder.yudao.module.ai.enums.write; 1 package cn.iocoder.yudao.module.ai.enums.write;
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,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum AiWriteTypeEnum implements IntArrayValuable { 16 +public enum AiWriteTypeEnum implements ArrayValuable<Integer> {
17 17
18 WRITING(1, "撰写", "请撰写一篇关于 [{}] 的文章。文章的内容格式:{},语气:{},语言:{},长度:{}。请确保涵盖主要内容,不需要除了正文内容外的其他回复,如标题、额外的解释或道歉。"), 18 WRITING(1, "撰写", "请撰写一篇关于 [{}] 的文章。文章的内容格式:{},语气:{},语言:{},长度:{}。请确保涵盖主要内容,不需要除了正文内容外的其他回复,如标题、额外的解释或道歉。"),
19 REPLY(2, "回复", "请针对如下内容:[{}] 做个回复。回复内容参考:[{}], 回复格式:{},语气:{},语言:{},长度:{}。不需要除了正文内容外的其他回复,如标题、开头、额外的解释或道歉。"); 19 REPLY(2, "回复", "请针对如下内容:[{}] 做个回复。回复内容参考:[{}], 回复格式:{},语气:{},语言:{},长度:{}。不需要除了正文内容外的其他回复,如标题、开头、额外的解释或道歉。");
@@ -32,10 +32,10 @@ public enum AiWriteTypeEnum implements IntArrayValuable { @@ -32,10 +32,10 @@ public enum AiWriteTypeEnum implements IntArrayValuable {
32 */ 32 */
33 private final String prompt; 33 private final String prompt;
34 34
35 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AiWriteTypeEnum::getType).toArray(); 35 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AiWriteTypeEnum::getType).toArray(Integer[]::new);
36 36
37 @Override 37 @Override
38 - public int[] array() { 38 + public Integer[] array() {
39 return ARRAYS; 39 return ARRAYS;
40 } 40 }
41 41
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmModelFormTypeEnum.java
1 package cn.iocoder.yudao.module.bpm.enums.definition; 1 package cn.iocoder.yudao.module.bpm.enums.definition;
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,19 +13,19 @@ import java.util.Arrays; @@ -13,19 +13,19 @@ import java.util.Arrays;
13 */ 13 */
14 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum BpmModelFormTypeEnum implements IntArrayValuable { 16 +public enum BpmModelFormTypeEnum implements ArrayValuable<Integer> {
17 17
18 NORMAL(10, "流程表单"), // 对应 BpmFormDO 18 NORMAL(10, "流程表单"), // 对应 BpmFormDO
19 CUSTOM(20, "业务表单") // 业务自己定义的表单,自己进行数据的存储 19 CUSTOM(20, "业务表单") // 业务自己定义的表单,自己进行数据的存储
20 ; 20 ;
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmModelFormTypeEnum::getType).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmModelFormTypeEnum::getType).toArray(Integer[]::new);
23 23
24 private final Integer type; 24 private final Integer type;
25 private final String name; 25 private final String name;
26 26
27 @Override 27 @Override
28 - public int[] array() { 28 + public Integer[] array() {
29 return ARRAYS; 29 return ARRAYS;
30 } 30 }
31 31
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmModelTypeEnum.java
1 package cn.iocoder.yudao.module.bpm.enums.definition; 1 package cn.iocoder.yudao.module.bpm.enums.definition;
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,18 +13,18 @@ import java.util.Arrays; @@ -13,18 +13,18 @@ import java.util.Arrays;
13 */ 13 */
14 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum BpmModelTypeEnum implements IntArrayValuable { 16 +public enum BpmModelTypeEnum implements ArrayValuable<Integer> {
17 17
18 BPMN(10, "BPMN 设计器"), // https://bpmn.io/toolkit/bpmn-js/ 18 BPMN(10, "BPMN 设计器"), // https://bpmn.io/toolkit/bpmn-js/
19 SIMPLE(20, "SIMPLE 设计器"); // 参考钉钉、飞书工作流的设计器 19 SIMPLE(20, "SIMPLE 设计器"); // 参考钉钉、飞书工作流的设计器
20 20
21 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmModelTypeEnum::getType).toArray(); 21 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmModelTypeEnum::getType).toArray(Integer[]::new);
22 22
23 private final Integer type; 23 private final Integer type;
24 private final String name; 24 private final String name;
25 25
26 @Override 26 @Override
27 - public int[] array() { 27 + public Integer[] array() {
28 return ARRAYS; 28 return ARRAYS;
29 } 29 }
30 30
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModeConditionType.java
1 package cn.iocoder.yudao.module.bpm.enums.definition; 1 package cn.iocoder.yudao.module.bpm.enums.definition;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,12 +14,12 @@ import java.util.Arrays; @@ -14,12 +14,12 @@ import java.util.Arrays;
14 */ 14 */
15 @Getter 15 @Getter
16 @AllArgsConstructor 16 @AllArgsConstructor
17 -public enum BpmSimpleModeConditionType implements IntArrayValuable { 17 +public enum BpmSimpleModeConditionType implements ArrayValuable<Integer> {
18 18
19 EXPRESSION(1, "条件表达式"), 19 EXPRESSION(1, "条件表达式"),
20 RULE(2, "条件规则"); 20 RULE(2, "条件规则");
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmSimpleModeConditionType::getType).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmSimpleModeConditionType::getType).toArray(Integer[]::new);
23 23
24 private final Integer type; 24 private final Integer type;
25 25
@@ -30,7 +30,7 @@ public enum BpmSimpleModeConditionType implements IntArrayValuable { @@ -30,7 +30,7 @@ public enum BpmSimpleModeConditionType implements IntArrayValuable {
30 } 30 }
31 31
32 @Override 32 @Override
33 - public int[] array() { 33 + public Integer[] array() {
34 return ARRAYS; 34 return ARRAYS;
35 } 35 }
36 } 36 }
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java
1 package cn.iocoder.yudao.module.bpm.enums.definition; 1 package cn.iocoder.yudao.module.bpm.enums.definition;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -15,7 +15,7 @@ import java.util.Objects; @@ -15,7 +15,7 @@ import java.util.Objects;
15 */ 15 */
16 @Getter 16 @Getter
17 @AllArgsConstructor 17 @AllArgsConstructor
18 -public enum BpmSimpleModelNodeType implements IntArrayValuable { 18 +public enum BpmSimpleModelNodeType implements ArrayValuable<Integer> {
19 19
20 // 0 ~ 1 开始和结束 20 // 0 ~ 1 开始和结束
21 START_NODE(0, "startEvent", "开始节点"), 21 START_NODE(0, "startEvent", "开始节点"),
@@ -35,7 +35,7 @@ public enum BpmSimpleModelNodeType implements IntArrayValuable { @@ -35,7 +35,7 @@ public enum BpmSimpleModelNodeType implements IntArrayValuable {
35 // TODO @芋艿。 感觉还是分开好理解一点,也好处理一点。前端结构中把聚合节点显示并传过来。 35 // TODO @芋艿。 感觉还是分开好理解一点,也好处理一点。前端结构中把聚合节点显示并传过来。
36 ; 36 ;
37 37
38 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmSimpleModelNodeType::getType).toArray(); 38 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmSimpleModelNodeType::getType).toArray(Integer[]::new);
39 39
40 public static final String BPMN_USER_TASK_TYPE = "userTask"; 40 public static final String BPMN_USER_TASK_TYPE = "userTask";
41 41
@@ -69,7 +69,7 @@ public enum BpmSimpleModelNodeType implements IntArrayValuable { @@ -69,7 +69,7 @@ public enum BpmSimpleModelNodeType implements IntArrayValuable {
69 } 69 }
70 70
71 @Override 71 @Override
72 - public int[] array() { 72 + public Integer[] array() {
73 return ARRAYS; 73 return ARRAYS;
74 } 74 }
75 75
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskApproveMethodEnum.java
1 package cn.iocoder.yudao.module.bpm.enums.definition; 1 package cn.iocoder.yudao.module.bpm.enums.definition;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,7 +14,7 @@ import java.util.Arrays; @@ -14,7 +14,7 @@ import java.util.Arrays;
14 */ 14 */
15 @Getter 15 @Getter
16 @AllArgsConstructor 16 @AllArgsConstructor
17 -public enum BpmUserTaskApproveMethodEnum implements IntArrayValuable { 17 +public enum BpmUserTaskApproveMethodEnum implements ArrayValuable<Integer> {
18 18
19 RANDOM(1, "随机挑选一人审批"), 19 RANDOM(1, "随机挑选一人审批"),
20 RATIO(2, "多人会签(按通过比例)"), // 会签(按通过比例) 20 RATIO(2, "多人会签(按通过比例)"), // 会签(按通过比例)
@@ -31,14 +31,14 @@ public enum BpmUserTaskApproveMethodEnum implements IntArrayValuable { @@ -31,14 +31,14 @@ public enum BpmUserTaskApproveMethodEnum implements IntArrayValuable {
31 */ 31 */
32 private final String name; 32 private final String name;
33 33
34 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskApproveMethodEnum::getMethod).toArray(); 34 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskApproveMethodEnum::getMethod).toArray(Integer[]::new);
35 35
36 public static BpmUserTaskApproveMethodEnum valueOf(Integer method) { 36 public static BpmUserTaskApproveMethodEnum valueOf(Integer method) {
37 return ArrayUtil.firstMatch(item -> item.getMethod().equals(method), values()); 37 return ArrayUtil.firstMatch(item -> item.getMethod().equals(method), values());
38 } 38 }
39 39
40 @Override 40 @Override
41 - public int[] array() { 41 + public Integer[] array() {
42 return ARRAYS; 42 return ARRAYS;
43 } 43 }
44 } 44 }
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskApproveTypeEnum.java
1 package cn.iocoder.yudao.module.bpm.enums.definition; 1 package cn.iocoder.yudao.module.bpm.enums.definition;
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,18 +13,18 @@ import java.util.Arrays; @@ -13,18 +13,18 @@ import java.util.Arrays;
13 */ 13 */
14 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum BpmUserTaskApproveTypeEnum implements IntArrayValuable { 16 +public enum BpmUserTaskApproveTypeEnum implements ArrayValuable<Integer> {
17 17
18 USER(1), // 人工审批 18 USER(1), // 人工审批
19 AUTO_APPROVE(2), // 自动通过 19 AUTO_APPROVE(2), // 自动通过
20 AUTO_REJECT(3); // 自动拒绝 20 AUTO_REJECT(3); // 自动拒绝
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskApproveTypeEnum::getType).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskApproveTypeEnum::getType).toArray(Integer[]::new);
23 23
24 private final Integer type; 24 private final Integer type;
25 25
26 @Override 26 @Override
27 - public int[] array() { 27 + public Integer[] array() {
28 return ARRAYS; 28 return ARRAYS;
29 } 29 }
30 30
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskAssignEmptyHandlerTypeEnum.java
1 package cn.iocoder.yudao.module.bpm.enums.definition; 1 package cn.iocoder.yudao.module.bpm.enums.definition;
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 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @RequiredArgsConstructor 14 @RequiredArgsConstructor
15 @Getter 15 @Getter
16 -public enum BpmUserTaskAssignEmptyHandlerTypeEnum implements IntArrayValuable { 16 +public enum BpmUserTaskAssignEmptyHandlerTypeEnum implements ArrayValuable<Integer> {
17 17
18 APPROVE(1), // 自动通过 18 APPROVE(1), // 自动通过
19 REJECT(2), // 自动拒绝 19 REJECT(2), // 自动拒绝
@@ -21,12 +21,12 @@ public enum BpmUserTaskAssignEmptyHandlerTypeEnum implements IntArrayValuable { @@ -21,12 +21,12 @@ public enum BpmUserTaskAssignEmptyHandlerTypeEnum implements IntArrayValuable {
21 ASSIGN_ADMIN(4), // 转交给流程管理员 21 ASSIGN_ADMIN(4), // 转交给流程管理员
22 ; 22 ;
23 23
24 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskAssignEmptyHandlerTypeEnum::getType).toArray(); 24 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskAssignEmptyHandlerTypeEnum::getType).toArray(Integer[]::new);
25 25
26 private final Integer type; 26 private final Integer type;
27 27
28 @Override 28 @Override
29 - public int[] array() { 29 + public Integer[] array() {
30 return ARRAYS; 30 return ARRAYS;
31 } 31 }
32 32
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskAssignStartUserHandlerTypeEnum.java
1 package cn.iocoder.yudao.module.bpm.enums.definition; 1 package cn.iocoder.yudao.module.bpm.enums.definition;
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 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -13,18 +13,18 @@ import java.util.Arrays; @@ -13,18 +13,18 @@ import java.util.Arrays;
13 */ 13 */
14 @RequiredArgsConstructor 14 @RequiredArgsConstructor
15 @Getter 15 @Getter
16 -public enum BpmUserTaskAssignStartUserHandlerTypeEnum implements IntArrayValuable { 16 +public enum BpmUserTaskAssignStartUserHandlerTypeEnum implements ArrayValuable<Integer> {
17 17
18 START_USER_AUDIT(1), // 由发起人对自己审批 18 START_USER_AUDIT(1), // 由发起人对自己审批
19 SKIP(2), // 自动跳过【参考飞书】:1)如果当前节点还有其他审批人,则交由其他审批人进行审批;2)如果当前节点没有其他审批人,则该节点自动通过 19 SKIP(2), // 自动跳过【参考飞书】:1)如果当前节点还有其他审批人,则交由其他审批人进行审批;2)如果当前节点没有其他审批人,则该节点自动通过
20 TRANSFER_DEPT_LEADER(3); // 转交给部门负责人审批【参考飞书】:若部门负责人为空,则自动通过 20 TRANSFER_DEPT_LEADER(3); // 转交给部门负责人审批【参考飞书】:若部门负责人为空,则自动通过
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskAssignStartUserHandlerTypeEnum::getType).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskAssignStartUserHandlerTypeEnum::getType).toArray(Integer[]::new);
23 23
24 private final Integer type; 24 private final Integer type;
25 25
26 @Override 26 @Override
27 - public int[] array() { 27 + public Integer[] array() {
28 return ARRAYS; 28 return ARRAYS;
29 } 29 }
30 30
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskRejectHandlerType.java
1 package cn.iocoder.yudao.module.bpm.enums.definition; 1 package cn.iocoder.yudao.module.bpm.enums.definition;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,7 +14,7 @@ import java.util.Arrays; @@ -14,7 +14,7 @@ import java.util.Arrays;
14 */ 14 */
15 @Getter 15 @Getter
16 @AllArgsConstructor 16 @AllArgsConstructor
17 -public enum BpmUserTaskRejectHandlerType implements IntArrayValuable { 17 +public enum BpmUserTaskRejectHandlerType implements ArrayValuable<Integer> {
18 18
19 FINISH_PROCESS_INSTANCE(1, "终止流程"), 19 FINISH_PROCESS_INSTANCE(1, "终止流程"),
20 RETURN_USER_TASK(2, "驳回到指定任务节点"); 20 RETURN_USER_TASK(2, "驳回到指定任务节点");
@@ -22,14 +22,14 @@ public enum BpmUserTaskRejectHandlerType implements IntArrayValuable { @@ -22,14 +22,14 @@ public enum BpmUserTaskRejectHandlerType implements IntArrayValuable {
22 private final Integer type; 22 private final Integer type;
23 private final String name; 23 private final String name;
24 24
25 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskRejectHandlerType::getType).toArray(); 25 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskRejectHandlerType::getType).toArray(Integer[]::new);
26 26
27 public static BpmUserTaskRejectHandlerType typeOf(Integer type) { 27 public static BpmUserTaskRejectHandlerType typeOf(Integer type) {
28 return ArrayUtil.firstMatch(item -> item.getType().equals(type), values()); 28 return ArrayUtil.firstMatch(item -> item.getType().equals(type), values());
29 } 29 }
30 30
31 @Override 31 @Override
32 - public int[] array() { 32 + public Integer[] array() {
33 return ARRAYS; 33 return ARRAYS;
34 } 34 }
35 } 35 }
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskTimeoutHandlerTypeEnum.java
1 package cn.iocoder.yudao.module.bpm.enums.definition; 1 package cn.iocoder.yudao.module.bpm.enums.definition;
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,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum BpmUserTaskTimeoutHandlerTypeEnum implements IntArrayValuable { 16 +public enum BpmUserTaskTimeoutHandlerTypeEnum implements ArrayValuable<Integer> {
17 17
18 REMINDER(1,"自动提醒"), 18 REMINDER(1,"自动提醒"),
19 APPROVE(2, "自动同意"), 19 APPROVE(2, "自动同意"),
@@ -22,10 +22,10 @@ public enum BpmUserTaskTimeoutHandlerTypeEnum implements IntArrayValuable { @@ -22,10 +22,10 @@ public enum BpmUserTaskTimeoutHandlerTypeEnum implements IntArrayValuable {
22 private final Integer type; 22 private final Integer type;
23 private final String name; 23 private final String name;
24 24
25 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskTimeoutHandlerTypeEnum::getType).toArray(); 25 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskTimeoutHandlerTypeEnum::getType).toArray(Integer[]::new);
26 26
27 @Override 27 @Override
28 - public int[] array() { 28 + public Integer[] array() {
29 return ARRAYS; 29 return ARRAYS;
30 } 30 }
31 31
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusEnum.java
1 package cn.iocoder.yudao.module.bpm.enums.task; 1 package cn.iocoder.yudao.module.bpm.enums.task;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; 4 import cn.iocoder.yudao.framework.common.util.object.ObjectUtils;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
@@ -14,7 +14,7 @@ import java.util.Arrays; @@ -14,7 +14,7 @@ import java.util.Arrays;
14 */ 14 */
15 @Getter 15 @Getter
16 @AllArgsConstructor 16 @AllArgsConstructor
17 -public enum BpmProcessInstanceStatusEnum implements IntArrayValuable { 17 +public enum BpmProcessInstanceStatusEnum implements ArrayValuable<Integer> {
18 18
19 NOT_START(-1, "未开始"), 19 NOT_START(-1, "未开始"),
20 RUNNING(1, "审批中"), 20 RUNNING(1, "审批中"),
@@ -22,7 +22,7 @@ public enum BpmProcessInstanceStatusEnum implements IntArrayValuable { @@ -22,7 +22,7 @@ public enum BpmProcessInstanceStatusEnum implements IntArrayValuable {
22 REJECT(3, "审批不通过"), 22 REJECT(3, "审批不通过"),
23 CANCEL(4, "已取消"); 23 CANCEL(4, "已取消");
24 24
25 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmProcessInstanceStatusEnum::getStatus).toArray(); 25 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmProcessInstanceStatusEnum::getStatus).toArray(Integer[]::new);
26 26
27 /** 27 /**
28 * 状态 28 * 状态
@@ -34,7 +34,7 @@ public enum BpmProcessInstanceStatusEnum implements IntArrayValuable { @@ -34,7 +34,7 @@ public enum BpmProcessInstanceStatusEnum implements IntArrayValuable {
34 private final String desc; 34 private final String desc;
35 35
36 @Override 36 @Override
37 - public int[] array() { 37 + public Integer[] array() {
38 return ARRAYS; 38 return ARRAYS;
39 } 39 }
40 40
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmTaskCandidateStrategyEnum.java
1 package cn.iocoder.yudao.module.bpm.framework.flowable.core.enums; 1 package cn.iocoder.yudao.module.bpm.framework.flowable.core.enums;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -16,7 +16,7 @@ import java.util.Arrays; @@ -16,7 +16,7 @@ import java.util.Arrays;
16 */ 16 */
17 @Getter 17 @Getter
18 @AllArgsConstructor 18 @AllArgsConstructor
19 -public enum BpmTaskCandidateStrategyEnum implements IntArrayValuable { 19 +public enum BpmTaskCandidateStrategyEnum implements ArrayValuable<Integer> {
20 20
21 ROLE(10, "角色"), 21 ROLE(10, "角色"),
22 DEPT_MEMBER(20, "部门的成员"), // 包括负责人 22 DEPT_MEMBER(20, "部门的成员"), // 包括负责人
@@ -33,7 +33,7 @@ public enum BpmTaskCandidateStrategyEnum implements IntArrayValuable { @@ -33,7 +33,7 @@ public enum BpmTaskCandidateStrategyEnum implements IntArrayValuable {
33 ASSIGN_EMPTY(1, "审批人为空"), 33 ASSIGN_EMPTY(1, "审批人为空"),
34 ; 34 ;
35 35
36 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmTaskCandidateStrategyEnum::getStrategy).toArray(); 36 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmTaskCandidateStrategyEnum::getStrategy).toArray(Integer[]::new);
37 37
38 /** 38 /**
39 * 类型 39 * 类型
@@ -49,7 +49,7 @@ public enum BpmTaskCandidateStrategyEnum implements IntArrayValuable { @@ -49,7 +49,7 @@ public enum BpmTaskCandidateStrategyEnum implements IntArrayValuable {
49 } 49 }
50 50
51 @Override 51 @Override
52 - public int[] array() { 52 + public Integer[] array() {
53 return ARRAYS; 53 return ARRAYS;
54 } 54 }
55 55
yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/business/CrmBusinessEndStatusEnum.java
1 package cn.iocoder.yudao.module.crm.enums.business; 1 package cn.iocoder.yudao.module.crm.enums.business;
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 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -13,13 +13,13 @@ import java.util.Arrays; @@ -13,13 +13,13 @@ import java.util.Arrays;
13 */ 13 */
14 @RequiredArgsConstructor 14 @RequiredArgsConstructor
15 @Getter 15 @Getter
16 -public enum CrmBusinessEndStatusEnum implements IntArrayValuable { 16 +public enum CrmBusinessEndStatusEnum implements ArrayValuable<Integer> {
17 17
18 WIN(1, "赢单"), 18 WIN(1, "赢单"),
19 LOSE(2, "输单"), 19 LOSE(2, "输单"),
20 INVALID(3, "无效"); 20 INVALID(3, "无效");
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmBusinessEndStatusEnum::getStatus).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmBusinessEndStatusEnum::getStatus).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 场景类型 25 * 场景类型
@@ -31,7 +31,7 @@ public enum CrmBusinessEndStatusEnum implements IntArrayValuable { @@ -31,7 +31,7 @@ public enum CrmBusinessEndStatusEnum 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-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/common/CrmAuditStatusEnum.java
1 package cn.iocoder.yudao.module.crm.enums.common; 1 package cn.iocoder.yudao.module.crm.enums.common;
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 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @RequiredArgsConstructor 14 @RequiredArgsConstructor
15 @Getter 15 @Getter
16 -public enum CrmAuditStatusEnum implements IntArrayValuable { 16 +public enum CrmAuditStatusEnum implements ArrayValuable<Integer> {
17 17
18 DRAFT(0, "未提交"), 18 DRAFT(0, "未提交"),
19 PROCESS(10, "审批中"), 19 PROCESS(10, "审批中"),
@@ -24,10 +24,10 @@ public enum CrmAuditStatusEnum implements IntArrayValuable { @@ -24,10 +24,10 @@ public enum CrmAuditStatusEnum implements IntArrayValuable {
24 private final Integer status; 24 private final Integer status;
25 private final String name; 25 private final String name;
26 26
27 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmAuditStatusEnum::getStatus).toArray(); 27 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmAuditStatusEnum::getStatus).toArray(Integer[]::new);
28 28
29 @Override 29 @Override
30 - public int[] array() { 30 + public Integer[] array() {
31 return ARRAYS; 31 return ARRAYS;
32 } 32 }
33 33
yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/common/CrmBizTypeEnum.java
@@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.crm.enums.common; @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.crm.enums.common;
2 2
3 import cn.hutool.core.collection.CollUtil; 3 import cn.hutool.core.collection.CollUtil;
4 import cn.hutool.core.util.ObjUtil; 4 import cn.hutool.core.util.ObjUtil;
5 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 5 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
6 import lombok.Getter; 6 import lombok.Getter;
7 import lombok.RequiredArgsConstructor; 7 import lombok.RequiredArgsConstructor;
8 8
@@ -15,7 +15,7 @@ import java.util.Arrays; @@ -15,7 +15,7 @@ import java.util.Arrays;
15 */ 15 */
16 @RequiredArgsConstructor 16 @RequiredArgsConstructor
17 @Getter 17 @Getter
18 -public enum CrmBizTypeEnum implements IntArrayValuable { 18 +public enum CrmBizTypeEnum implements ArrayValuable<Integer> {
19 19
20 CRM_CLUE(1, "线索"), 20 CRM_CLUE(1, "线索"),
21 CRM_CUSTOMER(2, "客户"), 21 CRM_CUSTOMER(2, "客户"),
@@ -27,7 +27,7 @@ public enum CrmBizTypeEnum implements IntArrayValuable { @@ -27,7 +27,7 @@ public enum CrmBizTypeEnum implements IntArrayValuable {
27 CRM_RECEIVABLE_PLAN(8, "回款计划") 27 CRM_RECEIVABLE_PLAN(8, "回款计划")
28 ; 28 ;
29 29
30 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmBizTypeEnum::getType).toArray(); 30 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmBizTypeEnum::getType).toArray(Integer[]::new);
31 31
32 /** 32 /**
33 * 类型 33 * 类型
@@ -45,7 +45,7 @@ public enum CrmBizTypeEnum implements IntArrayValuable { @@ -45,7 +45,7 @@ public enum CrmBizTypeEnum 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-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/common/CrmSceneTypeEnum.java
1 package cn.iocoder.yudao.module.crm.enums.common; 1 package cn.iocoder.yudao.module.crm.enums.common;
2 2
3 import cn.hutool.core.util.ObjUtil; 3 import cn.hutool.core.util.ObjUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,13 +14,13 @@ import java.util.Arrays; @@ -14,13 +14,13 @@ import java.util.Arrays;
14 */ 14 */
15 @Getter 15 @Getter
16 @AllArgsConstructor 16 @AllArgsConstructor
17 -public enum CrmSceneTypeEnum implements IntArrayValuable { 17 +public enum CrmSceneTypeEnum implements ArrayValuable<Integer> {
18 18
19 OWNER(1, "我负责的"), 19 OWNER(1, "我负责的"),
20 INVOLVED(2, "我参与的"), 20 INVOLVED(2, "我参与的"),
21 SUBORDINATE(3, "下属负责的"); 21 SUBORDINATE(3, "下属负责的");
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmSceneTypeEnum::getType).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmSceneTypeEnum::getType).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 场景类型 26 * 场景类型
@@ -44,7 +44,7 @@ public enum CrmSceneTypeEnum implements IntArrayValuable { @@ -44,7 +44,7 @@ public enum CrmSceneTypeEnum implements IntArrayValuable {
44 } 44 }
45 45
46 @Override 46 @Override
47 - public int[] array() { 47 + public Integer[] array() {
48 return ARRAYS; 48 return ARRAYS;
49 } 49 }
50 50
yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/customer/CrmCustomerLevelEnum.java
1 package cn.iocoder.yudao.module.crm.enums.customer; 1 package cn.iocoder.yudao.module.crm.enums.customer;
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,13 +13,13 @@ import java.util.Arrays; @@ -13,13 +13,13 @@ import java.util.Arrays;
13 */ 13 */
14 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum CrmCustomerLevelEnum implements IntArrayValuable { 16 +public enum CrmCustomerLevelEnum implements ArrayValuable<Integer> {
17 17
18 IMPORTANT(1, "A(重点客户)"), 18 IMPORTANT(1, "A(重点客户)"),
19 GENERAL(2, "B(普通客户)"), 19 GENERAL(2, "B(普通客户)"),
20 LOW_PRIORITY(3, "C(非优先客户)"); 20 LOW_PRIORITY(3, "C(非优先客户)");
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmCustomerLevelEnum::getLevel).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmCustomerLevelEnum::getLevel).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 状态 25 * 状态
@@ -31,7 +31,7 @@ public enum CrmCustomerLevelEnum implements IntArrayValuable { @@ -31,7 +31,7 @@ public enum CrmCustomerLevelEnum 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-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/customer/CrmCustomerLimitConfigTypeEnum.java
@@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.crm.enums.customer; @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.crm.enums.customer;
2 2
3 import cn.hutool.core.collection.CollUtil; 3 import cn.hutool.core.collection.CollUtil;
4 import cn.hutool.core.util.ObjUtil; 4 import cn.hutool.core.util.ObjUtil;
5 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 5 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
6 import lombok.AllArgsConstructor; 6 import lombok.AllArgsConstructor;
7 import lombok.Getter; 7 import lombok.Getter;
8 8
@@ -15,7 +15,7 @@ import java.util.Arrays; @@ -15,7 +15,7 @@ import java.util.Arrays;
15 */ 15 */
16 @Getter 16 @Getter
17 @AllArgsConstructor 17 @AllArgsConstructor
18 -public enum CrmCustomerLimitConfigTypeEnum implements IntArrayValuable { 18 +public enum CrmCustomerLimitConfigTypeEnum implements ArrayValuable<Integer> {
19 19
20 /** 20 /**
21 * 拥有客户数限制 21 * 拥有客户数限制
@@ -27,7 +27,7 @@ public enum CrmCustomerLimitConfigTypeEnum implements IntArrayValuable { @@ -27,7 +27,7 @@ public enum CrmCustomerLimitConfigTypeEnum implements IntArrayValuable {
27 CUSTOMER_LOCK_LIMIT(2, "锁定客户数限制"), 27 CUSTOMER_LOCK_LIMIT(2, "锁定客户数限制"),
28 ; 28 ;
29 29
30 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmCustomerLimitConfigTypeEnum::getType).toArray(); 30 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmCustomerLimitConfigTypeEnum::getType).toArray(Integer[]::new);
31 31
32 /** 32 /**
33 * 状态 33 * 状态
@@ -45,7 +45,7 @@ public enum CrmCustomerLimitConfigTypeEnum implements IntArrayValuable { @@ -45,7 +45,7 @@ public enum CrmCustomerLimitConfigTypeEnum 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-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/permission/CrmPermissionLevelEnum.java
@@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.crm.enums.permission; @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.crm.enums.permission;
2 2
3 import cn.hutool.core.collection.CollUtil; 3 import cn.hutool.core.collection.CollUtil;
4 import cn.hutool.core.util.ObjUtil; 4 import cn.hutool.core.util.ObjUtil;
5 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 5 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
6 import lombok.AllArgsConstructor; 6 import lombok.AllArgsConstructor;
7 import lombok.Getter; 7 import lombok.Getter;
8 8
@@ -17,13 +17,13 @@ import java.util.Arrays; @@ -17,13 +17,13 @@ import java.util.Arrays;
17 */ 17 */
18 @Getter 18 @Getter
19 @AllArgsConstructor 19 @AllArgsConstructor
20 -public enum CrmPermissionLevelEnum implements IntArrayValuable { 20 +public enum CrmPermissionLevelEnum implements ArrayValuable<Integer> {
21 21
22 OWNER(1, "负责人"), 22 OWNER(1, "负责人"),
23 READ(2, "只读"), 23 READ(2, "只读"),
24 WRITE(3, "读写"); 24 WRITE(3, "读写");
25 25
26 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmPermissionLevelEnum::getLevel).toArray(); 26 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmPermissionLevelEnum::getLevel).toArray(Integer[]::new);
27 27
28 /** 28 /**
29 * 级别 29 * 级别
@@ -35,7 +35,7 @@ public enum CrmPermissionLevelEnum implements IntArrayValuable { @@ -35,7 +35,7 @@ public enum CrmPermissionLevelEnum implements IntArrayValuable {
35 private final String name; 35 private final String name;
36 36
37 @Override 37 @Override
38 - public int[] array() { 38 + public Integer[] array() {
39 return ARRAYS; 39 return ARRAYS;
40 } 40 }
41 41
yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/product/CrmProductStatusEnum.java
1 package cn.iocoder.yudao.module.crm.enums.product; 1 package cn.iocoder.yudao.module.crm.enums.product;
2 2
3 import cn.hutool.core.util.ObjUtil; 3 import cn.hutool.core.util.ObjUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -15,12 +15,12 @@ import java.util.Arrays; @@ -15,12 +15,12 @@ import java.util.Arrays;
15 */ 15 */
16 @Getter 16 @Getter
17 @AllArgsConstructor 17 @AllArgsConstructor
18 -public enum CrmProductStatusEnum implements IntArrayValuable { 18 +public enum CrmProductStatusEnum implements ArrayValuable<Integer> {
19 19
20 DISABLE(0, "下架"), 20 DISABLE(0, "下架"),
21 ENABLE(1, "上架"); 21 ENABLE(1, "上架");
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmProductStatusEnum::getStatus).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmProductStatusEnum::getStatus).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 状态 26 * 状态
@@ -32,7 +32,7 @@ public enum CrmProductStatusEnum implements IntArrayValuable { @@ -32,7 +32,7 @@ public enum CrmProductStatusEnum implements IntArrayValuable {
32 private final String name; 32 private final String name;
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/receivable/CrmReceivableReturnTypeEnum.java
1 package cn.iocoder.yudao.module.crm.enums.receivable; 1 package cn.iocoder.yudao.module.crm.enums.receivable;
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,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum CrmReceivableReturnTypeEnum implements IntArrayValuable { 16 +public enum CrmReceivableReturnTypeEnum implements ArrayValuable<Integer> {
17 17
18 CHECK(1, "支票"), 18 CHECK(1, "支票"),
19 CASH(2, "现金"), 19 CASH(2, "现金"),
@@ -24,7 +24,7 @@ public enum CrmReceivableReturnTypeEnum implements IntArrayValuable { @@ -24,7 +24,7 @@ public enum CrmReceivableReturnTypeEnum implements IntArrayValuable {
24 WECHAT_PAY(7, "微信支付"), 24 WECHAT_PAY(7, "微信支付"),
25 OTHER(8, "其它"); 25 OTHER(8, "其它");
26 26
27 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmReceivableReturnTypeEnum::getType).toArray(); 27 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmReceivableReturnTypeEnum::getType).toArray(Integer[]::new);
28 28
29 /** 29 /**
30 * 类型 30 * 类型
@@ -36,7 +36,7 @@ public enum CrmReceivableReturnTypeEnum implements IntArrayValuable { @@ -36,7 +36,7 @@ public enum CrmReceivableReturnTypeEnum implements IntArrayValuable {
36 private final String name; 36 private final String name;
37 37
38 @Override 38 @Override
39 - public int[] array() { 39 + public Integer[] array() {
40 return ARRAYS; 40 return ARRAYS;
41 } 41 }
42 42
yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/ErpAuditStatus.java
1 package cn.iocoder.yudao.module.erp.enums; 1 package cn.iocoder.yudao.module.erp.enums;
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 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -15,12 +15,12 @@ import java.util.Arrays; @@ -15,12 +15,12 @@ import java.util.Arrays;
15 */ 15 */
16 @RequiredArgsConstructor 16 @RequiredArgsConstructor
17 @Getter 17 @Getter
18 -public enum ErpAuditStatus implements IntArrayValuable { 18 +public enum ErpAuditStatus implements ArrayValuable<Integer> {
19 19
20 PROCESS(10, "未审核"), // 审核中 20 PROCESS(10, "未审核"), // 审核中
21 APPROVE(20, "已审核"); // 审核通过 21 APPROVE(20, "已审核"); // 审核通过
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ErpAuditStatus::getStatus).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(ErpAuditStatus::getStatus).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 状态 26 * 状态
@@ -32,7 +32,7 @@ public enum ErpAuditStatus implements IntArrayValuable { @@ -32,7 +32,7 @@ public enum ErpAuditStatus implements IntArrayValuable {
32 private final String name; 32 private final String name;
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/common/ErpBizTypeEnum.java
1 package cn.iocoder.yudao.module.erp.enums.common; 1 package cn.iocoder.yudao.module.erp.enums.common;
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 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @RequiredArgsConstructor 14 @RequiredArgsConstructor
15 @Getter 15 @Getter
16 -public enum ErpBizTypeEnum implements IntArrayValuable { 16 +public enum ErpBizTypeEnum implements ArrayValuable<Integer> {
17 17
18 PURCHASE_ORDER(10, "采购订单"), 18 PURCHASE_ORDER(10, "采购订单"),
19 PURCHASE_IN(11, "采购入库"), 19 PURCHASE_IN(11, "采购入库"),
@@ -24,7 +24,7 @@ public enum ErpBizTypeEnum implements IntArrayValuable { @@ -24,7 +24,7 @@ public enum ErpBizTypeEnum implements IntArrayValuable {
24 SALE_RETURN(22, "销售退货"), 24 SALE_RETURN(22, "销售退货"),
25 ; 25 ;
26 26
27 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ErpBizTypeEnum::getType).toArray(); 27 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(ErpBizTypeEnum::getType).toArray(Integer[]::new);
28 28
29 /** 29 /**
30 * 类型 30 * 类型
@@ -36,7 +36,7 @@ public enum ErpBizTypeEnum implements IntArrayValuable { @@ -36,7 +36,7 @@ public enum ErpBizTypeEnum implements IntArrayValuable {
36 private final String name; 36 private final String name;
37 37
38 @Override 38 @Override
39 - public int[] array() { 39 + public Integer[] array() {
40 return ARRAYS; 40 return ARRAYS;
41 } 41 }
42 42
yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/stock/ErpStockRecordBizTypeEnum.java
1 package cn.iocoder.yudao.module.erp.enums.stock; 1 package cn.iocoder.yudao.module.erp.enums.stock;
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 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @RequiredArgsConstructor 14 @RequiredArgsConstructor
15 @Getter 15 @Getter
16 -public enum ErpStockRecordBizTypeEnum implements IntArrayValuable { 16 +public enum ErpStockRecordBizTypeEnum implements ArrayValuable<Integer> {
17 17
18 OTHER_IN(10, "其它入库"), 18 OTHER_IN(10, "其它入库"),
19 OTHER_IN_CANCEL(11, "其它入库(作废)"), 19 OTHER_IN_CANCEL(11, "其它入库(作废)"),
@@ -44,7 +44,7 @@ public enum ErpStockRecordBizTypeEnum implements IntArrayValuable { @@ -44,7 +44,7 @@ public enum ErpStockRecordBizTypeEnum implements IntArrayValuable {
44 PURCHASE_RETURN_CANCEL(81, "采购退货出库(作废)"), 44 PURCHASE_RETURN_CANCEL(81, "采购退货出库(作废)"),
45 ; 45 ;
46 46
47 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ErpStockRecordBizTypeEnum::getType).toArray(); 47 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(ErpStockRecordBizTypeEnum::getType).toArray(Integer[]::new);
48 48
49 /** 49 /**
50 * 类型 50 * 类型
@@ -56,7 +56,7 @@ public enum ErpStockRecordBizTypeEnum implements IntArrayValuable { @@ -56,7 +56,7 @@ public enum ErpStockRecordBizTypeEnum implements IntArrayValuable {
56 private final String name; 56 private final String name;
57 57
58 @Override 58 @Override
59 - public int[] array() { 59 + public Integer[] array() {
60 return ARRAYS; 60 return ARRAYS;
61 } 61 }
62 62
yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/device/IotDeviceStatusEnum.java
1 package cn.iocoder.yudao.module.iot.enums.device; 1 package cn.iocoder.yudao.module.iot.enums.device;
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,14 +11,14 @@ import java.util.Arrays; @@ -11,14 +11,14 @@ import java.util.Arrays;
11 * @author haohao 11 * @author haohao
12 */ 12 */
13 @Getter 13 @Getter
14 -public enum IotDeviceStatusEnum implements IntArrayValuable { 14 +public enum IotDeviceStatusEnum implements ArrayValuable<Integer> {
15 15
16 INACTIVE(0, "未激活"), 16 INACTIVE(0, "未激活"),
17 ONLINE(1, "在线"), 17 ONLINE(1, "在线"),
18 OFFLINE(2, "离线"), 18 OFFLINE(2, "离线"),
19 DISABLED(3, "已禁用"); 19 DISABLED(3, "已禁用");
20 20
21 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotDeviceStatusEnum::getStatus).toArray(); 21 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotDeviceStatusEnum::getStatus).toArray(Integer[]::new);
22 22
23 /** 23 /**
24 * 状态 24 * 状态
@@ -48,7 +48,7 @@ public enum IotDeviceStatusEnum implements IntArrayValuable { @@ -48,7 +48,7 @@ public enum IotDeviceStatusEnum implements IntArrayValuable {
48 } 48 }
49 49
50 @Override 50 @Override
51 - public int[] array() { 51 + public Integer[] array() {
52 return ARRAYS; 52 return ARRAYS;
53 } 53 }
54 54
yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotDataFormatEnum.java
1 package cn.iocoder.yudao.module.iot.enums.product; 1 package cn.iocoder.yudao.module.iot.enums.product;
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
@@ -14,12 +14,12 @@ import java.util.Arrays; @@ -14,12 +14,12 @@ import java.util.Arrays;
14 */ 14 */
15 @AllArgsConstructor 15 @AllArgsConstructor
16 @Getter 16 @Getter
17 -public enum IotDataFormatEnum implements IntArrayValuable { 17 +public enum IotDataFormatEnum implements ArrayValuable<Integer> {
18 18
19 JSON(0, "标准数据格式(JSON)"), 19 JSON(0, "标准数据格式(JSON)"),
20 CUSTOMIZE(1, "透传/自定义"); 20 CUSTOMIZE(1, "透传/自定义");
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotDataFormatEnum::getType).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotDataFormatEnum::getType).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 类型 25 * 类型
@@ -31,7 +31,7 @@ public enum IotDataFormatEnum implements IntArrayValuable { @@ -31,7 +31,7 @@ public enum IotDataFormatEnum implements IntArrayValuable {
31 private final String description; 31 private final String description;
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/IotNetTypeEnum.java
1 package cn.iocoder.yudao.module.iot.enums.product; 1 package cn.iocoder.yudao.module.iot.enums.product;
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,14 +13,14 @@ import java.util.Arrays; @@ -13,14 +13,14 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum IotNetTypeEnum implements IntArrayValuable { 16 +public enum IotNetTypeEnum implements ArrayValuable<Integer> {
17 17
18 WIFI(0, "Wi-Fi"), 18 WIFI(0, "Wi-Fi"),
19 CELLULAR(1, "Cellular"), 19 CELLULAR(1, "Cellular"),
20 ETHERNET(2, "Ethernet"), 20 ETHERNET(2, "Ethernet"),
21 OTHER(3, "其他"); 21 OTHER(3, "其他");
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotNetTypeEnum::getType).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotNetTypeEnum::getType).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 类型 26 * 类型
@@ -32,7 +32,7 @@ public enum IotNetTypeEnum implements IntArrayValuable { @@ -32,7 +32,7 @@ public enum IotNetTypeEnum implements IntArrayValuable {
32 private final String description; 32 private final String description;
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProductDeviceTypeEnum.java
1 package cn.iocoder.yudao.module.iot.enums.product; 1 package cn.iocoder.yudao.module.iot.enums.product;
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,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum IotProductDeviceTypeEnum implements IntArrayValuable { 16 +public enum IotProductDeviceTypeEnum implements ArrayValuable<Integer> {
17 17
18 DIRECT(0, "直连设备"), 18 DIRECT(0, "直连设备"),
19 GATEWAY_CHILD(1, "网关子设备"), 19 GATEWAY_CHILD(1, "网关子设备"),
@@ -29,10 +29,10 @@ public enum IotProductDeviceTypeEnum implements IntArrayValuable { @@ -29,10 +29,10 @@ public enum IotProductDeviceTypeEnum implements IntArrayValuable {
29 */ 29 */
30 private final String description; 30 private final String description;
31 31
32 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotProductDeviceTypeEnum::getType).toArray(); 32 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotProductDeviceTypeEnum::getType).toArray(Integer[]::new);
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProductFunctionTypeEnum.java
1 package cn.iocoder.yudao.module.iot.enums.product; 1 package cn.iocoder.yudao.module.iot.enums.product;
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,13 +13,13 @@ import java.util.Arrays; @@ -13,13 +13,13 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum IotProductFunctionTypeEnum implements IntArrayValuable { 16 +public enum IotProductFunctionTypeEnum implements ArrayValuable<Integer> {
17 17
18 PROPERTY(1, "属性"), 18 PROPERTY(1, "属性"),
19 SERVICE(2, "服务"), 19 SERVICE(2, "服务"),
20 EVENT(3, "事件"); 20 EVENT(3, "事件");
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotProductFunctionTypeEnum::getType).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotProductFunctionTypeEnum::getType).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 类型 25 * 类型
@@ -31,7 +31,7 @@ public enum IotProductFunctionTypeEnum implements IntArrayValuable { @@ -31,7 +31,7 @@ public enum IotProductFunctionTypeEnum implements IntArrayValuable {
31 private final String description; 31 private final String description;
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
1 package cn.iocoder.yudao.module.iot.enums.product; 1 package cn.iocoder.yudao.module.iot.enums.product;
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 IotProductStatusEnum implements IntArrayValuable { 16 +public enum IotProductStatusEnum implements ArrayValuable<Integer> {
17 17
18 UNPUBLISHED(0, "开发中"), 18 UNPUBLISHED(0, "开发中"),
19 PUBLISHED(1, "已发布"); 19 PUBLISHED(1, "已发布");
20 20
21 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotProductStatusEnum::getType).toArray(); 21 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotProductStatusEnum::getType).toArray(Integer[]::new);
22 22
23 /** 23 /**
24 * 类型 24 * 类型
@@ -30,7 +30,7 @@ public enum IotProductStatusEnum implements IntArrayValuable { @@ -30,7 +30,7 @@ public enum IotProductStatusEnum implements IntArrayValuable {
30 private final String description; 30 private final String description;
31 31
32 @Override 32 @Override
33 - public int[] array() { 33 + public Integer[] array() {
34 return ARRAYS; 34 return ARRAYS;
35 } 35 }
36 36
yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProtocolTypeEnum.java
1 package cn.iocoder.yudao.module.iot.enums.product; 1 package cn.iocoder.yudao.module.iot.enums.product;
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,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum IotProtocolTypeEnum implements IntArrayValuable { 16 +public enum IotProtocolTypeEnum implements ArrayValuable<Integer> {
17 17
18 CUSTOM(0, "自定义"), 18 CUSTOM(0, "自定义"),
19 MODBUS(1, "Modbus"), 19 MODBUS(1, "Modbus"),
@@ -21,7 +21,7 @@ public enum IotProtocolTypeEnum implements IntArrayValuable { @@ -21,7 +21,7 @@ public enum IotProtocolTypeEnum implements IntArrayValuable {
21 ZIGBEE(3, "ZigBee"), 21 ZIGBEE(3, "ZigBee"),
22 BLE(4, "BLE"); 22 BLE(4, "BLE");
23 23
24 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotProtocolTypeEnum::getType).toArray(); 24 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotProtocolTypeEnum::getType).toArray(Integer[]::new);
25 25
26 /** 26 /**
27 * 类型 27 * 类型
@@ -33,7 +33,7 @@ public enum IotProtocolTypeEnum implements IntArrayValuable { @@ -33,7 +33,7 @@ public enum IotProtocolTypeEnum implements IntArrayValuable {
33 private final String description; 33 private final String description;
34 34
35 @Override 35 @Override
36 - public int[] array() { 36 + public Integer[] array() {
37 return ARRAYS; 37 return ARRAYS;
38 } 38 }
39 39
yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotValidateTypeEnum.java
1 package cn.iocoder.yudao.module.iot.enums.product; 1 package cn.iocoder.yudao.module.iot.enums.product;
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 IotValidateTypeEnum implements IntArrayValuable { 16 +public enum IotValidateTypeEnum implements ArrayValuable<Integer> {
17 17
18 WEAK(0, "弱校验"), 18 WEAK(0, "弱校验"),
19 NONE(1, "免校验"); 19 NONE(1, "免校验");
20 20
21 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotValidateTypeEnum::getType).toArray(); 21 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotValidateTypeEnum::getType).toArray(Integer[]::new);
22 22
23 /** 23 /**
24 * 类型 24 * 类型
@@ -30,7 +30,7 @@ public enum IotValidateTypeEnum implements IntArrayValuable { @@ -30,7 +30,7 @@ public enum IotValidateTypeEnum implements IntArrayValuable {
30 private final String description; 30 private final String description;
31 31
32 @Override 32 @Override
33 - public int[] array() { 33 + public Integer[] array() {
34 return ARRAYS; 34 return ARRAYS;
35 } 35 }
36 36
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/comment/ProductCommentAuditStatusEnum.java
1 package cn.iocoder.yudao.module.product.enums.comment; 1 package cn.iocoder.yudao.module.product.enums.comment;
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,13 +13,13 @@ import java.util.Arrays; @@ -13,13 +13,13 @@ import java.util.Arrays;
13 */ 13 */
14 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum ProductCommentAuditStatusEnum implements IntArrayValuable { 16 +public enum ProductCommentAuditStatusEnum implements ArrayValuable<Integer> {
17 17
18 NONE(1, "待审核"), 18 NONE(1, "待审核"),
19 APPROVE(2, "审批通过"), 19 APPROVE(2, "审批通过"),
20 REJECT(2, "审批不通过"),; 20 REJECT(2, "审批不通过"),;
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ProductCommentAuditStatusEnum::getStatus).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(ProductCommentAuditStatusEnum::getStatus).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 审批状态 25 * 审批状态
@@ -31,7 +31,7 @@ public enum ProductCommentAuditStatusEnum implements IntArrayValuable { @@ -31,7 +31,7 @@ public enum ProductCommentAuditStatusEnum 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-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/comment/ProductCommentScoresEnum.java
1 package cn.iocoder.yudao.module.product.enums.comment; 1 package cn.iocoder.yudao.module.product.enums.comment;
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,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum ProductCommentScoresEnum implements IntArrayValuable { 16 +public enum ProductCommentScoresEnum implements ArrayValuable<Integer> {
17 17
18 ONE(1, "1星"), 18 ONE(1, "1星"),
19 TWO(2, "2星"), 19 TWO(2, "2星"),
@@ -21,7 +21,7 @@ public enum ProductCommentScoresEnum implements IntArrayValuable { @@ -21,7 +21,7 @@ public enum ProductCommentScoresEnum implements IntArrayValuable {
21 FOUR(4, "4星"), 21 FOUR(4, "4星"),
22 FIVE(5, "5星"); 22 FIVE(5, "5星");
23 23
24 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ProductCommentScoresEnum::getScores).toArray(); 24 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(ProductCommentScoresEnum::getScores).toArray(Integer[]::new);
25 25
26 /** 26 /**
27 * 星级 27 * 星级
@@ -34,7 +34,7 @@ public enum ProductCommentScoresEnum implements IntArrayValuable { @@ -34,7 +34,7 @@ public enum ProductCommentScoresEnum implements IntArrayValuable {
34 private final String name; 34 private final String name;
35 35
36 @Override 36 @Override
37 - public int[] array() { 37 + public Integer[] array() {
38 return ARRAYS; 38 return ARRAYS;
39 } 39 }
40 40
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/spu/ProductSpuStatusEnum.java
1 package cn.iocoder.yudao.module.product.enums.spu; 1 package cn.iocoder.yudao.module.product.enums.spu;
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,13 +13,13 @@ import java.util.Arrays; @@ -13,13 +13,13 @@ import java.util.Arrays;
13 */ 13 */
14 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum ProductSpuStatusEnum implements IntArrayValuable { 16 +public enum ProductSpuStatusEnum implements ArrayValuable<Integer> {
17 17
18 RECYCLE(-1, "回收站"), 18 RECYCLE(-1, "回收站"),
19 DISABLE(0, "下架"), 19 DISABLE(0, "下架"),
20 ENABLE(1, "上架"); 20 ENABLE(1, "上架");
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ProductSpuStatusEnum::getStatus).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(ProductSpuStatusEnum::getStatus).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 状态 25 * 状态
@@ -31,7 +31,7 @@ public enum ProductSpuStatusEnum implements IntArrayValuable { @@ -31,7 +31,7 @@ public enum ProductSpuStatusEnum 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-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/banner/BannerPositionEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.banner; 1 package cn.iocoder.yudao.module.promotion.enums.banner;
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,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum BannerPositionEnum implements IntArrayValuable { 16 +public enum BannerPositionEnum implements ArrayValuable<Integer> {
17 17
18 HOME_POSITION(1, "首页"), 18 HOME_POSITION(1, "首页"),
19 SECKILL_POSITION(2, "秒杀活动页"), 19 SECKILL_POSITION(2, "秒杀活动页"),
@@ -21,7 +21,7 @@ public enum BannerPositionEnum implements IntArrayValuable { @@ -21,7 +21,7 @@ public enum BannerPositionEnum implements IntArrayValuable {
21 DISCOUNT_POSITION(4, "限时折扣页"), 21 DISCOUNT_POSITION(4, "限时折扣页"),
22 REWARD_POSITION(5, "满减送页"); 22 REWARD_POSITION(5, "满减送页");
23 23
24 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BannerPositionEnum::getPosition).toArray(); 24 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BannerPositionEnum::getPosition).toArray(Integer[]::new);
25 25
26 /** 26 /**
27 * 值 27 * 值
@@ -33,7 +33,7 @@ public enum BannerPositionEnum implements IntArrayValuable { @@ -33,7 +33,7 @@ public enum BannerPositionEnum implements IntArrayValuable {
33 private final String name; 33 private final String name;
34 34
35 @Override 35 @Override
36 - public int[] array() { 36 + public Integer[] array() {
37 return ARRAYS; 37 return ARRAYS;
38 } 38 }
39 39
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/bargain/BargainRecordStatusEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.bargain; 1 package cn.iocoder.yudao.module.promotion.enums.bargain;
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,14 +13,14 @@ import java.util.Arrays; @@ -13,14 +13,14 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum BargainRecordStatusEnum implements IntArrayValuable { 16 +public enum BargainRecordStatusEnum implements ArrayValuable<Integer> {
17 17
18 IN_PROGRESS(1, "砍价中"), 18 IN_PROGRESS(1, "砍价中"),
19 SUCCESS(2, "砍价成功"), 19 SUCCESS(2, "砍价成功"),
20 FAILED(3, "砍价失败"), // 活动到期时,会自动将到期的砍价全部设置为过期 20 FAILED(3, "砍价失败"), // 活动到期时,会自动将到期的砍价全部设置为过期
21 ; 21 ;
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BargainRecordStatusEnum::getStatus).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BargainRecordStatusEnum::getStatus).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 值 26 * 值
@@ -32,7 +32,7 @@ public enum BargainRecordStatusEnum implements IntArrayValuable { @@ -32,7 +32,7 @@ public enum BargainRecordStatusEnum implements IntArrayValuable {
32 private final String name; 32 private final String name;
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/combination/CombinationRecordStatusEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.combination; 1 package cn.iocoder.yudao.module.promotion.enums.combination;
2 2
3 import cn.hutool.core.util.ObjectUtil; 3 import cn.hutool.core.util.ObjectUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,13 +14,13 @@ import java.util.Arrays; @@ -14,13 +14,13 @@ import java.util.Arrays;
14 */ 14 */
15 @AllArgsConstructor 15 @AllArgsConstructor
16 @Getter 16 @Getter
17 -public enum CombinationRecordStatusEnum implements IntArrayValuable { 17 +public enum CombinationRecordStatusEnum implements ArrayValuable<Integer> {
18 18
19 IN_PROGRESS(0, "进行中"), 19 IN_PROGRESS(0, "进行中"),
20 SUCCESS(1, "拼团成功"), 20 SUCCESS(1, "拼团成功"),
21 FAILED(2, "拼团失败"); 21 FAILED(2, "拼团失败");
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CombinationRecordStatusEnum::getStatus).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CombinationRecordStatusEnum::getStatus).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 状态值 26 * 状态值
@@ -32,7 +32,7 @@ public enum CombinationRecordStatusEnum implements IntArrayValuable { @@ -32,7 +32,7 @@ public enum CombinationRecordStatusEnum implements IntArrayValuable {
32 private final String name; 32 private final String name;
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionActivityStatusEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.common; 1 package cn.iocoder.yudao.module.promotion.enums.common;
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
@@ -14,14 +14,14 @@ import java.util.Arrays; @@ -14,14 +14,14 @@ import java.util.Arrays;
14 */ 14 */
15 @AllArgsConstructor 15 @AllArgsConstructor
16 @Getter 16 @Getter
17 -public enum PromotionActivityStatusEnum implements IntArrayValuable { 17 +public enum PromotionActivityStatusEnum implements ArrayValuable<Integer> {
18 18
19 WAIT(10, "未开始"), 19 WAIT(10, "未开始"),
20 RUN(20, "进行中"), 20 RUN(20, "进行中"),
21 END(30, "已结束"), 21 END(30, "已结束"),
22 CLOSE(40, "已关闭"); 22 CLOSE(40, "已关闭");
23 23
24 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PromotionActivityStatusEnum::getStatus).toArray(); 24 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PromotionActivityStatusEnum::getStatus).toArray(Integer[]::new);
25 25
26 /** 26 /**
27 * 状态值 27 * 状态值
@@ -33,7 +33,7 @@ public enum PromotionActivityStatusEnum implements IntArrayValuable { @@ -33,7 +33,7 @@ public enum PromotionActivityStatusEnum implements IntArrayValuable {
33 private final String name; 33 private final String name;
34 34
35 @Override 35 @Override
36 - public int[] array() { 36 + public Integer[] array() {
37 return ARRAYS; 37 return ARRAYS;
38 } 38 }
39 39
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionConditionTypeEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.common; 1 package cn.iocoder.yudao.module.promotion.enums.common;
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 PromotionConditionTypeEnum implements IntArrayValuable { 16 +public enum PromotionConditionTypeEnum implements ArrayValuable<Integer> {
17 17
18 PRICE(10, "满 N 元"), 18 PRICE(10, "满 N 元"),
19 COUNT(20, "满 N 件"); 19 COUNT(20, "满 N 件");
20 20
21 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PromotionConditionTypeEnum::getType).toArray(); 21 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PromotionConditionTypeEnum::getType).toArray(Integer[]::new);
22 22
23 /** 23 /**
24 * 类型值 24 * 类型值
@@ -30,7 +30,7 @@ public enum PromotionConditionTypeEnum implements IntArrayValuable { @@ -30,7 +30,7 @@ public enum PromotionConditionTypeEnum implements IntArrayValuable {
30 private final String name; 30 private final String name;
31 31
32 @Override 32 @Override
33 - public int[] array() { 33 + public Integer[] array() {
34 return ARRAYS; 34 return ARRAYS;
35 } 35 }
36 36
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionDiscountTypeEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.common; 1 package cn.iocoder.yudao.module.promotion.enums.common;
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,13 +13,13 @@ import java.util.Arrays; @@ -13,13 +13,13 @@ import java.util.Arrays;
13 */ 13 */
14 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum PromotionDiscountTypeEnum implements IntArrayValuable { 16 +public enum PromotionDiscountTypeEnum implements ArrayValuable<Integer> {
17 17
18 PRICE(1, "满减"), // 具体金额 18 PRICE(1, "满减"), // 具体金额
19 PERCENT(2, "折扣"), // 百分比 19 PERCENT(2, "折扣"), // 百分比
20 ; 20 ;
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PromotionDiscountTypeEnum::getType).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PromotionDiscountTypeEnum::getType).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 优惠类型 25 * 优惠类型
@@ -31,7 +31,7 @@ public enum PromotionDiscountTypeEnum implements IntArrayValuable { @@ -31,7 +31,7 @@ public enum PromotionDiscountTypeEnum 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-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionProductScopeEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.common; 1 package cn.iocoder.yudao.module.promotion.enums.common;
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
@@ -14,13 +14,13 @@ import java.util.Objects; @@ -14,13 +14,13 @@ import java.util.Objects;
14 */ 14 */
15 @Getter 15 @Getter
16 @AllArgsConstructor 16 @AllArgsConstructor
17 -public enum PromotionProductScopeEnum implements IntArrayValuable { 17 +public enum PromotionProductScopeEnum implements ArrayValuable<Integer> {
18 18
19 ALL(1, "全部商品"), 19 ALL(1, "全部商品"),
20 SPU(2, "指定商品"), 20 SPU(2, "指定商品"),
21 CATEGORY(3, "指定品类"); 21 CATEGORY(3, "指定品类");
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PromotionProductScopeEnum::getScope).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PromotionProductScopeEnum::getScope).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 范围值 26 * 范围值
@@ -32,7 +32,7 @@ public enum PromotionProductScopeEnum implements IntArrayValuable { @@ -32,7 +32,7 @@ public enum PromotionProductScopeEnum implements IntArrayValuable {
32 private final String name; 32 private final String name;
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionTypeEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.common; 1 package cn.iocoder.yudao.module.promotion.enums.common;
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,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum PromotionTypeEnum implements IntArrayValuable { 16 +public enum PromotionTypeEnum implements ArrayValuable<Integer> {
17 17
18 SECKILL_ACTIVITY(1, "秒杀活动"), 18 SECKILL_ACTIVITY(1, "秒杀活动"),
19 BARGAIN_ACTIVITY(2, "砍价活动"), 19 BARGAIN_ACTIVITY(2, "砍价活动"),
@@ -27,7 +27,7 @@ public enum PromotionTypeEnum implements IntArrayValuable { @@ -27,7 +27,7 @@ public enum PromotionTypeEnum implements IntArrayValuable {
27 POINT(8, "积分") 27 POINT(8, "积分")
28 ; 28 ;
29 29
30 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PromotionTypeEnum::getType).toArray(); 30 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PromotionTypeEnum::getType).toArray(Integer[]::new);
31 31
32 /** 32 /**
33 * 类型值 33 * 类型值
@@ -39,7 +39,7 @@ public enum PromotionTypeEnum implements IntArrayValuable { @@ -39,7 +39,7 @@ public enum PromotionTypeEnum implements IntArrayValuable {
39 private final String name; 39 private final String name;
40 40
41 @Override 41 @Override
42 - public int[] array() { 42 + public Integer[] array() {
43 return ARRAYS; 43 return ARRAYS;
44 } 44 }
45 45
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/coupon/CouponStatusEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.coupon; 1 package cn.iocoder.yudao.module.promotion.enums.coupon;
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,13 +13,13 @@ import java.util.Arrays; @@ -13,13 +13,13 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum CouponStatusEnum implements IntArrayValuable { 16 +public enum CouponStatusEnum implements ArrayValuable<Integer> {
17 17
18 UNUSED(1, "未使用"), 18 UNUSED(1, "未使用"),
19 USED(2, "已使用"), 19 USED(2, "已使用"),
20 EXPIRE(3, "已过期"); 20 EXPIRE(3, "已过期");
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CouponStatusEnum::getStatus).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CouponStatusEnum::getStatus).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 值 25 * 值
@@ -31,7 +31,7 @@ public enum CouponStatusEnum implements IntArrayValuable { @@ -31,7 +31,7 @@ public enum CouponStatusEnum 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-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/coupon/CouponTakeTypeEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.coupon; 1 package cn.iocoder.yudao.module.promotion.enums.coupon;
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
@@ -14,14 +14,14 @@ import java.util.Objects; @@ -14,14 +14,14 @@ import java.util.Objects;
14 */ 14 */
15 @AllArgsConstructor 15 @AllArgsConstructor
16 @Getter 16 @Getter
17 -public enum CouponTakeTypeEnum implements IntArrayValuable { 17 +public enum CouponTakeTypeEnum implements ArrayValuable<Integer> {
18 18
19 USER(1, "直接领取"), // 用户可在首页、每日领劵直接领取 19 USER(1, "直接领取"), // 用户可在首页、每日领劵直接领取
20 ADMIN(2, "指定发放"), // 后台指定会员赠送优惠劵 20 ADMIN(2, "指定发放"), // 后台指定会员赠送优惠劵
21 REGISTER(3, "新人券"), // 注册时自动领取 21 REGISTER(3, "新人券"), // 注册时自动领取
22 ; 22 ;
23 23
24 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CouponTakeTypeEnum::getType).toArray(); 24 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CouponTakeTypeEnum::getType).toArray(Integer[]::new);
25 25
26 /** 26 /**
27 * 值 27 * 值
@@ -33,7 +33,7 @@ public enum CouponTakeTypeEnum implements IntArrayValuable { @@ -33,7 +33,7 @@ public enum CouponTakeTypeEnum implements IntArrayValuable {
33 private final String name; 33 private final String name;
34 34
35 @Override 35 @Override
36 - public int[] array() { 36 + public Integer[] array() {
37 return ARRAYS; 37 return ARRAYS;
38 } 38 }
39 39
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/coupon/CouponTemplateValidityTypeEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.coupon; 1 package cn.iocoder.yudao.module.promotion.enums.coupon;
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,13 +13,13 @@ import java.util.Arrays; @@ -13,13 +13,13 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum CouponTemplateValidityTypeEnum implements IntArrayValuable { 16 +public enum CouponTemplateValidityTypeEnum implements ArrayValuable<Integer> {
17 17
18 DATE(1, "固定日期"), 18 DATE(1, "固定日期"),
19 TERM(2, "领取之后"), 19 TERM(2, "领取之后"),
20 ; 20 ;
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CouponTemplateValidityTypeEnum::getType).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CouponTemplateValidityTypeEnum::getType).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 值 25 * 值
@@ -31,7 +31,7 @@ public enum CouponTemplateValidityTypeEnum implements IntArrayValuable { @@ -31,7 +31,7 @@ public enum CouponTemplateValidityTypeEnum 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-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/diy/DiyPageEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.diy; 1 package cn.iocoder.yudao.module.promotion.enums.diy;
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,13 +13,13 @@ import java.util.Arrays; @@ -13,13 +13,13 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum DiyPageEnum implements IntArrayValuable { 16 +public enum DiyPageEnum implements ArrayValuable<Integer> {
17 17
18 INDEX(1, "首页"), 18 INDEX(1, "首页"),
19 MY(2, "我的"), 19 MY(2, "我的"),
20 ; 20 ;
21 21
22 - private static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DiyPageEnum::getPage).toArray(); 22 + private static final Integer[] ARRAYS = Arrays.stream(values()).map(DiyPageEnum::getPage).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 页面编号 25 * 页面编号
@@ -32,7 +32,7 @@ public enum DiyPageEnum implements IntArrayValuable { @@ -32,7 +32,7 @@ public enum DiyPageEnum implements IntArrayValuable {
32 private final String name; 32 private final String name;
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/kefu/KeFuMessageContentTypeEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.kefu; 1 package cn.iocoder.yudao.module.promotion.enums.kefu;
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,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum KeFuMessageContentTypeEnum implements IntArrayValuable { 16 +public enum KeFuMessageContentTypeEnum implements ArrayValuable<Integer> {
17 17
18 TEXT(1, "文本消息"), 18 TEXT(1, "文本消息"),
19 IMAGE(2, "图片消息"), 19 IMAGE(2, "图片消息"),
@@ -25,7 +25,7 @@ public enum KeFuMessageContentTypeEnum implements IntArrayValuable { @@ -25,7 +25,7 @@ public enum KeFuMessageContentTypeEnum implements IntArrayValuable {
25 PRODUCT(10, "商品消息"), 25 PRODUCT(10, "商品消息"),
26 ORDER(11, "订单消息"); 26 ORDER(11, "订单消息");
27 27
28 - private static final int[] ARRAYS = Arrays.stream(values()).mapToInt(KeFuMessageContentTypeEnum::getType).toArray(); 28 + private static final Integer[] ARRAYS = Arrays.stream(values()).map(KeFuMessageContentTypeEnum::getType).toArray(Integer[]::new);
29 29
30 /** 30 /**
31 * 类型 31 * 类型
@@ -38,7 +38,7 @@ public enum KeFuMessageContentTypeEnum implements IntArrayValuable { @@ -38,7 +38,7 @@ public enum KeFuMessageContentTypeEnum implements IntArrayValuable {
38 private final String name; 38 private final String name;
39 39
40 @Override 40 @Override
41 - public int[] array() { 41 + public Integer[] array() {
42 return ARRAYS; 42 return ARRAYS;
43 } 43 }
44 44
yudao-module-mall/yudao-module-statistics-api/src/main/java/cn/iocoder/yudao/module/statistics/enums/TimeRangeTypeEnum.java
1 package cn.iocoder.yudao.module.statistics.enums; 1 package cn.iocoder.yudao.module.statistics.enums;
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,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum TimeRangeTypeEnum implements IntArrayValuable { 16 +public enum TimeRangeTypeEnum implements ArrayValuable<Integer> {
17 17
18 /** 18 /**
19 * 天 19 * 天
@@ -33,7 +33,7 @@ public enum TimeRangeTypeEnum implements IntArrayValuable { @@ -33,7 +33,7 @@ public enum TimeRangeTypeEnum implements IntArrayValuable {
33 YEAR(365), 33 YEAR(365),
34 ; 34 ;
35 35
36 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TimeRangeTypeEnum::getType).toArray(); 36 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(TimeRangeTypeEnum::getType).toArray(Integer[]::new);
37 37
38 /** 38 /**
39 * 类型 39 * 类型
@@ -41,7 +41,7 @@ public enum TimeRangeTypeEnum implements IntArrayValuable { @@ -41,7 +41,7 @@ public enum TimeRangeTypeEnum implements IntArrayValuable {
41 private final Integer type; 41 private final Integer type;
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-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/aftersale/AfterSaleStatusEnum.java
1 package cn.iocoder.yudao.module.trade.enums.aftersale; 1 package cn.iocoder.yudao.module.trade.enums.aftersale;
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
@@ -18,7 +18,7 @@ import static cn.hutool.core.util.ArrayUtil.firstMatch; @@ -18,7 +18,7 @@ import static cn.hutool.core.util.ArrayUtil.firstMatch;
18 */ 18 */
19 @AllArgsConstructor 19 @AllArgsConstructor
20 @Getter 20 @Getter
21 -public enum AfterSaleStatusEnum implements IntArrayValuable { 21 +public enum AfterSaleStatusEnum implements ArrayValuable<Integer> {
22 22
23 /** 23 /**
24 * 【申请售后】 24 * 【申请售后】
@@ -54,7 +54,7 @@ public enum AfterSaleStatusEnum implements IntArrayValuable { @@ -54,7 +54,7 @@ public enum AfterSaleStatusEnum implements IntArrayValuable {
54 SELLER_REFUSE(63,"卖家拒绝收货", "商家拒绝收货"), // 有赞的状态提示:商家拒绝收货,不同意退款 54 SELLER_REFUSE(63,"卖家拒绝收货", "商家拒绝收货"), // 有赞的状态提示:商家拒绝收货,不同意退款
55 ; 55 ;
56 56
57 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AfterSaleStatusEnum::getStatus).toArray(); 57 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AfterSaleStatusEnum::getStatus).toArray(Integer[]::new);
58 58
59 /** 59 /**
60 * 进行中的售后状态 60 * 进行中的售后状态
@@ -84,7 +84,7 @@ public enum AfterSaleStatusEnum implements IntArrayValuable { @@ -84,7 +84,7 @@ public enum AfterSaleStatusEnum implements IntArrayValuable {
84 private final String content; 84 private final String content;
85 85
86 @Override 86 @Override
87 - public int[] array() { 87 + public Integer[] array() {
88 return ARRAYS; 88 return ARRAYS;
89 } 89 }
90 90
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/aftersale/AfterSaleTypeEnum.java
1 package cn.iocoder.yudao.module.trade.enums.aftersale; 1 package cn.iocoder.yudao.module.trade.enums.aftersale;
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 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -13,12 +13,12 @@ import java.util.Arrays; @@ -13,12 +13,12 @@ import java.util.Arrays;
13 */ 13 */
14 @RequiredArgsConstructor 14 @RequiredArgsConstructor
15 @Getter 15 @Getter
16 -public enum AfterSaleTypeEnum implements IntArrayValuable { 16 +public enum AfterSaleTypeEnum implements ArrayValuable<Integer> {
17 17
18 IN_SALE(10, "售中退款"), // 交易完成前买家申请退款 18 IN_SALE(10, "售中退款"), // 交易完成前买家申请退款
19 AFTER_SALE(20, "售后退款"); // 交易完成后买家申请退款 19 AFTER_SALE(20, "售后退款"); // 交易完成后买家申请退款
20 20
21 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AfterSaleTypeEnum::getType).toArray(); 21 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AfterSaleTypeEnum::getType).toArray(Integer[]::new);
22 22
23 /** 23 /**
24 * 类型 24 * 类型
@@ -30,7 +30,7 @@ public enum AfterSaleTypeEnum implements IntArrayValuable { @@ -30,7 +30,7 @@ public enum AfterSaleTypeEnum implements IntArrayValuable {
30 private final String name; 30 private final String name;
31 31
32 @Override 32 @Override
33 - public int[] array() { 33 + public Integer[] array() {
34 return ARRAYS; 34 return ARRAYS;
35 } 35 }
36 36
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/aftersale/AfterSaleWayEnum.java
1 package cn.iocoder.yudao.module.trade.enums.aftersale; 1 package cn.iocoder.yudao.module.trade.enums.aftersale;
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 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -13,12 +13,12 @@ import java.util.Arrays; @@ -13,12 +13,12 @@ import java.util.Arrays;
13 */ 13 */
14 @RequiredArgsConstructor 14 @RequiredArgsConstructor
15 @Getter 15 @Getter
16 -public enum AfterSaleWayEnum implements IntArrayValuable { 16 +public enum AfterSaleWayEnum implements ArrayValuable<Integer> {
17 17
18 REFUND(10, "仅退款"), 18 REFUND(10, "仅退款"),
19 RETURN_AND_REFUND(20, "退货退款"); 19 RETURN_AND_REFUND(20, "退货退款");
20 20
21 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AfterSaleWayEnum::getWay).toArray(); 21 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AfterSaleWayEnum::getWay).toArray(Integer[]::new);
22 22
23 /** 23 /**
24 * 方式 24 * 方式
@@ -30,7 +30,7 @@ public enum AfterSaleWayEnum implements IntArrayValuable { @@ -30,7 +30,7 @@ public enum AfterSaleWayEnum implements IntArrayValuable {
30 private final String name; 30 private final String name;
31 31
32 @Override 32 @Override
33 - public int[] array() { 33 + public Integer[] array() {
34 return ARRAYS; 34 return ARRAYS;
35 } 35 }
36 36
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageBindModeEnum.java
1 package cn.iocoder.yudao.module.trade.enums.brokerage; 1 package cn.iocoder.yudao.module.trade.enums.brokerage;
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,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum BrokerageBindModeEnum implements IntArrayValuable { 16 +public enum BrokerageBindModeEnum implements ArrayValuable<Integer> {
17 17
18 /** 18 /**
19 * 只要用户没有推广人,随时都可以绑定分销关系 19 * 只要用户没有推广人,随时都可以绑定分销关系
@@ -29,7 +29,7 @@ public enum BrokerageBindModeEnum implements IntArrayValuable { @@ -29,7 +29,7 @@ public enum BrokerageBindModeEnum implements IntArrayValuable {
29 OVERRIDE(3, "覆盖绑定"), 29 OVERRIDE(3, "覆盖绑定"),
30 ; 30 ;
31 31
32 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BrokerageBindModeEnum::getMode).toArray(); 32 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BrokerageBindModeEnum::getMode).toArray(Integer[]::new);
33 33
34 /** 34 /**
35 * 模式 35 * 模式
@@ -41,7 +41,7 @@ public enum BrokerageBindModeEnum implements IntArrayValuable { @@ -41,7 +41,7 @@ public enum BrokerageBindModeEnum implements IntArrayValuable {
41 private final String name; 41 private final String name;
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-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageEnabledConditionEnum.java
1 package cn.iocoder.yudao.module.trade.enums.brokerage; 1 package cn.iocoder.yudao.module.trade.enums.brokerage;
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,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum BrokerageEnabledConditionEnum implements IntArrayValuable { 16 +public enum BrokerageEnabledConditionEnum implements ArrayValuable<Integer> {
17 17
18 /** 18 /**
19 * 所有用户都可以分销 19 * 所有用户都可以分销
@@ -25,7 +25,7 @@ public enum BrokerageEnabledConditionEnum implements IntArrayValuable { @@ -25,7 +25,7 @@ public enum BrokerageEnabledConditionEnum implements IntArrayValuable {
25 ADMIN(2, "指定分销"), 25 ADMIN(2, "指定分销"),
26 ; 26 ;
27 27
28 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BrokerageEnabledConditionEnum::getCondition).toArray(); 28 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BrokerageEnabledConditionEnum::getCondition).toArray(Integer[]::new);
29 29
30 /** 30 /**
31 * 模式 31 * 模式
@@ -37,7 +37,7 @@ public enum BrokerageEnabledConditionEnum implements IntArrayValuable { @@ -37,7 +37,7 @@ public enum BrokerageEnabledConditionEnum implements IntArrayValuable {
37 private final String name; 37 private final String name;
38 38
39 @Override 39 @Override
40 - public int[] array() { 40 + public Integer[] array() {
41 return ARRAYS; 41 return ARRAYS;
42 } 42 }
43 43
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageRecordBizTypeEnum.java
1 package cn.iocoder.yudao.module.trade.enums.brokerage; 1 package cn.iocoder.yudao.module.trade.enums.brokerage;
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,14 +13,14 @@ import java.util.Arrays; @@ -13,14 +13,14 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum BrokerageRecordBizTypeEnum implements IntArrayValuable { 16 +public enum BrokerageRecordBizTypeEnum implements ArrayValuable<Integer> {
17 17
18 ORDER(1, "获得推广佣金", "获得推广佣金 {}", true), 18 ORDER(1, "获得推广佣金", "获得推广佣金 {}", true),
19 WITHDRAW(2, "提现申请", "提现申请扣除佣金 {}", false), 19 WITHDRAW(2, "提现申请", "提现申请扣除佣金 {}", false),
20 WITHDRAW_REJECT(3, "提现申请驳回", "提现申请驳回,返还佣金 {}", true), 20 WITHDRAW_REJECT(3, "提现申请驳回", "提现申请驳回,返还佣金 {}", true),
21 ; 21 ;
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BrokerageRecordBizTypeEnum::getType).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BrokerageRecordBizTypeEnum::getType).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 类型 26 * 类型
@@ -40,7 +40,7 @@ public enum BrokerageRecordBizTypeEnum implements IntArrayValuable { @@ -40,7 +40,7 @@ public enum BrokerageRecordBizTypeEnum implements IntArrayValuable {
40 private final boolean add; 40 private final boolean add;
41 41
42 @Override 42 @Override
43 - public int[] array() { 43 + public Integer[] array() {
44 return ARRAYS; 44 return ARRAYS;
45 } 45 }
46 46
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageRecordStatusEnum.java
1 package cn.iocoder.yudao.module.trade.enums.brokerage; 1 package cn.iocoder.yudao.module.trade.enums.brokerage;
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,14 +13,14 @@ import java.util.Arrays; @@ -13,14 +13,14 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum BrokerageRecordStatusEnum implements IntArrayValuable { 16 +public enum BrokerageRecordStatusEnum implements ArrayValuable<Integer> {
17 17
18 WAIT_SETTLEMENT(0, "待结算"), 18 WAIT_SETTLEMENT(0, "待结算"),
19 SETTLEMENT(1, "已结算"), 19 SETTLEMENT(1, "已结算"),
20 CANCEL(2, "已取消"), 20 CANCEL(2, "已取消"),
21 ; 21 ;
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BrokerageRecordStatusEnum::getStatus).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BrokerageRecordStatusEnum::getStatus).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 状态 26 * 状态
@@ -32,7 +32,7 @@ public enum BrokerageRecordStatusEnum implements IntArrayValuable { @@ -32,7 +32,7 @@ public enum BrokerageRecordStatusEnum implements IntArrayValuable {
32 private final String name; 32 private final String name;
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageWithdrawStatusEnum.java
1 package cn.iocoder.yudao.module.trade.enums.brokerage; 1 package cn.iocoder.yudao.module.trade.enums.brokerage;
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
@@ -14,7 +14,7 @@ import java.util.Arrays; @@ -14,7 +14,7 @@ import java.util.Arrays;
14 */ 14 */
15 @AllArgsConstructor 15 @AllArgsConstructor
16 @Getter 16 @Getter
17 -public enum BrokerageWithdrawStatusEnum implements IntArrayValuable { 17 +public enum BrokerageWithdrawStatusEnum implements ArrayValuable<Integer> {
18 18
19 AUDITING(0, "审核中"), 19 AUDITING(0, "审核中"),
20 AUDIT_SUCCESS(10, "审核通过"), 20 AUDIT_SUCCESS(10, "审核通过"),
@@ -23,7 +23,7 @@ public enum BrokerageWithdrawStatusEnum implements IntArrayValuable { @@ -23,7 +23,7 @@ public enum BrokerageWithdrawStatusEnum implements IntArrayValuable {
23 WITHDRAW_FAIL(21, "提现失败"), 23 WITHDRAW_FAIL(21, "提现失败"),
24 ; 24 ;
25 25
26 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BrokerageWithdrawStatusEnum::getStatus).toArray(); 26 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BrokerageWithdrawStatusEnum::getStatus).toArray(Integer[]::new);
27 27
28 /** 28 /**
29 * 状态 29 * 状态
@@ -35,7 +35,7 @@ public enum BrokerageWithdrawStatusEnum implements IntArrayValuable { @@ -35,7 +35,7 @@ public enum BrokerageWithdrawStatusEnum implements IntArrayValuable {
35 private final String name; 35 private final String name;
36 36
37 @Override 37 @Override
38 - public int[] array() { 38 + public Integer[] array() {
39 return ARRAYS; 39 return ARRAYS;
40 } 40 }
41 41
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageWithdrawTypeEnum.java
1 package cn.iocoder.yudao.module.trade.enums.brokerage; 1 package cn.iocoder.yudao.module.trade.enums.brokerage;
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,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum BrokerageWithdrawTypeEnum implements IntArrayValuable { 16 +public enum BrokerageWithdrawTypeEnum implements ArrayValuable<Integer> {
17 17
18 WALLET(1, "钱包"), 18 WALLET(1, "钱包"),
19 BANK(2, "银行卡"), 19 BANK(2, "银行卡"),
@@ -22,7 +22,7 @@ public enum BrokerageWithdrawTypeEnum implements IntArrayValuable { @@ -22,7 +22,7 @@ public enum BrokerageWithdrawTypeEnum implements IntArrayValuable {
22 WECHAT_API(5, "微信零钱"), // 自动打款,通过微信转账 API 22 WECHAT_API(5, "微信零钱"), // 自动打款,通过微信转账 API
23 ; 23 ;
24 24
25 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BrokerageWithdrawTypeEnum::getType).toArray(); 25 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BrokerageWithdrawTypeEnum::getType).toArray(Integer[]::new);
26 26
27 /** 27 /**
28 * 类型 28 * 类型
@@ -34,7 +34,7 @@ public enum BrokerageWithdrawTypeEnum implements IntArrayValuable { @@ -34,7 +34,7 @@ public enum BrokerageWithdrawTypeEnum implements IntArrayValuable {
34 private final String name; 34 private final String name;
35 35
36 @Override 36 @Override
37 - public int[] array() { 37 + public Integer[] array() {
38 return ARRAYS; 38 return ARRAYS;
39 } 39 }
40 40
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/delivery/DeliveryExpressChargeModeEnum.java
1 package cn.iocoder.yudao.module.trade.enums.delivery; 1 package cn.iocoder.yudao.module.trade.enums.delivery;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,13 +14,13 @@ import java.util.Arrays; @@ -14,13 +14,13 @@ import java.util.Arrays;
14 */ 14 */
15 @AllArgsConstructor 15 @AllArgsConstructor
16 @Getter 16 @Getter
17 -public enum DeliveryExpressChargeModeEnum implements IntArrayValuable { 17 +public enum DeliveryExpressChargeModeEnum implements ArrayValuable<Integer> {
18 18
19 COUNT(1, "按件"), 19 COUNT(1, "按件"),
20 WEIGHT(2,"按重量"), 20 WEIGHT(2,"按重量"),
21 VOLUME(3, "按体积"); 21 VOLUME(3, "按体积");
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DeliveryExpressChargeModeEnum::getType).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(DeliveryExpressChargeModeEnum::getType).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 类型 26 * 类型
@@ -32,7 +32,7 @@ public enum DeliveryExpressChargeModeEnum implements IntArrayValuable { @@ -32,7 +32,7 @@ public enum DeliveryExpressChargeModeEnum implements IntArrayValuable {
32 private final String desc; 32 private final String desc;
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/delivery/DeliveryTypeEnum.java
1 package cn.iocoder.yudao.module.trade.enums.delivery; 1 package cn.iocoder.yudao.module.trade.enums.delivery;
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 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum DeliveryTypeEnum implements IntArrayValuable { 16 +public enum DeliveryTypeEnum implements ArrayValuable<Integer> {
17 17
18 EXPRESS(1, "快递发货"), 18 EXPRESS(1, "快递发货"),
19 PICK_UP(2, "用户自提"),; 19 PICK_UP(2, "用户自提"),;
20 20
21 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DeliveryTypeEnum::getType).toArray(); 21 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(DeliveryTypeEnum::getType).toArray(Integer[]::new);
22 22
23 /** 23 /**
24 * 配送方式 24 * 配送方式
@@ -30,7 +30,7 @@ public enum DeliveryTypeEnum implements IntArrayValuable { @@ -30,7 +30,7 @@ public enum DeliveryTypeEnum implements IntArrayValuable {
30 private final String name; 30 private final String name;
31 31
32 @Override 32 @Override
33 - public int[] array() { 33 + public Integer[] array() {
34 return ARRAYS; 34 return ARRAYS;
35 } 35 }
36 36
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderCancelTypeEnum.java
1 package cn.iocoder.yudao.module.trade.enums.order; 1 package cn.iocoder.yudao.module.trade.enums.order;
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 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -13,14 +13,14 @@ import java.util.Arrays; @@ -13,14 +13,14 @@ import java.util.Arrays;
13 */ 13 */
14 @RequiredArgsConstructor 14 @RequiredArgsConstructor
15 @Getter 15 @Getter
16 -public enum TradeOrderCancelTypeEnum implements IntArrayValuable { 16 +public enum TradeOrderCancelTypeEnum implements ArrayValuable<Integer> {
17 17
18 PAY_TIMEOUT(10, "超时未支付"), 18 PAY_TIMEOUT(10, "超时未支付"),
19 AFTER_SALE_CLOSE(20, "退款关闭"), 19 AFTER_SALE_CLOSE(20, "退款关闭"),
20 MEMBER_CANCEL(30, "买家取消"), 20 MEMBER_CANCEL(30, "买家取消"),
21 COMBINATION_CLOSE(40, "拼团关闭"); 21 COMBINATION_CLOSE(40, "拼团关闭");
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TradeOrderCancelTypeEnum::getType).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(TradeOrderCancelTypeEnum::getType).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 关闭类型 26 * 关闭类型
@@ -32,7 +32,7 @@ public enum TradeOrderCancelTypeEnum implements IntArrayValuable { @@ -32,7 +32,7 @@ public enum TradeOrderCancelTypeEnum implements IntArrayValuable {
32 private final String name; 32 private final String name;
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderItemAfterSaleStatusEnum.java
1 package cn.iocoder.yudao.module.trade.enums.order; 1 package cn.iocoder.yudao.module.trade.enums.order;
2 2
3 import cn.hutool.core.util.ObjectUtil; 3 import cn.hutool.core.util.ObjectUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.Getter; 5 import lombok.Getter;
6 import lombok.RequiredArgsConstructor; 6 import lombok.RequiredArgsConstructor;
7 7
@@ -14,13 +14,13 @@ import java.util.Arrays; @@ -14,13 +14,13 @@ import java.util.Arrays;
14 */ 14 */
15 @RequiredArgsConstructor 15 @RequiredArgsConstructor
16 @Getter 16 @Getter
17 -public enum TradeOrderItemAfterSaleStatusEnum implements IntArrayValuable { 17 +public enum TradeOrderItemAfterSaleStatusEnum implements ArrayValuable<Integer> {
18 18
19 NONE(0, "未售后"), 19 NONE(0, "未售后"),
20 APPLY(10, "售后中"), 20 APPLY(10, "售后中"),
21 SUCCESS(20, "售后成功"); 21 SUCCESS(20, "售后成功");
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TradeOrderItemAfterSaleStatusEnum::getStatus).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(TradeOrderItemAfterSaleStatusEnum::getStatus).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 状态值 26 * 状态值
@@ -32,7 +32,7 @@ public enum TradeOrderItemAfterSaleStatusEnum implements IntArrayValuable { @@ -32,7 +32,7 @@ public enum TradeOrderItemAfterSaleStatusEnum implements IntArrayValuable {
32 private final String name; 32 private final String name;
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderRefundStatusEnum.java
1 package cn.iocoder.yudao.module.trade.enums.order; 1 package cn.iocoder.yudao.module.trade.enums.order;
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 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -13,13 +13,13 @@ import java.util.Arrays; @@ -13,13 +13,13 @@ import java.util.Arrays;
13 */ 13 */
14 @RequiredArgsConstructor 14 @RequiredArgsConstructor
15 @Getter 15 @Getter
16 -public enum TradeOrderRefundStatusEnum implements IntArrayValuable { 16 +public enum TradeOrderRefundStatusEnum implements ArrayValuable<Integer> {
17 17
18 NONE(0, "未退款"), 18 NONE(0, "未退款"),
19 PART(10, "部分退款"), 19 PART(10, "部分退款"),
20 ALL(20, "全部退款"); 20 ALL(20, "全部退款");
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TradeOrderRefundStatusEnum::getStatus).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(TradeOrderRefundStatusEnum::getStatus).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 状态值 25 * 状态值
@@ -31,7 +31,7 @@ public enum TradeOrderRefundStatusEnum implements IntArrayValuable { @@ -31,7 +31,7 @@ public enum TradeOrderRefundStatusEnum 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-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderStatusEnum.java
1 package cn.iocoder.yudao.module.trade.enums.order; 1 package cn.iocoder.yudao.module.trade.enums.order;
2 2
3 import cn.hutool.core.util.ObjectUtil; 3 import cn.hutool.core.util.ObjectUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; 5 import cn.iocoder.yudao.framework.common.util.object.ObjectUtils;
6 import lombok.Getter; 6 import lombok.Getter;
7 import lombok.RequiredArgsConstructor; 7 import lombok.RequiredArgsConstructor;
@@ -15,7 +15,7 @@ import java.util.Arrays; @@ -15,7 +15,7 @@ import java.util.Arrays;
15 */ 15 */
16 @RequiredArgsConstructor 16 @RequiredArgsConstructor
17 @Getter 17 @Getter
18 -public enum TradeOrderStatusEnum implements IntArrayValuable { 18 +public enum TradeOrderStatusEnum implements ArrayValuable<Integer> {
19 19
20 UNPAID(0, "待支付"), 20 UNPAID(0, "待支付"),
21 UNDELIVERED(10, "待发货"), 21 UNDELIVERED(10, "待发货"),
@@ -23,7 +23,7 @@ public enum TradeOrderStatusEnum implements IntArrayValuable { @@ -23,7 +23,7 @@ public enum TradeOrderStatusEnum implements IntArrayValuable {
23 COMPLETED(30, "已完成"), 23 COMPLETED(30, "已完成"),
24 CANCELED(40, "已取消"); 24 CANCELED(40, "已取消");
25 25
26 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TradeOrderStatusEnum::getStatus).toArray(); 26 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(TradeOrderStatusEnum::getStatus).toArray(Integer[]::new);
27 27
28 /** 28 /**
29 * 状态值 29 * 状态值
@@ -35,7 +35,7 @@ public enum TradeOrderStatusEnum implements IntArrayValuable { @@ -35,7 +35,7 @@ public enum TradeOrderStatusEnum implements IntArrayValuable {
35 private final String name; 35 private final String name;
36 36
37 @Override 37 @Override
38 - public int[] array() { 38 + public Integer[] array() {
39 return ARRAYS; 39 return ARRAYS;
40 } 40 }
41 41
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderTypeEnum.java
1 package cn.iocoder.yudao.module.trade.enums.order; 1 package cn.iocoder.yudao.module.trade.enums.order;
2 2
3 import cn.hutool.core.util.ObjectUtil; 3 import cn.hutool.core.util.ObjectUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.Getter; 5 import lombok.Getter;
6 import lombok.RequiredArgsConstructor; 6 import lombok.RequiredArgsConstructor;
7 7
@@ -14,7 +14,7 @@ import java.util.Arrays; @@ -14,7 +14,7 @@ import java.util.Arrays;
14 */ 14 */
15 @RequiredArgsConstructor 15 @RequiredArgsConstructor
16 @Getter 16 @Getter
17 -public enum TradeOrderTypeEnum implements IntArrayValuable { 17 +public enum TradeOrderTypeEnum implements ArrayValuable<Integer> {
18 18
19 NORMAL(0, "普通订单"), 19 NORMAL(0, "普通订单"),
20 SECKILL(1, "秒杀订单"), 20 SECKILL(1, "秒杀订单"),
@@ -23,7 +23,7 @@ public enum TradeOrderTypeEnum implements IntArrayValuable { @@ -23,7 +23,7 @@ public enum TradeOrderTypeEnum implements IntArrayValuable {
23 POINT(4, "积分商城"), 23 POINT(4, "积分商城"),
24 ; 24 ;
25 25
26 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TradeOrderTypeEnum::getType).toArray(); 26 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(TradeOrderTypeEnum::getType).toArray(Integer[]::new);
27 27
28 /** 28 /**
29 * 类型 29 * 类型
@@ -35,7 +35,7 @@ public enum TradeOrderTypeEnum implements IntArrayValuable { @@ -35,7 +35,7 @@ public enum TradeOrderTypeEnum implements IntArrayValuable {
35 private final String name; 35 private final String name;
36 36
37 @Override 37 @Override
38 - public int[] array() { 38 + public Integer[] array() {
39 return ARRAYS; 39 return ARRAYS;
40 } 40 }
41 41
yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/enums/point/MemberPointBizTypeEnum.java
1 package cn.iocoder.yudao.module.member.enums.point; 1 package cn.iocoder.yudao.module.member.enums.point;
2 2
3 import cn.hutool.core.util.EnumUtil; 3 import cn.hutool.core.util.EnumUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,7 +14,7 @@ import java.util.Objects; @@ -14,7 +14,7 @@ import java.util.Objects;
14 */ 14 */
15 @AllArgsConstructor 15 @AllArgsConstructor
16 @Getter 16 @Getter
17 -public enum MemberPointBizTypeEnum implements IntArrayValuable { 17 +public enum MemberPointBizTypeEnum implements ArrayValuable<Integer> {
18 18
19 SIGN(1, "签到", "签到获得 {} 积分", true), 19 SIGN(1, "签到", "签到获得 {} 积分", true),
20 ADMIN(2, "管理员修改", "管理员修改 {} 积分", true), 20 ADMIN(2, "管理员修改", "管理员修改 {} 积分", true),
@@ -46,8 +46,8 @@ public enum MemberPointBizTypeEnum implements IntArrayValuable { @@ -46,8 +46,8 @@ public enum MemberPointBizTypeEnum implements IntArrayValuable {
46 private final boolean add; 46 private final boolean add;
47 47
48 @Override 48 @Override
49 - public int[] array() {  
50 - return new int[0]; 49 + public Integer[] array() {
  50 + return new Integer[0];
51 } 51 }
52 52
53 public static MemberPointBizTypeEnum getByType(Integer type) { 53 public static MemberPointBizTypeEnum getByType(Integer type) {
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/order/PayOrderStatusEnum.java
1 package cn.iocoder.yudao.module.pay.enums.order; 1 package cn.iocoder.yudao.module.pay.enums.order;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; 4 import cn.iocoder.yudao.framework.common.util.object.ObjectUtils;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
@@ -14,7 +14,7 @@ import java.util.Objects; @@ -14,7 +14,7 @@ import java.util.Objects;
14 */ 14 */
15 @Getter 15 @Getter
16 @AllArgsConstructor 16 @AllArgsConstructor
17 -public enum PayOrderStatusEnum implements IntArrayValuable { 17 +public enum PayOrderStatusEnum implements ArrayValuable<Integer> {
18 18
19 WAITING(0, "未支付"), 19 WAITING(0, "未支付"),
20 SUCCESS(10, "支付成功"), 20 SUCCESS(10, "支付成功"),
@@ -26,8 +26,8 @@ public enum PayOrderStatusEnum implements IntArrayValuable { @@ -26,8 +26,8 @@ public enum PayOrderStatusEnum implements IntArrayValuable {
26 private final String name; 26 private final String name;
27 27
28 @Override 28 @Override
29 - public int[] array() {  
30 - return new int[0]; 29 + public Integer[] array() {
  30 + return new Integer[0];
31 } 31 }
32 32
33 /** 33 /**
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/transfer/PayTransferTypeEnum.java
1 package cn.iocoder.yudao.module.pay.enums.transfer; 1 package cn.iocoder.yudao.module.pay.enums.transfer;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,7 +14,7 @@ import java.util.Arrays; @@ -14,7 +14,7 @@ import java.util.Arrays;
14 */ 14 */
15 @AllArgsConstructor 15 @AllArgsConstructor
16 @Getter 16 @Getter
17 -public enum PayTransferTypeEnum implements IntArrayValuable { 17 +public enum PayTransferTypeEnum implements ArrayValuable<Integer> {
18 18
19 ALIPAY_BALANCE(1, "支付宝余额"), 19 ALIPAY_BALANCE(1, "支付宝余额"),
20 WX_BALANCE(2, "微信余额"), 20 WX_BALANCE(2, "微信余额"),
@@ -30,10 +30,10 @@ public enum PayTransferTypeEnum implements IntArrayValuable { @@ -30,10 +30,10 @@ public enum PayTransferTypeEnum implements IntArrayValuable {
30 private final Integer type; 30 private final Integer type;
31 private final String name; 31 private final String name;
32 32
33 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PayTransferTypeEnum::getType).toArray(); 33 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PayTransferTypeEnum::getType).toArray(Integer[]::new);
34 34
35 @Override 35 @Override
36 - public int[] array() { 36 + public Integer[] array() {
37 return ARRAYS; 37 return ARRAYS;
38 } 38 }
39 39
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/wallet/PayWalletBizTypeEnum.java
1 package cn.iocoder.yudao.module.pay.enums.wallet; 1 package cn.iocoder.yudao.module.pay.enums.wallet;
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,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum PayWalletBizTypeEnum implements IntArrayValuable { 16 +public enum PayWalletBizTypeEnum implements ArrayValuable<Integer> {
17 17
18 RECHARGE(1, "充值"), 18 RECHARGE(1, "充值"),
19 RECHARGE_REFUND(2, "充值退款"), 19 RECHARGE_REFUND(2, "充值退款"),
@@ -31,10 +31,10 @@ public enum PayWalletBizTypeEnum implements IntArrayValuable { @@ -31,10 +31,10 @@ public enum PayWalletBizTypeEnum implements IntArrayValuable {
31 */ 31 */
32 private final String description; 32 private final String description;
33 33
34 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PayWalletBizTypeEnum::getType).toArray(); 34 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PayWalletBizTypeEnum::getType).toArray(Integer[]::new);
35 35
36 @Override 36 @Override
37 - public int[] array() { 37 + public Integer[] array() {
38 return ARRAYS; 38 return ARRAYS;
39 } 39 }
40 40
yudao-module-pay/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/enums/transfer/PayTransferTypeEnum.java
1 package cn.iocoder.yudao.framework.pay.core.enums.transfer; 1 package cn.iocoder.yudao.framework.pay.core.enums.transfer;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,7 +14,7 @@ import java.util.Arrays; @@ -14,7 +14,7 @@ import java.util.Arrays;
14 */ 14 */
15 @AllArgsConstructor 15 @AllArgsConstructor
16 @Getter 16 @Getter
17 -public enum PayTransferTypeEnum implements IntArrayValuable { 17 +public enum PayTransferTypeEnum implements ArrayValuable<Integer> {
18 18
19 ALIPAY_BALANCE(1, "支付宝余额"), 19 ALIPAY_BALANCE(1, "支付宝余额"),
20 WX_BALANCE(2, "微信余额"), 20 WX_BALANCE(2, "微信余额"),
@@ -30,10 +30,10 @@ public enum PayTransferTypeEnum implements IntArrayValuable { @@ -30,10 +30,10 @@ public enum PayTransferTypeEnum implements IntArrayValuable {
30 private final Integer type; 30 private final Integer type;
31 private final String name; 31 private final String name;
32 32
33 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PayTransferTypeEnum::getType).toArray(); 33 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PayTransferTypeEnum::getType).toArray(Integer[]::new);
34 34
35 @Override 35 @Override
36 - public int[] array() { 36 + public Integer[] array() {
37 return ARRAYS; 37 return ARRAYS;
38 } 38 }
39 39
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/permission/DataScopeEnum.java
1 package cn.iocoder.yudao.module.system.enums.permission; 1 package cn.iocoder.yudao.module.system.enums.permission;
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
@@ -15,7 +15,7 @@ import java.util.Arrays; @@ -15,7 +15,7 @@ import java.util.Arrays;
15 */ 15 */
16 @Getter 16 @Getter
17 @AllArgsConstructor 17 @AllArgsConstructor
18 -public enum DataScopeEnum implements IntArrayValuable { 18 +public enum DataScopeEnum implements ArrayValuable<Integer> {
19 19
20 ALL(1), // 全部数据权限 20 ALL(1), // 全部数据权限
21 21
@@ -30,10 +30,10 @@ public enum DataScopeEnum implements IntArrayValuable { @@ -30,10 +30,10 @@ public enum DataScopeEnum implements IntArrayValuable {
30 */ 30 */
31 private final Integer scope; 31 private final Integer scope;
32 32
33 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DataScopeEnum::getScope).toArray(); 33 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(DataScopeEnum::getScope).toArray(Integer[]::new);
34 34
35 @Override 35 @Override
36 - public int[] array() { 36 + public Integer[] array() {
37 return ARRAYS; 37 return ARRAYS;
38 } 38 }
39 39
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/sms/SmsSceneEnum.java
1 package cn.iocoder.yudao.module.system.enums.sms; 1 package cn.iocoder.yudao.module.system.enums.sms;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,7 +14,7 @@ import java.util.Arrays; @@ -14,7 +14,7 @@ import java.util.Arrays;
14 */ 14 */
15 @Getter 15 @Getter
16 @AllArgsConstructor 16 @AllArgsConstructor
17 -public enum SmsSceneEnum implements IntArrayValuable { 17 +public enum SmsSceneEnum implements ArrayValuable<Integer> {
18 18
19 MEMBER_LOGIN(1, "user-sms-login", "会员用户 - 手机号登陆"), 19 MEMBER_LOGIN(1, "user-sms-login", "会员用户 - 手机号登陆"),
20 MEMBER_UPDATE_MOBILE(2, "user-update-mobile", "会员用户 - 修改手机"), 20 MEMBER_UPDATE_MOBILE(2, "user-update-mobile", "会员用户 - 修改手机"),
@@ -23,7 +23,7 @@ public enum SmsSceneEnum implements IntArrayValuable { @@ -23,7 +23,7 @@ public enum SmsSceneEnum implements IntArrayValuable {
23 23
24 ADMIN_MEMBER_LOGIN(21, "admin-sms-login", "后台用户 - 手机号登录"); 24 ADMIN_MEMBER_LOGIN(21, "admin-sms-login", "后台用户 - 手机号登录");
25 25
26 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(SmsSceneEnum::getScene).toArray(); 26 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(SmsSceneEnum::getScene).toArray(Integer[]::new);
27 27
28 /** 28 /**
29 * 验证场景的编号 29 * 验证场景的编号
@@ -39,7 +39,7 @@ public enum SmsSceneEnum implements IntArrayValuable { @@ -39,7 +39,7 @@ public enum SmsSceneEnum implements IntArrayValuable {
39 private final String description; 39 private final String description;
40 40
41 @Override 41 @Override
42 - public int[] array() { 42 + public Integer[] array() {
43 return ARRAYS; 43 return ARRAYS;
44 } 44 }
45 45
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/social/SocialTypeEnum.java
1 package cn.iocoder.yudao.module.system.enums.social; 1 package cn.iocoder.yudao.module.system.enums.social;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,7 +14,7 @@ import java.util.Arrays; @@ -14,7 +14,7 @@ import java.util.Arrays;
14 */ 14 */
15 @Getter 15 @Getter
16 @AllArgsConstructor 16 @AllArgsConstructor
17 -public enum SocialTypeEnum implements IntArrayValuable { 17 +public enum SocialTypeEnum implements ArrayValuable<Integer> {
18 18
19 /** 19 /**
20 * Gitee 20 * Gitee
@@ -55,7 +55,7 @@ public enum SocialTypeEnum implements IntArrayValuable { @@ -55,7 +55,7 @@ public enum SocialTypeEnum implements IntArrayValuable {
55 WECHAT_MINI_APP(34, "WECHAT_MINI_APP"), 55 WECHAT_MINI_APP(34, "WECHAT_MINI_APP"),
56 ; 56 ;
57 57
58 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(SocialTypeEnum::getType).toArray(); 58 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(SocialTypeEnum::getType).toArray(Integer[]::new);
59 59
60 /** 60 /**
61 * 类型 61 * 类型
@@ -67,7 +67,7 @@ public enum SocialTypeEnum implements IntArrayValuable { @@ -67,7 +67,7 @@ public enum SocialTypeEnum implements IntArrayValuable {
67 private final String source; 67 private final String source;
68 68
69 @Override 69 @Override
70 - public int[] array() { 70 + public Integer[] array() {
71 return ARRAYS; 71 return ARRAYS;
72 } 72 }
73 73