Commit d83b7cd5b9d5d3e5817f51d22777fada6b1f6b4b
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 | 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 | 16 | \ No newline at end of file | ... | ... |
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/CommonStatusEnum.java
| 1 | 1 | package cn.iocoder.yudao.framework.common.enums; |
| 2 | 2 | |
| 3 | 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 | 5 | import lombok.AllArgsConstructor; |
| 6 | 6 | import lombok.Getter; |
| 7 | 7 | |
| ... | ... | @@ -14,12 +14,12 @@ import java.util.Arrays; |
| 14 | 14 | */ |
| 15 | 15 | @Getter |
| 16 | 16 | @AllArgsConstructor |
| 17 | -public enum CommonStatusEnum implements IntArrayValuable { | |
| 17 | +public enum CommonStatusEnum implements ArrayValuable<Integer> { | |
| 18 | 18 | |
| 19 | 19 | ENABLE(0, "开启"), |
| 20 | 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 | 31 | private final String name; |
| 32 | 32 | |
| 33 | 33 | @Override |
| 34 | - public int[] array() { | |
| 34 | + public Integer[] array() { | |
| 35 | 35 | return ARRAYS; |
| 36 | 36 | } |
| 37 | 37 | ... | ... |
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/DateIntervalEnum.java
| 1 | 1 | package cn.iocoder.yudao.framework.common.enums; |
| 2 | 2 | |
| 3 | 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 | 5 | import lombok.AllArgsConstructor; |
| 6 | 6 | import lombok.Getter; |
| 7 | 7 | |
| ... | ... | @@ -14,7 +14,7 @@ import java.util.Arrays; |
| 14 | 14 | */ |
| 15 | 15 | @Getter |
| 16 | 16 | @AllArgsConstructor |
| 17 | -public enum DateIntervalEnum implements IntArrayValuable { | |
| 17 | +public enum DateIntervalEnum implements ArrayValuable<Integer> { | |
| 18 | 18 | |
| 19 | 19 | DAY(1, "天"), |
| 20 | 20 | WEEK(2, "周"), |
| ... | ... | @@ -23,7 +23,7 @@ public enum DateIntervalEnum implements IntArrayValuable { |
| 23 | 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 | 35 | private final String name; |
| 36 | 36 | |
| 37 | 37 | @Override |
| 38 | - public int[] array() { | |
| 38 | + public Integer[] array() { | |
| 39 | 39 | return ARRAYS; |
| 40 | 40 | } |
| 41 | 41 | ... | ... |
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/TerminalEnum.java
| 1 | 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 | 4 | import lombok.Getter; |
| 5 | 5 | import lombok.RequiredArgsConstructor; |
| 6 | 6 | |
| ... | ... | @@ -13,7 +13,7 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @RequiredArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum TerminalEnum implements IntArrayValuable { | |
| 16 | +public enum TerminalEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | UNKNOWN(0, "未知"), // 目的:在无法解析到 terminal 时,使用它 |
| 19 | 19 | WECHAT_MINI_PROGRAM(10, "微信小程序"), |
| ... | ... | @@ -22,7 +22,7 @@ public enum TerminalEnum implements IntArrayValuable { |
| 22 | 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 | 34 | private final String name; |
| 35 | 35 | |
| 36 | 36 | @Override |
| 37 | - public int[] array() { | |
| 37 | + public Integer[] array() { | |
| 38 | 38 | return ARRAYS; |
| 39 | 39 | } |
| 40 | 40 | } | ... | ... |
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/UserTypeEnum.java
| 1 | 1 | package cn.iocoder.yudao.framework.common.enums; |
| 2 | 2 | |
| 3 | 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 | 5 | import lombok.AllArgsConstructor; |
| 6 | 6 | import lombok.Getter; |
| 7 | 7 | |
| ... | ... | @@ -12,12 +12,12 @@ import java.util.Arrays; |
| 12 | 12 | */ |
| 13 | 13 | @AllArgsConstructor |
| 14 | 14 | @Getter |
| 15 | -public enum UserTypeEnum implements IntArrayValuable { | |
| 15 | +public enum UserTypeEnum implements ArrayValuable<Integer> { | |
| 16 | 16 | |
| 17 | 17 | MEMBER(1, "会员"), // 面向 c 端,普通用户 |
| 18 | 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 | 33 | } |
| 34 | 34 | |
| 35 | 35 | @Override |
| 36 | - public int[] array() { | |
| 36 | + public Integer[] array() { | |
| 37 | 37 | return ARRAYS; |
| 38 | 38 | } |
| 39 | 39 | } | ... | ... |
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnum.java
| 1 | 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 | 4 | import jakarta.validation.Constraint; |
| 6 | 5 | import jakarta.validation.Payload; |
| 6 | + | |
| 7 | 7 | import java.lang.annotation.*; |
| 8 | 8 | |
| 9 | 9 | @Target({ |
| ... | ... | @@ -22,9 +22,9 @@ import java.lang.annotation.*; |
| 22 | 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 | 29 | String message() default "必须在指定范围 {value}"; |
| 30 | 30 | ... | ... |
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnumCollectionValidator.java
| 1 | 1 | package cn.iocoder.yudao.framework.common.validation; |
| 2 | 2 | |
| 3 | 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 | 5 | import jakarta.validation.ConstraintValidator; |
| 7 | 6 | import jakarta.validation.ConstraintValidatorContext; |
| 7 | + | |
| 8 | 8 | import java.util.Arrays; |
| 9 | 9 | import java.util.Collection; |
| 10 | 10 | import java.util.Collections; |
| 11 | 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 | 17 | @Override |
| 19 | 18 | public void initialize(InEnum annotation) { |
| 20 | - IntArrayValuable[] values = annotation.value().getEnumConstants(); | |
| 19 | + ArrayValuable<?>[] values = annotation.value().getEnumConstants(); | |
| 21 | 20 | if (values.length == 0) { |
| 22 | 21 | this.values = Collections.emptyList(); |
| 23 | 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 | 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 | 33 | if (CollUtil.containsAll(values, list)) { |
| 32 | 34 | return true; |
| 33 | 35 | } |
| 34 | - // 校验不通过,自定义提示语句(因为,注解上的 value 是枚举类,无法获得枚举类的实际值) | |
| 36 | + // 校验不通过,自定义提示语句 | |
| 35 | 37 | context.disableDefaultConstraintViolation(); // 禁用默认的 message 的值 |
| 36 | 38 | context.buildConstraintViolationWithTemplate(context.getDefaultConstraintMessageTemplate() |
| 37 | 39 | .replaceAll("\\{value}", CollUtil.join(list, ","))).addConstraintViolation(); // 重新添加错误提示语句 | ... | ... |
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnumValidator.java
| 1 | 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 | 4 | import jakarta.validation.ConstraintValidator; |
| 6 | 5 | import jakarta.validation.ConstraintValidatorContext; |
| 6 | + | |
| 7 | 7 | import java.util.Arrays; |
| 8 | 8 | import java.util.Collections; |
| 9 | 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 | 15 | @Override |
| 17 | 16 | public void initialize(InEnum annotation) { |
| 18 | - IntArrayValuable[] values = annotation.value().getEnumConstants(); | |
| 17 | + ArrayValuable<?>[] values = annotation.value().getEnumConstants(); | |
| 19 | 18 | if (values.length == 0) { |
| 20 | 19 | this.values = Collections.emptyList(); |
| 21 | 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 | 25 | @Override |
| 27 | - public boolean isValid(Integer value, ConstraintValidatorContext context) { | |
| 26 | + public boolean isValid(Object value, ConstraintValidatorContext context) { | |
| 28 | 27 | // 为空时,默认不校验,即认为通过 |
| 29 | 28 | if (value == null) { |
| 30 | 29 | return true; |
| ... | ... | @@ -33,7 +32,7 @@ public class InEnumValidator implements ConstraintValidator<InEnum, Integer> { |
| 33 | 32 | if (values.contains(value)) { |
| 34 | 33 | return true; |
| 35 | 34 | } |
| 36 | - // 校验不通过,自定义提示语句(因为,注解上的 value 是枚举类,无法获得枚举类的实际值) | |
| 35 | + // 校验不通过,自定义提示语句 | |
| 37 | 36 | context.disableDefaultConstraintViolation(); // 禁用默认的 message 的值 |
| 38 | 37 | context.buildConstraintViolationWithTemplate(context.getDefaultConstraintMessageTemplate() |
| 39 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,7 +13,7 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum AreaTypeEnum implements IntArrayValuable { | |
| 16 | +public enum AreaTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | COUNTRY(1, "国家"), |
| 19 | 19 | PROVINCE(2, "省份"), |
| ... | ... | @@ -21,7 +21,7 @@ public enum AreaTypeEnum implements IntArrayValuable { |
| 21 | 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 | 33 | private final String name; |
| 34 | 34 | |
| 35 | 35 | @Override |
| 36 | - public int[] array() { | |
| 36 | + public Integer[] array() { | |
| 37 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,7 +13,7 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum AiKnowledgeDocumentStatusEnum implements IntArrayValuable { | |
| 16 | +public enum AiKnowledgeDocumentStatusEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | IN_PROGRESS(10, "索引中"), |
| 19 | 19 | SUCCESS(20, "可用"), |
| ... | ... | @@ -29,10 +29,10 @@ public enum AiKnowledgeDocumentStatusEnum implements IntArrayValuable { |
| 29 | 29 | */ |
| 30 | 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 | 34 | @Override |
| 35 | - public int[] array() { | |
| 35 | + public Integer[] array() { | |
| 36 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,7 +13,7 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum AiMusicGenerateModeEnum implements IntArrayValuable { | |
| 16 | +public enum AiMusicGenerateModeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | DESCRIPTION(1, "描述模式"), |
| 19 | 19 | LYRIC(2, "歌词模式"); |
| ... | ... | @@ -27,10 +27,10 @@ public enum AiMusicGenerateModeEnum implements IntArrayValuable { |
| 27 | 27 | */ |
| 28 | 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 | 32 | @Override |
| 33 | - public int[] array() { | |
| 33 | + public Integer[] array() { | |
| 34 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,7 +13,7 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum AiMusicStatusEnum implements IntArrayValuable { | |
| 16 | +public enum AiMusicStatusEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | IN_PROGRESS(10, "进行中"), |
| 19 | 19 | SUCCESS(20, "已完成"), |
| ... | ... | @@ -29,10 +29,10 @@ public enum AiMusicStatusEnum implements IntArrayValuable { |
| 29 | 29 | */ |
| 30 | 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 | 34 | @Override |
| 35 | - public int[] array() { | |
| 35 | + public Integer[] array() { | |
| 36 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,7 +13,7 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum AiWriteTypeEnum implements IntArrayValuable { | |
| 16 | +public enum AiWriteTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | WRITING(1, "撰写", "请撰写一篇关于 [{}] 的文章。文章的内容格式:{},语气:{},语言:{},长度:{}。请确保涵盖主要内容,不需要除了正文内容外的其他回复,如标题、额外的解释或道歉。"), |
| 19 | 19 | REPLY(2, "回复", "请针对如下内容:[{}] 做个回复。回复内容参考:[{}], 回复格式:{},语气:{},语言:{},长度:{}。不需要除了正文内容外的其他回复,如标题、开头、额外的解释或道歉。"); |
| ... | ... | @@ -32,10 +32,10 @@ public enum AiWriteTypeEnum implements IntArrayValuable { |
| 32 | 32 | */ |
| 33 | 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 | 37 | @Override |
| 38 | - public int[] array() { | |
| 38 | + public Integer[] array() { | |
| 39 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,19 +13,19 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @Getter |
| 15 | 15 | @AllArgsConstructor |
| 16 | -public enum BpmModelFormTypeEnum implements IntArrayValuable { | |
| 16 | +public enum BpmModelFormTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | NORMAL(10, "流程表单"), // 对应 BpmFormDO |
| 19 | 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 | 24 | private final Integer type; |
| 25 | 25 | private final String name; |
| 26 | 26 | |
| 27 | 27 | @Override |
| 28 | - public int[] array() { | |
| 28 | + public Integer[] array() { | |
| 29 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,18 +13,18 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @Getter |
| 15 | 15 | @AllArgsConstructor |
| 16 | -public enum BpmModelTypeEnum implements IntArrayValuable { | |
| 16 | +public enum BpmModelTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | BPMN(10, "BPMN 设计器"), // https://bpmn.io/toolkit/bpmn-js/ |
| 19 | 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 | 23 | private final Integer type; |
| 24 | 24 | private final String name; |
| 25 | 25 | |
| 26 | 26 | @Override |
| 27 | - public int[] array() { | |
| 27 | + public Integer[] array() { | |
| 28 | 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 | 1 | package cn.iocoder.yudao.module.bpm.enums.definition; |
| 2 | 2 | |
| 3 | 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 | 5 | import lombok.AllArgsConstructor; |
| 6 | 6 | import lombok.Getter; |
| 7 | 7 | |
| ... | ... | @@ -14,12 +14,12 @@ import java.util.Arrays; |
| 14 | 14 | */ |
| 15 | 15 | @Getter |
| 16 | 16 | @AllArgsConstructor |
| 17 | -public enum BpmSimpleModeConditionType implements IntArrayValuable { | |
| 17 | +public enum BpmSimpleModeConditionType implements ArrayValuable<Integer> { | |
| 18 | 18 | |
| 19 | 19 | EXPRESSION(1, "条件表达式"), |
| 20 | 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 | 24 | private final Integer type; |
| 25 | 25 | |
| ... | ... | @@ -30,7 +30,7 @@ public enum BpmSimpleModeConditionType implements IntArrayValuable { |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | @Override |
| 33 | - public int[] array() { | |
| 33 | + public Integer[] array() { | |
| 34 | 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 | 1 | package cn.iocoder.yudao.module.bpm.enums.definition; |
| 2 | 2 | |
| 3 | 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 | 5 | import lombok.AllArgsConstructor; |
| 6 | 6 | import lombok.Getter; |
| 7 | 7 | |
| ... | ... | @@ -15,7 +15,7 @@ import java.util.Objects; |
| 15 | 15 | */ |
| 16 | 16 | @Getter |
| 17 | 17 | @AllArgsConstructor |
| 18 | -public enum BpmSimpleModelNodeType implements IntArrayValuable { | |
| 18 | +public enum BpmSimpleModelNodeType implements ArrayValuable<Integer> { | |
| 19 | 19 | |
| 20 | 20 | // 0 ~ 1 开始和结束 |
| 21 | 21 | START_NODE(0, "startEvent", "开始节点"), |
| ... | ... | @@ -35,7 +35,7 @@ public enum BpmSimpleModelNodeType implements IntArrayValuable { |
| 35 | 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 | 40 | public static final String BPMN_USER_TASK_TYPE = "userTask"; |
| 41 | 41 | |
| ... | ... | @@ -69,7 +69,7 @@ public enum BpmSimpleModelNodeType implements IntArrayValuable { |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | @Override |
| 72 | - public int[] array() { | |
| 72 | + public Integer[] array() { | |
| 73 | 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 | 1 | package cn.iocoder.yudao.module.bpm.enums.definition; |
| 2 | 2 | |
| 3 | 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 | 5 | import lombok.AllArgsConstructor; |
| 6 | 6 | import lombok.Getter; |
| 7 | 7 | |
| ... | ... | @@ -14,7 +14,7 @@ import java.util.Arrays; |
| 14 | 14 | */ |
| 15 | 15 | @Getter |
| 16 | 16 | @AllArgsConstructor |
| 17 | -public enum BpmUserTaskApproveMethodEnum implements IntArrayValuable { | |
| 17 | +public enum BpmUserTaskApproveMethodEnum implements ArrayValuable<Integer> { | |
| 18 | 18 | |
| 19 | 19 | RANDOM(1, "随机挑选一人审批"), |
| 20 | 20 | RATIO(2, "多人会签(按通过比例)"), // 会签(按通过比例) |
| ... | ... | @@ -31,14 +31,14 @@ public enum BpmUserTaskApproveMethodEnum implements IntArrayValuable { |
| 31 | 31 | */ |
| 32 | 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 | 36 | public static BpmUserTaskApproveMethodEnum valueOf(Integer method) { |
| 37 | 37 | return ArrayUtil.firstMatch(item -> item.getMethod().equals(method), values()); |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | @Override |
| 41 | - public int[] array() { | |
| 41 | + public Integer[] array() { | |
| 42 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,18 +13,18 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @Getter |
| 15 | 15 | @AllArgsConstructor |
| 16 | -public enum BpmUserTaskApproveTypeEnum implements IntArrayValuable { | |
| 16 | +public enum BpmUserTaskApproveTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | USER(1), // 人工审批 |
| 19 | 19 | AUTO_APPROVE(2), // 自动通过 |
| 20 | 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 | 24 | private final Integer type; |
| 25 | 25 | |
| 26 | 26 | @Override |
| 27 | - public int[] array() { | |
| 27 | + public Integer[] array() { | |
| 28 | 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 | 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 | 4 | import lombok.Getter; |
| 5 | 5 | import lombok.RequiredArgsConstructor; |
| 6 | 6 | |
| ... | ... | @@ -13,7 +13,7 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @RequiredArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum BpmUserTaskAssignEmptyHandlerTypeEnum implements IntArrayValuable { | |
| 16 | +public enum BpmUserTaskAssignEmptyHandlerTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | APPROVE(1), // 自动通过 |
| 19 | 19 | REJECT(2), // 自动拒绝 |
| ... | ... | @@ -21,12 +21,12 @@ public enum BpmUserTaskAssignEmptyHandlerTypeEnum implements IntArrayValuable { |
| 21 | 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 | 26 | private final Integer type; |
| 27 | 27 | |
| 28 | 28 | @Override |
| 29 | - public int[] array() { | |
| 29 | + public Integer[] array() { | |
| 30 | 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 | 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 | 4 | import lombok.Getter; |
| 5 | 5 | import lombok.RequiredArgsConstructor; |
| 6 | 6 | |
| ... | ... | @@ -13,18 +13,18 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @RequiredArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum BpmUserTaskAssignStartUserHandlerTypeEnum implements IntArrayValuable { | |
| 16 | +public enum BpmUserTaskAssignStartUserHandlerTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | START_USER_AUDIT(1), // 由发起人对自己审批 |
| 19 | 19 | SKIP(2), // 自动跳过【参考飞书】:1)如果当前节点还有其他审批人,则交由其他审批人进行审批;2)如果当前节点没有其他审批人,则该节点自动通过 |
| 20 | 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 | 24 | private final Integer type; |
| 25 | 25 | |
| 26 | 26 | @Override |
| 27 | - public int[] array() { | |
| 27 | + public Integer[] array() { | |
| 28 | 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 | 1 | package cn.iocoder.yudao.module.bpm.enums.definition; |
| 2 | 2 | |
| 3 | 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 | 5 | import lombok.AllArgsConstructor; |
| 6 | 6 | import lombok.Getter; |
| 7 | 7 | |
| ... | ... | @@ -14,7 +14,7 @@ import java.util.Arrays; |
| 14 | 14 | */ |
| 15 | 15 | @Getter |
| 16 | 16 | @AllArgsConstructor |
| 17 | -public enum BpmUserTaskRejectHandlerType implements IntArrayValuable { | |
| 17 | +public enum BpmUserTaskRejectHandlerType implements ArrayValuable<Integer> { | |
| 18 | 18 | |
| 19 | 19 | FINISH_PROCESS_INSTANCE(1, "终止流程"), |
| 20 | 20 | RETURN_USER_TASK(2, "驳回到指定任务节点"); |
| ... | ... | @@ -22,14 +22,14 @@ public enum BpmUserTaskRejectHandlerType implements IntArrayValuable { |
| 22 | 22 | private final Integer type; |
| 23 | 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 | 27 | public static BpmUserTaskRejectHandlerType typeOf(Integer type) { |
| 28 | 28 | return ArrayUtil.firstMatch(item -> item.getType().equals(type), values()); |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | @Override |
| 32 | - public int[] array() { | |
| 32 | + public Integer[] array() { | |
| 33 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,7 +13,7 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @Getter |
| 15 | 15 | @AllArgsConstructor |
| 16 | -public enum BpmUserTaskTimeoutHandlerTypeEnum implements IntArrayValuable { | |
| 16 | +public enum BpmUserTaskTimeoutHandlerTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | REMINDER(1,"自动提醒"), |
| 19 | 19 | APPROVE(2, "自动同意"), |
| ... | ... | @@ -22,10 +22,10 @@ public enum BpmUserTaskTimeoutHandlerTypeEnum implements IntArrayValuable { |
| 22 | 22 | private final Integer type; |
| 23 | 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 | 27 | @Override |
| 28 | - public int[] array() { | |
| 28 | + public Integer[] array() { | |
| 29 | 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 | 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 | 4 | import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; |
| 5 | 5 | import lombok.AllArgsConstructor; |
| 6 | 6 | import lombok.Getter; |
| ... | ... | @@ -14,7 +14,7 @@ import java.util.Arrays; |
| 14 | 14 | */ |
| 15 | 15 | @Getter |
| 16 | 16 | @AllArgsConstructor |
| 17 | -public enum BpmProcessInstanceStatusEnum implements IntArrayValuable { | |
| 17 | +public enum BpmProcessInstanceStatusEnum implements ArrayValuable<Integer> { | |
| 18 | 18 | |
| 19 | 19 | NOT_START(-1, "未开始"), |
| 20 | 20 | RUNNING(1, "审批中"), |
| ... | ... | @@ -22,7 +22,7 @@ public enum BpmProcessInstanceStatusEnum implements IntArrayValuable { |
| 22 | 22 | REJECT(3, "审批不通过"), |
| 23 | 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 | 34 | private final String desc; |
| 35 | 35 | |
| 36 | 36 | @Override |
| 37 | - public int[] array() { | |
| 37 | + public Integer[] array() { | |
| 38 | 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 | 1 | package cn.iocoder.yudao.module.bpm.framework.flowable.core.enums; |
| 2 | 2 | |
| 3 | 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 | 5 | import lombok.AllArgsConstructor; |
| 6 | 6 | import lombok.Getter; |
| 7 | 7 | |
| ... | ... | @@ -16,7 +16,7 @@ import java.util.Arrays; |
| 16 | 16 | */ |
| 17 | 17 | @Getter |
| 18 | 18 | @AllArgsConstructor |
| 19 | -public enum BpmTaskCandidateStrategyEnum implements IntArrayValuable { | |
| 19 | +public enum BpmTaskCandidateStrategyEnum implements ArrayValuable<Integer> { | |
| 20 | 20 | |
| 21 | 21 | ROLE(10, "角色"), |
| 22 | 22 | DEPT_MEMBER(20, "部门的成员"), // 包括负责人 |
| ... | ... | @@ -33,7 +33,7 @@ public enum BpmTaskCandidateStrategyEnum implements IntArrayValuable { |
| 33 | 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 | 49 | } |
| 50 | 50 | |
| 51 | 51 | @Override |
| 52 | - public int[] array() { | |
| 52 | + public Integer[] array() { | |
| 53 | 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 | 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 | 4 | import lombok.Getter; |
| 5 | 5 | import lombok.RequiredArgsConstructor; |
| 6 | 6 | |
| ... | ... | @@ -13,13 +13,13 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @RequiredArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum CrmBusinessEndStatusEnum implements IntArrayValuable { | |
| 16 | +public enum CrmBusinessEndStatusEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | WIN(1, "赢单"), |
| 19 | 19 | LOSE(2, "输单"), |
| 20 | 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 | 31 | private final String name; |
| 32 | 32 | |
| 33 | 33 | @Override |
| 34 | - public int[] array() { | |
| 34 | + public Integer[] array() { | |
| 35 | 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 | 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 | 4 | import lombok.Getter; |
| 5 | 5 | import lombok.RequiredArgsConstructor; |
| 6 | 6 | |
| ... | ... | @@ -13,7 +13,7 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @RequiredArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum CrmAuditStatusEnum implements IntArrayValuable { | |
| 16 | +public enum CrmAuditStatusEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | DRAFT(0, "未提交"), |
| 19 | 19 | PROCESS(10, "审批中"), |
| ... | ... | @@ -24,10 +24,10 @@ public enum CrmAuditStatusEnum implements IntArrayValuable { |
| 24 | 24 | private final Integer status; |
| 25 | 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 | 29 | @Override |
| 30 | - public int[] array() { | |
| 30 | + public Integer[] array() { | |
| 31 | 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 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | 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 | 6 | import lombok.Getter; |
| 7 | 7 | import lombok.RequiredArgsConstructor; |
| 8 | 8 | |
| ... | ... | @@ -15,7 +15,7 @@ import java.util.Arrays; |
| 15 | 15 | */ |
| 16 | 16 | @RequiredArgsConstructor |
| 17 | 17 | @Getter |
| 18 | -public enum CrmBizTypeEnum implements IntArrayValuable { | |
| 18 | +public enum CrmBizTypeEnum implements ArrayValuable<Integer> { | |
| 19 | 19 | |
| 20 | 20 | CRM_CLUE(1, "线索"), |
| 21 | 21 | CRM_CUSTOMER(2, "客户"), |
| ... | ... | @@ -27,7 +27,7 @@ public enum CrmBizTypeEnum implements IntArrayValuable { |
| 27 | 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 | 45 | } |
| 46 | 46 | |
| 47 | 47 | @Override |
| 48 | - public int[] array() { | |
| 48 | + public Integer[] array() { | |
| 49 | 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 | 1 | package cn.iocoder.yudao.module.crm.enums.common; |
| 2 | 2 | |
| 3 | 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 | 5 | import lombok.AllArgsConstructor; |
| 6 | 6 | import lombok.Getter; |
| 7 | 7 | |
| ... | ... | @@ -14,13 +14,13 @@ import java.util.Arrays; |
| 14 | 14 | */ |
| 15 | 15 | @Getter |
| 16 | 16 | @AllArgsConstructor |
| 17 | -public enum CrmSceneTypeEnum implements IntArrayValuable { | |
| 17 | +public enum CrmSceneTypeEnum implements ArrayValuable<Integer> { | |
| 18 | 18 | |
| 19 | 19 | OWNER(1, "我负责的"), |
| 20 | 20 | INVOLVED(2, "我参与的"), |
| 21 | 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 | 44 | } |
| 45 | 45 | |
| 46 | 46 | @Override |
| 47 | - public int[] array() { | |
| 47 | + public Integer[] array() { | |
| 48 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,13 +13,13 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @Getter |
| 15 | 15 | @AllArgsConstructor |
| 16 | -public enum CrmCustomerLevelEnum implements IntArrayValuable { | |
| 16 | +public enum CrmCustomerLevelEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | IMPORTANT(1, "A(重点客户)"), |
| 19 | 19 | GENERAL(2, "B(普通客户)"), |
| 20 | 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 | 31 | private final String name; |
| 32 | 32 | |
| 33 | 33 | @Override |
| 34 | - public int[] array() { | |
| 34 | + public Integer[] array() { | |
| 35 | 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 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | 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 | 6 | import lombok.AllArgsConstructor; |
| 7 | 7 | import lombok.Getter; |
| 8 | 8 | |
| ... | ... | @@ -15,7 +15,7 @@ import java.util.Arrays; |
| 15 | 15 | */ |
| 16 | 16 | @Getter |
| 17 | 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 | 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 | 45 | } |
| 46 | 46 | |
| 47 | 47 | @Override |
| 48 | - public int[] array() { | |
| 48 | + public Integer[] array() { | |
| 49 | 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 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | 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 | 6 | import lombok.AllArgsConstructor; |
| 7 | 7 | import lombok.Getter; |
| 8 | 8 | |
| ... | ... | @@ -17,13 +17,13 @@ import java.util.Arrays; |
| 17 | 17 | */ |
| 18 | 18 | @Getter |
| 19 | 19 | @AllArgsConstructor |
| 20 | -public enum CrmPermissionLevelEnum implements IntArrayValuable { | |
| 20 | +public enum CrmPermissionLevelEnum implements ArrayValuable<Integer> { | |
| 21 | 21 | |
| 22 | 22 | OWNER(1, "负责人"), |
| 23 | 23 | READ(2, "只读"), |
| 24 | 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 | 35 | private final String name; |
| 36 | 36 | |
| 37 | 37 | @Override |
| 38 | - public int[] array() { | |
| 38 | + public Integer[] array() { | |
| 39 | 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 | 1 | package cn.iocoder.yudao.module.crm.enums.product; |
| 2 | 2 | |
| 3 | 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 | 5 | import lombok.AllArgsConstructor; |
| 6 | 6 | import lombok.Getter; |
| 7 | 7 | |
| ... | ... | @@ -15,12 +15,12 @@ import java.util.Arrays; |
| 15 | 15 | */ |
| 16 | 16 | @Getter |
| 17 | 17 | @AllArgsConstructor |
| 18 | -public enum CrmProductStatusEnum implements IntArrayValuable { | |
| 18 | +public enum CrmProductStatusEnum implements ArrayValuable<Integer> { | |
| 19 | 19 | |
| 20 | 20 | DISABLE(0, "下架"), |
| 21 | 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 | 32 | private final String name; |
| 33 | 33 | |
| 34 | 34 | @Override |
| 35 | - public int[] array() { | |
| 35 | + public Integer[] array() { | |
| 36 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,7 +13,7 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @Getter |
| 15 | 15 | @AllArgsConstructor |
| 16 | -public enum CrmReceivableReturnTypeEnum implements IntArrayValuable { | |
| 16 | +public enum CrmReceivableReturnTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | CHECK(1, "支票"), |
| 19 | 19 | CASH(2, "现金"), |
| ... | ... | @@ -24,7 +24,7 @@ public enum CrmReceivableReturnTypeEnum implements IntArrayValuable { |
| 24 | 24 | WECHAT_PAY(7, "微信支付"), |
| 25 | 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 | 36 | private final String name; |
| 37 | 37 | |
| 38 | 38 | @Override |
| 39 | - public int[] array() { | |
| 39 | + public Integer[] array() { | |
| 40 | 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 | 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 | 4 | import lombok.Getter; |
| 5 | 5 | import lombok.RequiredArgsConstructor; |
| 6 | 6 | |
| ... | ... | @@ -15,12 +15,12 @@ import java.util.Arrays; |
| 15 | 15 | */ |
| 16 | 16 | @RequiredArgsConstructor |
| 17 | 17 | @Getter |
| 18 | -public enum ErpAuditStatus implements IntArrayValuable { | |
| 18 | +public enum ErpAuditStatus implements ArrayValuable<Integer> { | |
| 19 | 19 | |
| 20 | 20 | PROCESS(10, "未审核"), // 审核中 |
| 21 | 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 | 32 | private final String name; |
| 33 | 33 | |
| 34 | 34 | @Override |
| 35 | - public int[] array() { | |
| 35 | + public Integer[] array() { | |
| 36 | 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 | 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 | 4 | import lombok.Getter; |
| 5 | 5 | import lombok.RequiredArgsConstructor; |
| 6 | 6 | |
| ... | ... | @@ -13,7 +13,7 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @RequiredArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum ErpBizTypeEnum implements IntArrayValuable { | |
| 16 | +public enum ErpBizTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | PURCHASE_ORDER(10, "采购订单"), |
| 19 | 19 | PURCHASE_IN(11, "采购入库"), |
| ... | ... | @@ -24,7 +24,7 @@ public enum ErpBizTypeEnum implements IntArrayValuable { |
| 24 | 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 | 36 | private final String name; |
| 37 | 37 | |
| 38 | 38 | @Override |
| 39 | - public int[] array() { | |
| 39 | + public Integer[] array() { | |
| 40 | 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 | 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 | 4 | import lombok.Getter; |
| 5 | 5 | import lombok.RequiredArgsConstructor; |
| 6 | 6 | |
| ... | ... | @@ -13,7 +13,7 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @RequiredArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum ErpStockRecordBizTypeEnum implements IntArrayValuable { | |
| 16 | +public enum ErpStockRecordBizTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | OTHER_IN(10, "其它入库"), |
| 19 | 19 | OTHER_IN_CANCEL(11, "其它入库(作废)"), |
| ... | ... | @@ -44,7 +44,7 @@ public enum ErpStockRecordBizTypeEnum implements IntArrayValuable { |
| 44 | 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 | 56 | private final String name; |
| 57 | 57 | |
| 58 | 58 | @Override |
| 59 | - public int[] array() { | |
| 59 | + public Integer[] array() { | |
| 60 | 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 | 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 | 4 | import lombok.Getter; |
| 5 | 5 | |
| 6 | 6 | import java.util.Arrays; |
| ... | ... | @@ -11,14 +11,14 @@ import java.util.Arrays; |
| 11 | 11 | * @author haohao |
| 12 | 12 | */ |
| 13 | 13 | @Getter |
| 14 | -public enum IotDeviceStatusEnum implements IntArrayValuable { | |
| 14 | +public enum IotDeviceStatusEnum implements ArrayValuable<Integer> { | |
| 15 | 15 | |
| 16 | 16 | INACTIVE(0, "未激活"), |
| 17 | 17 | ONLINE(1, "在线"), |
| 18 | 18 | OFFLINE(2, "离线"), |
| 19 | 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 | 48 | } |
| 49 | 49 | |
| 50 | 50 | @Override |
| 51 | - public int[] array() { | |
| 51 | + public Integer[] array() { | |
| 52 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -14,12 +14,12 @@ import java.util.Arrays; |
| 14 | 14 | */ |
| 15 | 15 | @AllArgsConstructor |
| 16 | 16 | @Getter |
| 17 | -public enum IotDataFormatEnum implements IntArrayValuable { | |
| 17 | +public enum IotDataFormatEnum implements ArrayValuable<Integer> { | |
| 18 | 18 | |
| 19 | 19 | JSON(0, "标准数据格式(JSON)"), |
| 20 | 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 | 31 | private final String description; |
| 32 | 32 | |
| 33 | 33 | @Override |
| 34 | - public int[] array() { | |
| 34 | + public Integer[] array() { | |
| 35 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,14 +13,14 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum IotNetTypeEnum implements IntArrayValuable { | |
| 16 | +public enum IotNetTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | WIFI(0, "Wi-Fi"), |
| 19 | 19 | CELLULAR(1, "Cellular"), |
| 20 | 20 | ETHERNET(2, "Ethernet"), |
| 21 | 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 | 32 | private final String description; |
| 33 | 33 | |
| 34 | 34 | @Override |
| 35 | - public int[] array() { | |
| 35 | + public Integer[] array() { | |
| 36 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,7 +13,7 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum IotProductDeviceTypeEnum implements IntArrayValuable { | |
| 16 | +public enum IotProductDeviceTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | DIRECT(0, "直连设备"), |
| 19 | 19 | GATEWAY_CHILD(1, "网关子设备"), |
| ... | ... | @@ -29,10 +29,10 @@ public enum IotProductDeviceTypeEnum implements IntArrayValuable { |
| 29 | 29 | */ |
| 30 | 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 | 34 | @Override |
| 35 | - public int[] array() { | |
| 35 | + public Integer[] array() { | |
| 36 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,13 +13,13 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum IotProductFunctionTypeEnum implements IntArrayValuable { | |
| 16 | +public enum IotProductFunctionTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | PROPERTY(1, "属性"), |
| 19 | 19 | SERVICE(2, "服务"), |
| 20 | 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 | 31 | private final String description; |
| 32 | 32 | |
| 33 | 33 | @Override |
| 34 | - public int[] array() { | |
| 34 | + public Integer[] array() { | |
| 35 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,12 +13,12 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum IotProductStatusEnum implements IntArrayValuable { | |
| 16 | +public enum IotProductStatusEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | UNPUBLISHED(0, "开发中"), |
| 19 | 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 | 30 | private final String description; |
| 31 | 31 | |
| 32 | 32 | @Override |
| 33 | - public int[] array() { | |
| 33 | + public Integer[] array() { | |
| 34 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,7 +13,7 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum IotProtocolTypeEnum implements IntArrayValuable { | |
| 16 | +public enum IotProtocolTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | CUSTOM(0, "自定义"), |
| 19 | 19 | MODBUS(1, "Modbus"), |
| ... | ... | @@ -21,7 +21,7 @@ public enum IotProtocolTypeEnum implements IntArrayValuable { |
| 21 | 21 | ZIGBEE(3, "ZigBee"), |
| 22 | 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 | 33 | private final String description; |
| 34 | 34 | |
| 35 | 35 | @Override |
| 36 | - public int[] array() { | |
| 36 | + public Integer[] array() { | |
| 37 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,12 +13,12 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum IotValidateTypeEnum implements IntArrayValuable { | |
| 16 | +public enum IotValidateTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | WEAK(0, "弱校验"), |
| 19 | 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 | 30 | private final String description; |
| 31 | 31 | |
| 32 | 32 | @Override |
| 33 | - public int[] array() { | |
| 33 | + public Integer[] array() { | |
| 34 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,13 +13,13 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @Getter |
| 15 | 15 | @AllArgsConstructor |
| 16 | -public enum ProductCommentAuditStatusEnum implements IntArrayValuable { | |
| 16 | +public enum ProductCommentAuditStatusEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | NONE(1, "待审核"), |
| 19 | 19 | APPROVE(2, "审批通过"), |
| 20 | 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 | 31 | private final String name; |
| 32 | 32 | |
| 33 | 33 | @Override |
| 34 | - public int[] array() { | |
| 34 | + public Integer[] array() { | |
| 35 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,7 +13,7 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @Getter |
| 15 | 15 | @AllArgsConstructor |
| 16 | -public enum ProductCommentScoresEnum implements IntArrayValuable { | |
| 16 | +public enum ProductCommentScoresEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | ONE(1, "1星"), |
| 19 | 19 | TWO(2, "2星"), |
| ... | ... | @@ -21,7 +21,7 @@ public enum ProductCommentScoresEnum implements IntArrayValuable { |
| 21 | 21 | FOUR(4, "4星"), |
| 22 | 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 | 34 | private final String name; |
| 35 | 35 | |
| 36 | 36 | @Override |
| 37 | - public int[] array() { | |
| 37 | + public Integer[] array() { | |
| 38 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,13 +13,13 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @Getter |
| 15 | 15 | @AllArgsConstructor |
| 16 | -public enum ProductSpuStatusEnum implements IntArrayValuable { | |
| 16 | +public enum ProductSpuStatusEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | RECYCLE(-1, "回收站"), |
| 19 | 19 | DISABLE(0, "下架"), |
| 20 | 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 | 31 | private final String name; |
| 32 | 32 | |
| 33 | 33 | @Override |
| 34 | - public int[] array() { | |
| 34 | + public Integer[] array() { | |
| 35 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,7 +13,7 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum BannerPositionEnum implements IntArrayValuable { | |
| 16 | +public enum BannerPositionEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | HOME_POSITION(1, "首页"), |
| 19 | 19 | SECKILL_POSITION(2, "秒杀活动页"), |
| ... | ... | @@ -21,7 +21,7 @@ public enum BannerPositionEnum implements IntArrayValuable { |
| 21 | 21 | DISCOUNT_POSITION(4, "限时折扣页"), |
| 22 | 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 | 33 | private final String name; |
| 34 | 34 | |
| 35 | 35 | @Override |
| 36 | - public int[] array() { | |
| 36 | + public Integer[] array() { | |
| 37 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,14 +13,14 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum BargainRecordStatusEnum implements IntArrayValuable { | |
| 16 | +public enum BargainRecordStatusEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | IN_PROGRESS(1, "砍价中"), |
| 19 | 19 | SUCCESS(2, "砍价成功"), |
| 20 | 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 | 32 | private final String name; |
| 33 | 33 | |
| 34 | 34 | @Override |
| 35 | - public int[] array() { | |
| 35 | + public Integer[] array() { | |
| 36 | 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 | 1 | package cn.iocoder.yudao.module.promotion.enums.combination; |
| 2 | 2 | |
| 3 | 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 | 5 | import lombok.AllArgsConstructor; |
| 6 | 6 | import lombok.Getter; |
| 7 | 7 | |
| ... | ... | @@ -14,13 +14,13 @@ import java.util.Arrays; |
| 14 | 14 | */ |
| 15 | 15 | @AllArgsConstructor |
| 16 | 16 | @Getter |
| 17 | -public enum CombinationRecordStatusEnum implements IntArrayValuable { | |
| 17 | +public enum CombinationRecordStatusEnum implements ArrayValuable<Integer> { | |
| 18 | 18 | |
| 19 | 19 | IN_PROGRESS(0, "进行中"), |
| 20 | 20 | SUCCESS(1, "拼团成功"), |
| 21 | 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 | 32 | private final String name; |
| 33 | 33 | |
| 34 | 34 | @Override |
| 35 | - public int[] array() { | |
| 35 | + public Integer[] array() { | |
| 36 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -14,14 +14,14 @@ import java.util.Arrays; |
| 14 | 14 | */ |
| 15 | 15 | @AllArgsConstructor |
| 16 | 16 | @Getter |
| 17 | -public enum PromotionActivityStatusEnum implements IntArrayValuable { | |
| 17 | +public enum PromotionActivityStatusEnum implements ArrayValuable<Integer> { | |
| 18 | 18 | |
| 19 | 19 | WAIT(10, "未开始"), |
| 20 | 20 | RUN(20, "进行中"), |
| 21 | 21 | END(30, "已结束"), |
| 22 | 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 | 33 | private final String name; |
| 34 | 34 | |
| 35 | 35 | @Override |
| 36 | - public int[] array() { | |
| 36 | + public Integer[] array() { | |
| 37 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,12 +13,12 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum PromotionConditionTypeEnum implements IntArrayValuable { | |
| 16 | +public enum PromotionConditionTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | PRICE(10, "满 N 元"), |
| 19 | 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 | 30 | private final String name; |
| 31 | 31 | |
| 32 | 32 | @Override |
| 33 | - public int[] array() { | |
| 33 | + public Integer[] array() { | |
| 34 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,13 +13,13 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @Getter |
| 15 | 15 | @AllArgsConstructor |
| 16 | -public enum PromotionDiscountTypeEnum implements IntArrayValuable { | |
| 16 | +public enum PromotionDiscountTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | PRICE(1, "满减"), // 具体金额 |
| 19 | 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 | 31 | private final String name; |
| 32 | 32 | |
| 33 | 33 | @Override |
| 34 | - public int[] array() { | |
| 34 | + public Integer[] array() { | |
| 35 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -14,13 +14,13 @@ import java.util.Objects; |
| 14 | 14 | */ |
| 15 | 15 | @Getter |
| 16 | 16 | @AllArgsConstructor |
| 17 | -public enum PromotionProductScopeEnum implements IntArrayValuable { | |
| 17 | +public enum PromotionProductScopeEnum implements ArrayValuable<Integer> { | |
| 18 | 18 | |
| 19 | 19 | ALL(1, "全部商品"), |
| 20 | 20 | SPU(2, "指定商品"), |
| 21 | 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 | 32 | private final String name; |
| 33 | 33 | |
| 34 | 34 | @Override |
| 35 | - public int[] array() { | |
| 35 | + public Integer[] array() { | |
| 36 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,7 +13,7 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @Getter |
| 15 | 15 | @AllArgsConstructor |
| 16 | -public enum PromotionTypeEnum implements IntArrayValuable { | |
| 16 | +public enum PromotionTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | SECKILL_ACTIVITY(1, "秒杀活动"), |
| 19 | 19 | BARGAIN_ACTIVITY(2, "砍价活动"), |
| ... | ... | @@ -27,7 +27,7 @@ public enum PromotionTypeEnum implements IntArrayValuable { |
| 27 | 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 | 39 | private final String name; |
| 40 | 40 | |
| 41 | 41 | @Override |
| 42 | - public int[] array() { | |
| 42 | + public Integer[] array() { | |
| 43 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,13 +13,13 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum CouponStatusEnum implements IntArrayValuable { | |
| 16 | +public enum CouponStatusEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | UNUSED(1, "未使用"), |
| 19 | 19 | USED(2, "已使用"), |
| 20 | 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 | 31 | private final String name; |
| 32 | 32 | |
| 33 | 33 | @Override |
| 34 | - public int[] array() { | |
| 34 | + public Integer[] array() { | |
| 35 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -14,14 +14,14 @@ import java.util.Objects; |
| 14 | 14 | */ |
| 15 | 15 | @AllArgsConstructor |
| 16 | 16 | @Getter |
| 17 | -public enum CouponTakeTypeEnum implements IntArrayValuable { | |
| 17 | +public enum CouponTakeTypeEnum implements ArrayValuable<Integer> { | |
| 18 | 18 | |
| 19 | 19 | USER(1, "直接领取"), // 用户可在首页、每日领劵直接领取 |
| 20 | 20 | ADMIN(2, "指定发放"), // 后台指定会员赠送优惠劵 |
| 21 | 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 | 33 | private final String name; |
| 34 | 34 | |
| 35 | 35 | @Override |
| 36 | - public int[] array() { | |
| 36 | + public Integer[] array() { | |
| 37 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,13 +13,13 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum CouponTemplateValidityTypeEnum implements IntArrayValuable { | |
| 16 | +public enum CouponTemplateValidityTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | DATE(1, "固定日期"), |
| 19 | 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 | 31 | private final String name; |
| 32 | 32 | |
| 33 | 33 | @Override |
| 34 | - public int[] array() { | |
| 34 | + public Integer[] array() { | |
| 35 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,13 +13,13 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum DiyPageEnum implements IntArrayValuable { | |
| 16 | +public enum DiyPageEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | INDEX(1, "首页"), |
| 19 | 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 | 32 | private final String name; |
| 33 | 33 | |
| 34 | 34 | @Override |
| 35 | - public int[] array() { | |
| 35 | + public Integer[] array() { | |
| 36 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,7 +13,7 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum KeFuMessageContentTypeEnum implements IntArrayValuable { | |
| 16 | +public enum KeFuMessageContentTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | TEXT(1, "文本消息"), |
| 19 | 19 | IMAGE(2, "图片消息"), |
| ... | ... | @@ -25,7 +25,7 @@ public enum KeFuMessageContentTypeEnum implements IntArrayValuable { |
| 25 | 25 | PRODUCT(10, "商品消息"), |
| 26 | 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 | 38 | private final String name; |
| 39 | 39 | |
| 40 | 40 | @Override |
| 41 | - public int[] array() { | |
| 41 | + public Integer[] array() { | |
| 42 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,7 +13,7 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 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 | 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 | 41 | private final Integer type; |
| 42 | 42 | |
| 43 | 43 | @Override |
| 44 | - public int[] array() { | |
| 44 | + public Integer[] array() { | |
| 45 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -18,7 +18,7 @@ import static cn.hutool.core.util.ArrayUtil.firstMatch; |
| 18 | 18 | */ |
| 19 | 19 | @AllArgsConstructor |
| 20 | 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 | 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 | 84 | private final String content; |
| 85 | 85 | |
| 86 | 86 | @Override |
| 87 | - public int[] array() { | |
| 87 | + public Integer[] array() { | |
| 88 | 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 | 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 | 4 | import lombok.Getter; |
| 5 | 5 | import lombok.RequiredArgsConstructor; |
| 6 | 6 | |
| ... | ... | @@ -13,12 +13,12 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @RequiredArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum AfterSaleTypeEnum implements IntArrayValuable { | |
| 16 | +public enum AfterSaleTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | IN_SALE(10, "售中退款"), // 交易完成前买家申请退款 |
| 19 | 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 | 30 | private final String name; |
| 31 | 31 | |
| 32 | 32 | @Override |
| 33 | - public int[] array() { | |
| 33 | + public Integer[] array() { | |
| 34 | 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 | 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 | 4 | import lombok.Getter; |
| 5 | 5 | import lombok.RequiredArgsConstructor; |
| 6 | 6 | |
| ... | ... | @@ -13,12 +13,12 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @RequiredArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum AfterSaleWayEnum implements IntArrayValuable { | |
| 16 | +public enum AfterSaleWayEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | REFUND(10, "仅退款"), |
| 19 | 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 | 30 | private final String name; |
| 31 | 31 | |
| 32 | 32 | @Override |
| 33 | - public int[] array() { | |
| 33 | + public Integer[] array() { | |
| 34 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,7 +13,7 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 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 | 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 | 41 | private final String name; |
| 42 | 42 | |
| 43 | 43 | @Override |
| 44 | - public int[] array() { | |
| 44 | + public Integer[] array() { | |
| 45 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,7 +13,7 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 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 | 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 | 37 | private final String name; |
| 38 | 38 | |
| 39 | 39 | @Override |
| 40 | - public int[] array() { | |
| 40 | + public Integer[] array() { | |
| 41 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,14 +13,14 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum BrokerageRecordBizTypeEnum implements IntArrayValuable { | |
| 16 | +public enum BrokerageRecordBizTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | ORDER(1, "获得推广佣金", "获得推广佣金 {}", true), |
| 19 | 19 | WITHDRAW(2, "提现申请", "提现申请扣除佣金 {}", false), |
| 20 | 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 | 40 | private final boolean add; |
| 41 | 41 | |
| 42 | 42 | @Override |
| 43 | - public int[] array() { | |
| 43 | + public Integer[] array() { | |
| 44 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,14 +13,14 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum BrokerageRecordStatusEnum implements IntArrayValuable { | |
| 16 | +public enum BrokerageRecordStatusEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | WAIT_SETTLEMENT(0, "待结算"), |
| 19 | 19 | SETTLEMENT(1, "已结算"), |
| 20 | 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 | 32 | private final String name; |
| 33 | 33 | |
| 34 | 34 | @Override |
| 35 | - public int[] array() { | |
| 35 | + public Integer[] array() { | |
| 36 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -14,7 +14,7 @@ import java.util.Arrays; |
| 14 | 14 | */ |
| 15 | 15 | @AllArgsConstructor |
| 16 | 16 | @Getter |
| 17 | -public enum BrokerageWithdrawStatusEnum implements IntArrayValuable { | |
| 17 | +public enum BrokerageWithdrawStatusEnum implements ArrayValuable<Integer> { | |
| 18 | 18 | |
| 19 | 19 | AUDITING(0, "审核中"), |
| 20 | 20 | AUDIT_SUCCESS(10, "审核通过"), |
| ... | ... | @@ -23,7 +23,7 @@ public enum BrokerageWithdrawStatusEnum implements IntArrayValuable { |
| 23 | 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 | 35 | private final String name; |
| 36 | 36 | |
| 37 | 37 | @Override |
| 38 | - public int[] array() { | |
| 38 | + public Integer[] array() { | |
| 39 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,7 +13,7 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum BrokerageWithdrawTypeEnum implements IntArrayValuable { | |
| 16 | +public enum BrokerageWithdrawTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | WALLET(1, "钱包"), |
| 19 | 19 | BANK(2, "银行卡"), |
| ... | ... | @@ -22,7 +22,7 @@ public enum BrokerageWithdrawTypeEnum implements IntArrayValuable { |
| 22 | 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 | 34 | private final String name; |
| 35 | 35 | |
| 36 | 36 | @Override |
| 37 | - public int[] array() { | |
| 37 | + public Integer[] array() { | |
| 38 | 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 | 1 | package cn.iocoder.yudao.module.trade.enums.delivery; |
| 2 | 2 | |
| 3 | 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 | 5 | import lombok.AllArgsConstructor; |
| 6 | 6 | import lombok.Getter; |
| 7 | 7 | |
| ... | ... | @@ -14,13 +14,13 @@ import java.util.Arrays; |
| 14 | 14 | */ |
| 15 | 15 | @AllArgsConstructor |
| 16 | 16 | @Getter |
| 17 | -public enum DeliveryExpressChargeModeEnum implements IntArrayValuable { | |
| 17 | +public enum DeliveryExpressChargeModeEnum implements ArrayValuable<Integer> { | |
| 18 | 18 | |
| 19 | 19 | COUNT(1, "按件"), |
| 20 | 20 | WEIGHT(2,"按重量"), |
| 21 | 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 | 32 | private final String desc; |
| 33 | 33 | |
| 34 | 34 | @Override |
| 35 | - public int[] array() { | |
| 35 | + public Integer[] array() { | |
| 36 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,12 +13,12 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @Getter |
| 15 | 15 | @AllArgsConstructor |
| 16 | -public enum DeliveryTypeEnum implements IntArrayValuable { | |
| 16 | +public enum DeliveryTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | EXPRESS(1, "快递发货"), |
| 19 | 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 | 30 | private final String name; |
| 31 | 31 | |
| 32 | 32 | @Override |
| 33 | - public int[] array() { | |
| 33 | + public Integer[] array() { | |
| 34 | 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 | 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 | 4 | import lombok.Getter; |
| 5 | 5 | import lombok.RequiredArgsConstructor; |
| 6 | 6 | |
| ... | ... | @@ -13,14 +13,14 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @RequiredArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum TradeOrderCancelTypeEnum implements IntArrayValuable { | |
| 16 | +public enum TradeOrderCancelTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | PAY_TIMEOUT(10, "超时未支付"), |
| 19 | 19 | AFTER_SALE_CLOSE(20, "退款关闭"), |
| 20 | 20 | MEMBER_CANCEL(30, "买家取消"), |
| 21 | 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 | 32 | private final String name; |
| 33 | 33 | |
| 34 | 34 | @Override |
| 35 | - public int[] array() { | |
| 35 | + public Integer[] array() { | |
| 36 | 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 | 1 | package cn.iocoder.yudao.module.trade.enums.order; |
| 2 | 2 | |
| 3 | 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 | 5 | import lombok.Getter; |
| 6 | 6 | import lombok.RequiredArgsConstructor; |
| 7 | 7 | |
| ... | ... | @@ -14,13 +14,13 @@ import java.util.Arrays; |
| 14 | 14 | */ |
| 15 | 15 | @RequiredArgsConstructor |
| 16 | 16 | @Getter |
| 17 | -public enum TradeOrderItemAfterSaleStatusEnum implements IntArrayValuable { | |
| 17 | +public enum TradeOrderItemAfterSaleStatusEnum implements ArrayValuable<Integer> { | |
| 18 | 18 | |
| 19 | 19 | NONE(0, "未售后"), |
| 20 | 20 | APPLY(10, "售后中"), |
| 21 | 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 | 32 | private final String name; |
| 33 | 33 | |
| 34 | 34 | @Override |
| 35 | - public int[] array() { | |
| 35 | + public Integer[] array() { | |
| 36 | 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 | 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 | 4 | import lombok.Getter; |
| 5 | 5 | import lombok.RequiredArgsConstructor; |
| 6 | 6 | |
| ... | ... | @@ -13,13 +13,13 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @RequiredArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum TradeOrderRefundStatusEnum implements IntArrayValuable { | |
| 16 | +public enum TradeOrderRefundStatusEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | NONE(0, "未退款"), |
| 19 | 19 | PART(10, "部分退款"), |
| 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 | 31 | private final String name; |
| 32 | 32 | |
| 33 | 33 | @Override |
| 34 | - public int[] array() { | |
| 34 | + public Integer[] array() { | |
| 35 | 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 | 1 | package cn.iocoder.yudao.module.trade.enums.order; |
| 2 | 2 | |
| 3 | 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 | 5 | import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; |
| 6 | 6 | import lombok.Getter; |
| 7 | 7 | import lombok.RequiredArgsConstructor; |
| ... | ... | @@ -15,7 +15,7 @@ import java.util.Arrays; |
| 15 | 15 | */ |
| 16 | 16 | @RequiredArgsConstructor |
| 17 | 17 | @Getter |
| 18 | -public enum TradeOrderStatusEnum implements IntArrayValuable { | |
| 18 | +public enum TradeOrderStatusEnum implements ArrayValuable<Integer> { | |
| 19 | 19 | |
| 20 | 20 | UNPAID(0, "待支付"), |
| 21 | 21 | UNDELIVERED(10, "待发货"), |
| ... | ... | @@ -23,7 +23,7 @@ public enum TradeOrderStatusEnum implements IntArrayValuable { |
| 23 | 23 | COMPLETED(30, "已完成"), |
| 24 | 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 | 35 | private final String name; |
| 36 | 36 | |
| 37 | 37 | @Override |
| 38 | - public int[] array() { | |
| 38 | + public Integer[] array() { | |
| 39 | 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 | 1 | package cn.iocoder.yudao.module.trade.enums.order; |
| 2 | 2 | |
| 3 | 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 | 5 | import lombok.Getter; |
| 6 | 6 | import lombok.RequiredArgsConstructor; |
| 7 | 7 | |
| ... | ... | @@ -14,7 +14,7 @@ import java.util.Arrays; |
| 14 | 14 | */ |
| 15 | 15 | @RequiredArgsConstructor |
| 16 | 16 | @Getter |
| 17 | -public enum TradeOrderTypeEnum implements IntArrayValuable { | |
| 17 | +public enum TradeOrderTypeEnum implements ArrayValuable<Integer> { | |
| 18 | 18 | |
| 19 | 19 | NORMAL(0, "普通订单"), |
| 20 | 20 | SECKILL(1, "秒杀订单"), |
| ... | ... | @@ -23,7 +23,7 @@ public enum TradeOrderTypeEnum implements IntArrayValuable { |
| 23 | 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 | 35 | private final String name; |
| 36 | 36 | |
| 37 | 37 | @Override |
| 38 | - public int[] array() { | |
| 38 | + public Integer[] array() { | |
| 39 | 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 | 1 | package cn.iocoder.yudao.module.member.enums.point; |
| 2 | 2 | |
| 3 | 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 | 5 | import lombok.AllArgsConstructor; |
| 6 | 6 | import lombok.Getter; |
| 7 | 7 | |
| ... | ... | @@ -14,7 +14,7 @@ import java.util.Objects; |
| 14 | 14 | */ |
| 15 | 15 | @AllArgsConstructor |
| 16 | 16 | @Getter |
| 17 | -public enum MemberPointBizTypeEnum implements IntArrayValuable { | |
| 17 | +public enum MemberPointBizTypeEnum implements ArrayValuable<Integer> { | |
| 18 | 18 | |
| 19 | 19 | SIGN(1, "签到", "签到获得 {} 积分", true), |
| 20 | 20 | ADMIN(2, "管理员修改", "管理员修改 {} 积分", true), |
| ... | ... | @@ -46,8 +46,8 @@ public enum MemberPointBizTypeEnum implements IntArrayValuable { |
| 46 | 46 | private final boolean add; |
| 47 | 47 | |
| 48 | 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 | 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 | 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 | 4 | import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; |
| 5 | 5 | import lombok.AllArgsConstructor; |
| 6 | 6 | import lombok.Getter; |
| ... | ... | @@ -14,7 +14,7 @@ import java.util.Objects; |
| 14 | 14 | */ |
| 15 | 15 | @Getter |
| 16 | 16 | @AllArgsConstructor |
| 17 | -public enum PayOrderStatusEnum implements IntArrayValuable { | |
| 17 | +public enum PayOrderStatusEnum implements ArrayValuable<Integer> { | |
| 18 | 18 | |
| 19 | 19 | WAITING(0, "未支付"), |
| 20 | 20 | SUCCESS(10, "支付成功"), |
| ... | ... | @@ -26,8 +26,8 @@ public enum PayOrderStatusEnum implements IntArrayValuable { |
| 26 | 26 | private final String name; |
| 27 | 27 | |
| 28 | 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 | 1 | package cn.iocoder.yudao.module.pay.enums.transfer; |
| 2 | 2 | |
| 3 | 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 | 5 | import lombok.AllArgsConstructor; |
| 6 | 6 | import lombok.Getter; |
| 7 | 7 | |
| ... | ... | @@ -14,7 +14,7 @@ import java.util.Arrays; |
| 14 | 14 | */ |
| 15 | 15 | @AllArgsConstructor |
| 16 | 16 | @Getter |
| 17 | -public enum PayTransferTypeEnum implements IntArrayValuable { | |
| 17 | +public enum PayTransferTypeEnum implements ArrayValuable<Integer> { | |
| 18 | 18 | |
| 19 | 19 | ALIPAY_BALANCE(1, "支付宝余额"), |
| 20 | 20 | WX_BALANCE(2, "微信余额"), |
| ... | ... | @@ -30,10 +30,10 @@ public enum PayTransferTypeEnum implements IntArrayValuable { |
| 30 | 30 | private final Integer type; |
| 31 | 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 | 35 | @Override |
| 36 | - public int[] array() { | |
| 36 | + public Integer[] array() { | |
| 37 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -13,7 +13,7 @@ import java.util.Arrays; |
| 13 | 13 | */ |
| 14 | 14 | @AllArgsConstructor |
| 15 | 15 | @Getter |
| 16 | -public enum PayWalletBizTypeEnum implements IntArrayValuable { | |
| 16 | +public enum PayWalletBizTypeEnum implements ArrayValuable<Integer> { | |
| 17 | 17 | |
| 18 | 18 | RECHARGE(1, "充值"), |
| 19 | 19 | RECHARGE_REFUND(2, "充值退款"), |
| ... | ... | @@ -31,10 +31,10 @@ public enum PayWalletBizTypeEnum implements IntArrayValuable { |
| 31 | 31 | */ |
| 32 | 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 | 36 | @Override |
| 37 | - public int[] array() { | |
| 37 | + public Integer[] array() { | |
| 38 | 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 | 1 | package cn.iocoder.yudao.framework.pay.core.enums.transfer; |
| 2 | 2 | |
| 3 | 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 | 5 | import lombok.AllArgsConstructor; |
| 6 | 6 | import lombok.Getter; |
| 7 | 7 | |
| ... | ... | @@ -14,7 +14,7 @@ import java.util.Arrays; |
| 14 | 14 | */ |
| 15 | 15 | @AllArgsConstructor |
| 16 | 16 | @Getter |
| 17 | -public enum PayTransferTypeEnum implements IntArrayValuable { | |
| 17 | +public enum PayTransferTypeEnum implements ArrayValuable<Integer> { | |
| 18 | 18 | |
| 19 | 19 | ALIPAY_BALANCE(1, "支付宝余额"), |
| 20 | 20 | WX_BALANCE(2, "微信余额"), |
| ... | ... | @@ -30,10 +30,10 @@ public enum PayTransferTypeEnum implements IntArrayValuable { |
| 30 | 30 | private final Integer type; |
| 31 | 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 | 35 | @Override |
| 36 | - public int[] array() { | |
| 36 | + public Integer[] array() { | |
| 37 | 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 | 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 | 4 | import lombok.AllArgsConstructor; |
| 5 | 5 | import lombok.Getter; |
| 6 | 6 | |
| ... | ... | @@ -15,7 +15,7 @@ import java.util.Arrays; |
| 15 | 15 | */ |
| 16 | 16 | @Getter |
| 17 | 17 | @AllArgsConstructor |
| 18 | -public enum DataScopeEnum implements IntArrayValuable { | |
| 18 | +public enum DataScopeEnum implements ArrayValuable<Integer> { | |
| 19 | 19 | |
| 20 | 20 | ALL(1), // 全部数据权限 |
| 21 | 21 | |
| ... | ... | @@ -30,10 +30,10 @@ public enum DataScopeEnum implements IntArrayValuable { |
| 30 | 30 | */ |
| 31 | 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 | 35 | @Override |
| 36 | - public int[] array() { | |
| 36 | + public Integer[] array() { | |
| 37 | 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 | 1 | package cn.iocoder.yudao.module.system.enums.sms; |
| 2 | 2 | |
| 3 | 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 | 5 | import lombok.AllArgsConstructor; |
| 6 | 6 | import lombok.Getter; |
| 7 | 7 | |
| ... | ... | @@ -14,7 +14,7 @@ import java.util.Arrays; |
| 14 | 14 | */ |
| 15 | 15 | @Getter |
| 16 | 16 | @AllArgsConstructor |
| 17 | -public enum SmsSceneEnum implements IntArrayValuable { | |
| 17 | +public enum SmsSceneEnum implements ArrayValuable<Integer> { | |
| 18 | 18 | |
| 19 | 19 | MEMBER_LOGIN(1, "user-sms-login", "会员用户 - 手机号登陆"), |
| 20 | 20 | MEMBER_UPDATE_MOBILE(2, "user-update-mobile", "会员用户 - 修改手机"), |
| ... | ... | @@ -23,7 +23,7 @@ public enum SmsSceneEnum implements IntArrayValuable { |
| 23 | 23 | |
| 24 | 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 | 39 | private final String description; |
| 40 | 40 | |
| 41 | 41 | @Override |
| 42 | - public int[] array() { | |
| 42 | + public Integer[] array() { | |
| 43 | 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 | 1 | package cn.iocoder.yudao.module.system.enums.social; |
| 2 | 2 | |
| 3 | 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 | 5 | import lombok.AllArgsConstructor; |
| 6 | 6 | import lombok.Getter; |
| 7 | 7 | |
| ... | ... | @@ -14,7 +14,7 @@ import java.util.Arrays; |
| 14 | 14 | */ |
| 15 | 15 | @Getter |
| 16 | 16 | @AllArgsConstructor |
| 17 | -public enum SocialTypeEnum implements IntArrayValuable { | |
| 17 | +public enum SocialTypeEnum implements ArrayValuable<Integer> { | |
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * Gitee |
| ... | ... | @@ -55,7 +55,7 @@ public enum SocialTypeEnum implements IntArrayValuable { |
| 55 | 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 | 67 | private final String source; |
| 68 | 68 | |
| 69 | 69 | @Override |
| 70 | - public int[] array() { | |
| 70 | + public Integer[] array() { | |
| 71 | 71 | return ARRAYS; |
| 72 | 72 | } |
| 73 | 73 | ... | ... |