diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/core/ArrayValuable.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/core/ArrayValuable.java new file mode 100644 index 000000000..b83451fd0 --- /dev/null +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/core/ArrayValuable.java @@ -0,0 +1,15 @@ +package cn.iocoder.yudao.framework.common.core; + +/** + * 可生成 T 数组的接口 + * + * @author HUIHUI + */ +public interface ArrayValuable { + + /** + * @return 数组 + */ + T[] array(); + +} \ No newline at end of file diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/core/IntArrayValuable.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/core/IntArrayValuable.java deleted file mode 100644 index 8914231d8..000000000 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/core/IntArrayValuable.java +++ /dev/null @@ -1,15 +0,0 @@ -package cn.iocoder.yudao.framework.common.core; - -/** - * 可生成 Int 数组的接口 - * - * @author 芋道源码 - */ -public interface IntArrayValuable { - - /** - * @return int 数组 - */ - int[] array(); - -} diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/CommonStatusEnum.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/CommonStatusEnum.java index facf32679..f2a63dcdb 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/CommonStatusEnum.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/CommonStatusEnum.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.framework.common.enums; import cn.hutool.core.util.ObjUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -14,12 +14,12 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum CommonStatusEnum implements IntArrayValuable { +public enum CommonStatusEnum implements ArrayValuable { ENABLE(0, "开启"), DISABLE(1, "关闭"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CommonStatusEnum::getStatus).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CommonStatusEnum::getStatus).toArray(Integer[]::new); /** * 状态值 @@ -31,7 +31,7 @@ public enum CommonStatusEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/DateIntervalEnum.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/DateIntervalEnum.java index 498b67124..8d6a79178 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/DateIntervalEnum.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/DateIntervalEnum.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.framework.common.enums; import cn.hutool.core.util.ArrayUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -14,7 +14,7 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum DateIntervalEnum implements IntArrayValuable { +public enum DateIntervalEnum implements ArrayValuable { DAY(1, "天"), WEEK(2, "周"), @@ -23,7 +23,7 @@ public enum DateIntervalEnum implements IntArrayValuable { YEAR(5, "年") ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DateIntervalEnum::getInterval).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(DateIntervalEnum::getInterval).toArray(Integer[]::new); /** * 类型 @@ -35,7 +35,7 @@ public enum DateIntervalEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/TerminalEnum.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/TerminalEnum.java index f256712b3..33482d46f 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/TerminalEnum.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/TerminalEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.framework.common.enums; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.Getter; import lombok.RequiredArgsConstructor; @@ -13,7 +13,7 @@ import java.util.Arrays; */ @RequiredArgsConstructor @Getter -public enum TerminalEnum implements IntArrayValuable { +public enum TerminalEnum implements ArrayValuable { UNKNOWN(0, "未知"), // 目的:在无法解析到 terminal 时,使用它 WECHAT_MINI_PROGRAM(10, "微信小程序"), @@ -22,7 +22,7 @@ public enum TerminalEnum implements IntArrayValuable { APP(31, "手机 App"), ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TerminalEnum::getTerminal).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(TerminalEnum::getTerminal).toArray(Integer[]::new); /** * 终端 @@ -34,7 +34,7 @@ public enum TerminalEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } } diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/UserTypeEnum.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/UserTypeEnum.java index c950c529d..e00ec0bef 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/UserTypeEnum.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/UserTypeEnum.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.framework.common.enums; import cn.hutool.core.util.ArrayUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -12,12 +12,12 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum UserTypeEnum implements IntArrayValuable { +public enum UserTypeEnum implements ArrayValuable { MEMBER(1, "会员"), // 面向 c 端,普通用户 ADMIN(2, "管理员"); // 面向 b 端,管理后台 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(UserTypeEnum::getValue).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(UserTypeEnum::getValue).toArray(Integer[]::new); /** * 类型 @@ -33,7 +33,7 @@ public enum UserTypeEnum implements IntArrayValuable { } @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } } diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnum.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnum.java index f8a7fba53..407d01b0a 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnum.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnum.java @@ -1,9 +1,9 @@ package cn.iocoder.yudao.framework.common.validation; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; - +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import jakarta.validation.Constraint; import jakarta.validation.Payload; + import java.lang.annotation.*; @Target({ @@ -22,9 +22,9 @@ import java.lang.annotation.*; public @interface InEnum { /** - * @return 实现 EnumValuable 接口的 + * @return 实现 ArrayValuable 接口的类 */ - Class value(); + Class> value(); String message() default "必须在指定范围 {value}"; diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnumCollectionValidator.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnumCollectionValidator.java index 875190588..b21a92948 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnumCollectionValidator.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnumCollectionValidator.java @@ -1,37 +1,39 @@ package cn.iocoder.yudao.framework.common.validation; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; - +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import jakarta.validation.ConstraintValidator; import jakarta.validation.ConstraintValidatorContext; + import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.List; -import java.util.stream.Collectors; -public class InEnumCollectionValidator implements ConstraintValidator> { +public class InEnumCollectionValidator implements ConstraintValidator> { - private List values; + private List values; @Override public void initialize(InEnum annotation) { - IntArrayValuable[] values = annotation.value().getEnumConstants(); + ArrayValuable[] values = annotation.value().getEnumConstants(); if (values.length == 0) { this.values = Collections.emptyList(); } else { - this.values = Arrays.stream(values[0].array()).boxed().collect(Collectors.toList()); + this.values = Arrays.asList(values[0].array()); } } @Override - public boolean isValid(Collection list, ConstraintValidatorContext context) { + public boolean isValid(Collection list, ConstraintValidatorContext context) { + if (list == null) { + return true; + } // 校验通过 if (CollUtil.containsAll(values, list)) { return true; } - // 校验不通过,自定义提示语句(因为,注解上的 value 是枚举类,无法获得枚举类的实际值) + // 校验不通过,自定义提示语句 context.disableDefaultConstraintViolation(); // 禁用默认的 message 的值 context.buildConstraintViolationWithTemplate(context.getDefaultConstraintMessageTemplate() .replaceAll("\\{value}", CollUtil.join(list, ","))).addConstraintViolation(); // 重新添加错误提示语句 diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnumValidator.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnumValidator.java index c8c405812..e80eac4bd 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnumValidator.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnumValidator.java @@ -1,30 +1,29 @@ package cn.iocoder.yudao.framework.common.validation; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; - +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import jakarta.validation.ConstraintValidator; import jakarta.validation.ConstraintValidatorContext; + import java.util.Arrays; import java.util.Collections; import java.util.List; -import java.util.stream.Collectors; -public class InEnumValidator implements ConstraintValidator { +public class InEnumValidator implements ConstraintValidator { - private List values; + private List values; @Override public void initialize(InEnum annotation) { - IntArrayValuable[] values = annotation.value().getEnumConstants(); + ArrayValuable[] values = annotation.value().getEnumConstants(); if (values.length == 0) { this.values = Collections.emptyList(); } else { - this.values = Arrays.stream(values[0].array()).boxed().collect(Collectors.toList()); + this.values = Arrays.asList(values[0].array()); } } @Override - public boolean isValid(Integer value, ConstraintValidatorContext context) { + public boolean isValid(Object value, ConstraintValidatorContext context) { // 为空时,默认不校验,即认为通过 if (value == null) { return true; @@ -33,7 +32,7 @@ public class InEnumValidator implements ConstraintValidator { if (values.contains(value)) { return true; } - // 校验不通过,自定义提示语句(因为,注解上的 value 是枚举类,无法获得枚举类的实际值) + // 校验不通过,自定义提示语句 context.disableDefaultConstraintViolation(); // 禁用默认的 message 的值 context.buildConstraintViolationWithTemplate(context.getDefaultConstraintMessageTemplate() .replaceAll("\\{value}", values.toString())).addConstraintViolation(); // 重新添加错误提示语句 diff --git a/yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/java/cn/iocoder/yudao/framework/ip/core/enums/AreaTypeEnum.java b/yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/java/cn/iocoder/yudao/framework/ip/core/enums/AreaTypeEnum.java index 916d88505..1698ad2e0 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/java/cn/iocoder/yudao/framework/ip/core/enums/AreaTypeEnum.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/java/cn/iocoder/yudao/framework/ip/core/enums/AreaTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.framework.ip.core.enums; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,7 +13,7 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum AreaTypeEnum implements IntArrayValuable { +public enum AreaTypeEnum implements ArrayValuable { COUNTRY(1, "国家"), PROVINCE(2, "省份"), @@ -21,7 +21,7 @@ public enum AreaTypeEnum implements IntArrayValuable { DISTRICT(4, "地区"), // 县、镇、区等 ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AreaTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AreaTypeEnum::getType).toArray(Integer[]::new); /** * 类型 @@ -33,7 +33,7 @@ public enum AreaTypeEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } } diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/knowledge/AiKnowledgeDocumentStatusEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/knowledge/AiKnowledgeDocumentStatusEnum.java index a37fa8643..6ded3f6de 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/knowledge/AiKnowledgeDocumentStatusEnum.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/knowledge/AiKnowledgeDocumentStatusEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.ai.enums.knowledge; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,7 +13,7 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum AiKnowledgeDocumentStatusEnum implements IntArrayValuable { +public enum AiKnowledgeDocumentStatusEnum implements ArrayValuable { IN_PROGRESS(10, "索引中"), SUCCESS(20, "可用"), @@ -29,10 +29,10 @@ public enum AiKnowledgeDocumentStatusEnum implements IntArrayValuable { */ private final String name; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AiKnowledgeDocumentStatusEnum::getStatus).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AiKnowledgeDocumentStatusEnum::getStatus).toArray(Integer[]::new); @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/music/AiMusicGenerateModeEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/music/AiMusicGenerateModeEnum.java index 651731b60..82052943b 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/music/AiMusicGenerateModeEnum.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/music/AiMusicGenerateModeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.ai.enums.music; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,7 +13,7 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum AiMusicGenerateModeEnum implements IntArrayValuable { +public enum AiMusicGenerateModeEnum implements ArrayValuable { DESCRIPTION(1, "描述模式"), LYRIC(2, "歌词模式"); @@ -27,10 +27,10 @@ public enum AiMusicGenerateModeEnum implements IntArrayValuable { */ private final String name; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AiMusicGenerateModeEnum::getMode).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AiMusicGenerateModeEnum::getMode).toArray(Integer[]::new); @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/music/AiMusicStatusEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/music/AiMusicStatusEnum.java index f1298cf56..9340a5976 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/music/AiMusicStatusEnum.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/music/AiMusicStatusEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.ai.enums.music; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,7 +13,7 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum AiMusicStatusEnum implements IntArrayValuable { +public enum AiMusicStatusEnum implements ArrayValuable { IN_PROGRESS(10, "进行中"), SUCCESS(20, "已完成"), @@ -29,10 +29,10 @@ public enum AiMusicStatusEnum implements IntArrayValuable { */ private final String name; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AiMusicStatusEnum::getStatus).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AiMusicStatusEnum::getStatus).toArray(Integer[]::new); @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/write/AiWriteTypeEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/write/AiWriteTypeEnum.java index 49d825be8..6d91433b7 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/write/AiWriteTypeEnum.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/write/AiWriteTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.ai.enums.write; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,7 +13,7 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum AiWriteTypeEnum implements IntArrayValuable { +public enum AiWriteTypeEnum implements ArrayValuable { WRITING(1, "撰写", "请撰写一篇关于 [{}] 的文章。文章的内容格式:{},语气:{},语言:{},长度:{}。请确保涵盖主要内容,不需要除了正文内容外的其他回复,如标题、额外的解释或道歉。"), REPLY(2, "回复", "请针对如下内容:[{}] 做个回复。回复内容参考:[{}], 回复格式:{},语气:{},语言:{},长度:{}。不需要除了正文内容外的其他回复,如标题、开头、额外的解释或道歉。"); @@ -32,10 +32,10 @@ public enum AiWriteTypeEnum implements IntArrayValuable { */ private final String prompt; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AiWriteTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AiWriteTypeEnum::getType).toArray(Integer[]::new); @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmModelFormTypeEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmModelFormTypeEnum.java index 3bca6c82b..40e96af06 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmModelFormTypeEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmModelFormTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.bpm.enums.definition; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,19 +13,19 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum BpmModelFormTypeEnum implements IntArrayValuable { +public enum BpmModelFormTypeEnum implements ArrayValuable { NORMAL(10, "流程表单"), // 对应 BpmFormDO CUSTOM(20, "业务表单") // 业务自己定义的表单,自己进行数据的存储 ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmModelFormTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmModelFormTypeEnum::getType).toArray(Integer[]::new); private final Integer type; private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmModelTypeEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmModelTypeEnum.java index 9863a44e8..6b2b85766 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmModelTypeEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmModelTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.bpm.enums.definition; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,18 +13,18 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum BpmModelTypeEnum implements IntArrayValuable { +public enum BpmModelTypeEnum implements ArrayValuable { BPMN(10, "BPMN 设计器"), // https://bpmn.io/toolkit/bpmn-js/ SIMPLE(20, "SIMPLE 设计器"); // 参考钉钉、飞书工作流的设计器 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmModelTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmModelTypeEnum::getType).toArray(Integer[]::new); private final Integer type; private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModeConditionType.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModeConditionType.java index 234ec7e47..1a3fedce8 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModeConditionType.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModeConditionType.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.bpm.enums.definition; import cn.hutool.core.util.ArrayUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -14,12 +14,12 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum BpmSimpleModeConditionType implements IntArrayValuable { +public enum BpmSimpleModeConditionType implements ArrayValuable { EXPRESSION(1, "条件表达式"), RULE(2, "条件规则"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmSimpleModeConditionType::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmSimpleModeConditionType::getType).toArray(Integer[]::new); private final Integer type; @@ -30,7 +30,7 @@ public enum BpmSimpleModeConditionType implements IntArrayValuable { } @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } } diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java index 36ad0e5ee..7e933f242 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.bpm.enums.definition; import cn.hutool.core.util.ArrayUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -15,7 +15,7 @@ import java.util.Objects; */ @Getter @AllArgsConstructor -public enum BpmSimpleModelNodeType implements IntArrayValuable { +public enum BpmSimpleModelNodeType implements ArrayValuable { // 0 ~ 1 开始和结束 START_NODE(0, "startEvent", "开始节点"), @@ -35,7 +35,7 @@ public enum BpmSimpleModelNodeType implements IntArrayValuable { // TODO @芋艿。 感觉还是分开好理解一点,也好处理一点。前端结构中把聚合节点显示并传过来。 ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmSimpleModelNodeType::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmSimpleModelNodeType::getType).toArray(Integer[]::new); public static final String BPMN_USER_TASK_TYPE = "userTask"; @@ -69,7 +69,7 @@ public enum BpmSimpleModelNodeType implements IntArrayValuable { } @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskApproveMethodEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskApproveMethodEnum.java index 9d4dd63af..0c79ac50c 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskApproveMethodEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskApproveMethodEnum.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.bpm.enums.definition; import cn.hutool.core.util.ArrayUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -14,7 +14,7 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum BpmUserTaskApproveMethodEnum implements IntArrayValuable { +public enum BpmUserTaskApproveMethodEnum implements ArrayValuable { RANDOM(1, "随机挑选一人审批"), RATIO(2, "多人会签(按通过比例)"), // 会签(按通过比例) @@ -31,14 +31,14 @@ public enum BpmUserTaskApproveMethodEnum implements IntArrayValuable { */ private final String name; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskApproveMethodEnum::getMethod).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskApproveMethodEnum::getMethod).toArray(Integer[]::new); public static BpmUserTaskApproveMethodEnum valueOf(Integer method) { return ArrayUtil.firstMatch(item -> item.getMethod().equals(method), values()); } @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } } diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskApproveTypeEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskApproveTypeEnum.java index fa6dba665..353124a08 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskApproveTypeEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskApproveTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.bpm.enums.definition; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,18 +13,18 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum BpmUserTaskApproveTypeEnum implements IntArrayValuable { +public enum BpmUserTaskApproveTypeEnum implements ArrayValuable { USER(1), // 人工审批 AUTO_APPROVE(2), // 自动通过 AUTO_REJECT(3); // 自动拒绝 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskApproveTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskApproveTypeEnum::getType).toArray(Integer[]::new); private final Integer type; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskAssignEmptyHandlerTypeEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskAssignEmptyHandlerTypeEnum.java index 7a7242a49..f6cee3b59 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskAssignEmptyHandlerTypeEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskAssignEmptyHandlerTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.bpm.enums.definition; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.Getter; import lombok.RequiredArgsConstructor; @@ -13,7 +13,7 @@ import java.util.Arrays; */ @RequiredArgsConstructor @Getter -public enum BpmUserTaskAssignEmptyHandlerTypeEnum implements IntArrayValuable { +public enum BpmUserTaskAssignEmptyHandlerTypeEnum implements ArrayValuable { APPROVE(1), // 自动通过 REJECT(2), // 自动拒绝 @@ -21,12 +21,12 @@ public enum BpmUserTaskAssignEmptyHandlerTypeEnum implements IntArrayValuable { ASSIGN_ADMIN(4), // 转交给流程管理员 ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskAssignEmptyHandlerTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskAssignEmptyHandlerTypeEnum::getType).toArray(Integer[]::new); private final Integer type; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskAssignStartUserHandlerTypeEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskAssignStartUserHandlerTypeEnum.java index 501281502..6d0633afa 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskAssignStartUserHandlerTypeEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskAssignStartUserHandlerTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.bpm.enums.definition; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.Getter; import lombok.RequiredArgsConstructor; @@ -13,18 +13,18 @@ import java.util.Arrays; */ @RequiredArgsConstructor @Getter -public enum BpmUserTaskAssignStartUserHandlerTypeEnum implements IntArrayValuable { +public enum BpmUserTaskAssignStartUserHandlerTypeEnum implements ArrayValuable { START_USER_AUDIT(1), // 由发起人对自己审批 SKIP(2), // 自动跳过【参考飞书】:1)如果当前节点还有其他审批人,则交由其他审批人进行审批;2)如果当前节点没有其他审批人,则该节点自动通过 TRANSFER_DEPT_LEADER(3); // 转交给部门负责人审批【参考飞书】:若部门负责人为空,则自动通过 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskAssignStartUserHandlerTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskAssignStartUserHandlerTypeEnum::getType).toArray(Integer[]::new); private final Integer type; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskRejectHandlerType.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskRejectHandlerType.java index f2d48f7d9..adf2fd08d 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskRejectHandlerType.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskRejectHandlerType.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.bpm.enums.definition; import cn.hutool.core.util.ArrayUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -14,7 +14,7 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum BpmUserTaskRejectHandlerType implements IntArrayValuable { +public enum BpmUserTaskRejectHandlerType implements ArrayValuable { FINISH_PROCESS_INSTANCE(1, "终止流程"), RETURN_USER_TASK(2, "驳回到指定任务节点"); @@ -22,14 +22,14 @@ public enum BpmUserTaskRejectHandlerType implements IntArrayValuable { private final Integer type; private final String name; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskRejectHandlerType::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskRejectHandlerType::getType).toArray(Integer[]::new); public static BpmUserTaskRejectHandlerType typeOf(Integer type) { return ArrayUtil.firstMatch(item -> item.getType().equals(type), values()); } @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } } diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskTimeoutHandlerTypeEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskTimeoutHandlerTypeEnum.java index 0d56c9b37..ef9825c48 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskTimeoutHandlerTypeEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskTimeoutHandlerTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.bpm.enums.definition; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,7 +13,7 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum BpmUserTaskTimeoutHandlerTypeEnum implements IntArrayValuable { +public enum BpmUserTaskTimeoutHandlerTypeEnum implements ArrayValuable { REMINDER(1,"自动提醒"), APPROVE(2, "自动同意"), @@ -22,10 +22,10 @@ public enum BpmUserTaskTimeoutHandlerTypeEnum implements IntArrayValuable { private final Integer type; private final String name; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskTimeoutHandlerTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskTimeoutHandlerTypeEnum::getType).toArray(Integer[]::new); @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusEnum.java index c635e92ba..e6b23777e 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.bpm.enums.task; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import lombok.AllArgsConstructor; import lombok.Getter; @@ -14,7 +14,7 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum BpmProcessInstanceStatusEnum implements IntArrayValuable { +public enum BpmProcessInstanceStatusEnum implements ArrayValuable { NOT_START(-1, "未开始"), RUNNING(1, "审批中"), @@ -22,7 +22,7 @@ public enum BpmProcessInstanceStatusEnum implements IntArrayValuable { REJECT(3, "审批不通过"), CANCEL(4, "已取消"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmProcessInstanceStatusEnum::getStatus).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmProcessInstanceStatusEnum::getStatus).toArray(Integer[]::new); /** * 状态 @@ -34,7 +34,7 @@ public enum BpmProcessInstanceStatusEnum implements IntArrayValuable { private final String desc; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmTaskCandidateStrategyEnum.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmTaskCandidateStrategyEnum.java index 240aa18dc..0f3390c65 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmTaskCandidateStrategyEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmTaskCandidateStrategyEnum.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.enums; import cn.hutool.core.util.ArrayUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -16,7 +16,7 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum BpmTaskCandidateStrategyEnum implements IntArrayValuable { +public enum BpmTaskCandidateStrategyEnum implements ArrayValuable { ROLE(10, "角色"), DEPT_MEMBER(20, "部门的成员"), // 包括负责人 @@ -33,7 +33,7 @@ public enum BpmTaskCandidateStrategyEnum implements IntArrayValuable { ASSIGN_EMPTY(1, "审批人为空"), ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmTaskCandidateStrategyEnum::getStrategy).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmTaskCandidateStrategyEnum::getStrategy).toArray(Integer[]::new); /** * 类型 @@ -49,7 +49,7 @@ public enum BpmTaskCandidateStrategyEnum implements IntArrayValuable { } @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/business/CrmBusinessEndStatusEnum.java b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/business/CrmBusinessEndStatusEnum.java index 4736c01b7..e199a882a 100644 --- a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/business/CrmBusinessEndStatusEnum.java +++ b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/business/CrmBusinessEndStatusEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.crm.enums.business; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.Getter; import lombok.RequiredArgsConstructor; @@ -13,13 +13,13 @@ import java.util.Arrays; */ @RequiredArgsConstructor @Getter -public enum CrmBusinessEndStatusEnum implements IntArrayValuable { +public enum CrmBusinessEndStatusEnum implements ArrayValuable { WIN(1, "赢单"), LOSE(2, "输单"), INVALID(3, "无效"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmBusinessEndStatusEnum::getStatus).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmBusinessEndStatusEnum::getStatus).toArray(Integer[]::new); /** * 场景类型 @@ -31,7 +31,7 @@ public enum CrmBusinessEndStatusEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/common/CrmAuditStatusEnum.java b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/common/CrmAuditStatusEnum.java index 67709e95b..320348141 100644 --- a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/common/CrmAuditStatusEnum.java +++ b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/common/CrmAuditStatusEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.crm.enums.common; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.Getter; import lombok.RequiredArgsConstructor; @@ -13,7 +13,7 @@ import java.util.Arrays; */ @RequiredArgsConstructor @Getter -public enum CrmAuditStatusEnum implements IntArrayValuable { +public enum CrmAuditStatusEnum implements ArrayValuable { DRAFT(0, "未提交"), PROCESS(10, "审批中"), @@ -24,10 +24,10 @@ public enum CrmAuditStatusEnum implements IntArrayValuable { private final Integer status; private final String name; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmAuditStatusEnum::getStatus).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmAuditStatusEnum::getStatus).toArray(Integer[]::new); @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/common/CrmBizTypeEnum.java b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/common/CrmBizTypeEnum.java index 8402ad288..f2d3aaa99 100644 --- a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/common/CrmBizTypeEnum.java +++ b/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; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.Getter; import lombok.RequiredArgsConstructor; @@ -15,7 +15,7 @@ import java.util.Arrays; */ @RequiredArgsConstructor @Getter -public enum CrmBizTypeEnum implements IntArrayValuable { +public enum CrmBizTypeEnum implements ArrayValuable { CRM_CLUE(1, "线索"), CRM_CUSTOMER(2, "客户"), @@ -27,7 +27,7 @@ public enum CrmBizTypeEnum implements IntArrayValuable { CRM_RECEIVABLE_PLAN(8, "回款计划") ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmBizTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmBizTypeEnum::getType).toArray(Integer[]::new); /** * 类型 @@ -45,7 +45,7 @@ public enum CrmBizTypeEnum implements IntArrayValuable { } @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/common/CrmSceneTypeEnum.java b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/common/CrmSceneTypeEnum.java index 945d7c6a3..9a1a4209b 100644 --- a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/common/CrmSceneTypeEnum.java +++ b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/common/CrmSceneTypeEnum.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.crm.enums.common; import cn.hutool.core.util.ObjUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -14,13 +14,13 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum CrmSceneTypeEnum implements IntArrayValuable { +public enum CrmSceneTypeEnum implements ArrayValuable { OWNER(1, "我负责的"), INVOLVED(2, "我参与的"), SUBORDINATE(3, "下属负责的"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmSceneTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmSceneTypeEnum::getType).toArray(Integer[]::new); /** * 场景类型 @@ -44,7 +44,7 @@ public enum CrmSceneTypeEnum implements IntArrayValuable { } @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/customer/CrmCustomerLevelEnum.java b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/customer/CrmCustomerLevelEnum.java index aa06b05eb..44402755e 100644 --- a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/customer/CrmCustomerLevelEnum.java +++ b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/customer/CrmCustomerLevelEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.crm.enums.customer; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,13 +13,13 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum CrmCustomerLevelEnum implements IntArrayValuable { +public enum CrmCustomerLevelEnum implements ArrayValuable { IMPORTANT(1, "A(重点客户)"), GENERAL(2, "B(普通客户)"), LOW_PRIORITY(3, "C(非优先客户)"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmCustomerLevelEnum::getLevel).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmCustomerLevelEnum::getLevel).toArray(Integer[]::new); /** * 状态 @@ -31,7 +31,7 @@ public enum CrmCustomerLevelEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/customer/CrmCustomerLimitConfigTypeEnum.java b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/customer/CrmCustomerLimitConfigTypeEnum.java index 2cf8d7811..7fd5eb310 100644 --- a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/customer/CrmCustomerLimitConfigTypeEnum.java +++ b/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; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -15,7 +15,7 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum CrmCustomerLimitConfigTypeEnum implements IntArrayValuable { +public enum CrmCustomerLimitConfigTypeEnum implements ArrayValuable { /** * 拥有客户数限制 @@ -27,7 +27,7 @@ public enum CrmCustomerLimitConfigTypeEnum implements IntArrayValuable { CUSTOMER_LOCK_LIMIT(2, "锁定客户数限制"), ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmCustomerLimitConfigTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmCustomerLimitConfigTypeEnum::getType).toArray(Integer[]::new); /** * 状态 @@ -45,7 +45,7 @@ public enum CrmCustomerLimitConfigTypeEnum implements IntArrayValuable { } @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/permission/CrmPermissionLevelEnum.java b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/permission/CrmPermissionLevelEnum.java index f36e8cfff..85ab1bb95 100644 --- a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/permission/CrmPermissionLevelEnum.java +++ b/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; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -17,13 +17,13 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum CrmPermissionLevelEnum implements IntArrayValuable { +public enum CrmPermissionLevelEnum implements ArrayValuable { OWNER(1, "负责人"), READ(2, "只读"), WRITE(3, "读写"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmPermissionLevelEnum::getLevel).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmPermissionLevelEnum::getLevel).toArray(Integer[]::new); /** * 级别 @@ -35,7 +35,7 @@ public enum CrmPermissionLevelEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/product/CrmProductStatusEnum.java b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/product/CrmProductStatusEnum.java index 9516c35c6..f940e8810 100644 --- a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/product/CrmProductStatusEnum.java +++ b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/product/CrmProductStatusEnum.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.crm.enums.product; import cn.hutool.core.util.ObjUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -15,12 +15,12 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum CrmProductStatusEnum implements IntArrayValuable { +public enum CrmProductStatusEnum implements ArrayValuable { DISABLE(0, "下架"), ENABLE(1, "上架"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmProductStatusEnum::getStatus).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmProductStatusEnum::getStatus).toArray(Integer[]::new); /** * 状态 @@ -32,7 +32,7 @@ public enum CrmProductStatusEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/receivable/CrmReceivableReturnTypeEnum.java b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/receivable/CrmReceivableReturnTypeEnum.java index 3c01fe95c..e10385ad9 100644 --- a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/receivable/CrmReceivableReturnTypeEnum.java +++ b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/receivable/CrmReceivableReturnTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.crm.enums.receivable; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,7 +13,7 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum CrmReceivableReturnTypeEnum implements IntArrayValuable { +public enum CrmReceivableReturnTypeEnum implements ArrayValuable { CHECK(1, "支票"), CASH(2, "现金"), @@ -24,7 +24,7 @@ public enum CrmReceivableReturnTypeEnum implements IntArrayValuable { WECHAT_PAY(7, "微信支付"), OTHER(8, "其它"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmReceivableReturnTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmReceivableReturnTypeEnum::getType).toArray(Integer[]::new); /** * 类型 @@ -36,7 +36,7 @@ public enum CrmReceivableReturnTypeEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/ErpAuditStatus.java b/yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/ErpAuditStatus.java index a10147a70..42c0174b5 100644 --- a/yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/ErpAuditStatus.java +++ b/yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/ErpAuditStatus.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.erp.enums; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.Getter; import lombok.RequiredArgsConstructor; @@ -15,12 +15,12 @@ import java.util.Arrays; */ @RequiredArgsConstructor @Getter -public enum ErpAuditStatus implements IntArrayValuable { +public enum ErpAuditStatus implements ArrayValuable { PROCESS(10, "未审核"), // 审核中 APPROVE(20, "已审核"); // 审核通过 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ErpAuditStatus::getStatus).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(ErpAuditStatus::getStatus).toArray(Integer[]::new); /** * 状态 @@ -32,7 +32,7 @@ public enum ErpAuditStatus implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/common/ErpBizTypeEnum.java b/yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/common/ErpBizTypeEnum.java index a2770598e..5b09756a2 100644 --- a/yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/common/ErpBizTypeEnum.java +++ b/yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/common/ErpBizTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.erp.enums.common; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.Getter; import lombok.RequiredArgsConstructor; @@ -13,7 +13,7 @@ import java.util.Arrays; */ @RequiredArgsConstructor @Getter -public enum ErpBizTypeEnum implements IntArrayValuable { +public enum ErpBizTypeEnum implements ArrayValuable { PURCHASE_ORDER(10, "采购订单"), PURCHASE_IN(11, "采购入库"), @@ -24,7 +24,7 @@ public enum ErpBizTypeEnum implements IntArrayValuable { SALE_RETURN(22, "销售退货"), ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ErpBizTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(ErpBizTypeEnum::getType).toArray(Integer[]::new); /** * 类型 @@ -36,7 +36,7 @@ public enum ErpBizTypeEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/stock/ErpStockRecordBizTypeEnum.java b/yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/stock/ErpStockRecordBizTypeEnum.java index 559bf4ccf..9ed19c565 100644 --- a/yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/stock/ErpStockRecordBizTypeEnum.java +++ b/yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/stock/ErpStockRecordBizTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.erp.enums.stock; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.Getter; import lombok.RequiredArgsConstructor; @@ -13,7 +13,7 @@ import java.util.Arrays; */ @RequiredArgsConstructor @Getter -public enum ErpStockRecordBizTypeEnum implements IntArrayValuable { +public enum ErpStockRecordBizTypeEnum implements ArrayValuable { OTHER_IN(10, "其它入库"), OTHER_IN_CANCEL(11, "其它入库(作废)"), @@ -44,7 +44,7 @@ public enum ErpStockRecordBizTypeEnum implements IntArrayValuable { PURCHASE_RETURN_CANCEL(81, "采购退货出库(作废)"), ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ErpStockRecordBizTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(ErpStockRecordBizTypeEnum::getType).toArray(Integer[]::new); /** * 类型 @@ -56,7 +56,7 @@ public enum ErpStockRecordBizTypeEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/device/IotDeviceStatusEnum.java b/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/device/IotDeviceStatusEnum.java index 5fd983dc0..0ec2ac776 100644 --- a/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/device/IotDeviceStatusEnum.java +++ b/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/device/IotDeviceStatusEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.iot.enums.device; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.Getter; import java.util.Arrays; @@ -11,14 +11,14 @@ import java.util.Arrays; * @author haohao */ @Getter -public enum IotDeviceStatusEnum implements IntArrayValuable { +public enum IotDeviceStatusEnum implements ArrayValuable { INACTIVE(0, "未激活"), ONLINE(1, "在线"), OFFLINE(2, "离线"), DISABLED(3, "已禁用"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotDeviceStatusEnum::getStatus).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotDeviceStatusEnum::getStatus).toArray(Integer[]::new); /** * 状态 @@ -48,7 +48,7 @@ public enum IotDeviceStatusEnum implements IntArrayValuable { } @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotDataFormatEnum.java b/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotDataFormatEnum.java index 8a1afa070..0cfe1c9f4 100644 --- a/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotDataFormatEnum.java +++ b/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotDataFormatEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.iot.enums.product; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -14,12 +14,12 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum IotDataFormatEnum implements IntArrayValuable { +public enum IotDataFormatEnum implements ArrayValuable { JSON(0, "标准数据格式(JSON)"), CUSTOMIZE(1, "透传/自定义"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotDataFormatEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotDataFormatEnum::getType).toArray(Integer[]::new); /** * 类型 @@ -31,7 +31,7 @@ public enum IotDataFormatEnum implements IntArrayValuable { private final String description; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotNetTypeEnum.java b/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotNetTypeEnum.java index 718e86d13..561bc66f9 100644 --- a/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotNetTypeEnum.java +++ b/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotNetTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.iot.enums.product; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,14 +13,14 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum IotNetTypeEnum implements IntArrayValuable { +public enum IotNetTypeEnum implements ArrayValuable { WIFI(0, "Wi-Fi"), CELLULAR(1, "Cellular"), ETHERNET(2, "Ethernet"), OTHER(3, "其他"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotNetTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotNetTypeEnum::getType).toArray(Integer[]::new); /** * 类型 @@ -32,7 +32,7 @@ public enum IotNetTypeEnum implements IntArrayValuable { private final String description; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProductDeviceTypeEnum.java b/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProductDeviceTypeEnum.java index 99b75f3fb..3d8ca10b3 100644 --- a/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProductDeviceTypeEnum.java +++ b/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProductDeviceTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.iot.enums.product; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,7 +13,7 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum IotProductDeviceTypeEnum implements IntArrayValuable { +public enum IotProductDeviceTypeEnum implements ArrayValuable { DIRECT(0, "直连设备"), GATEWAY_CHILD(1, "网关子设备"), @@ -29,10 +29,10 @@ public enum IotProductDeviceTypeEnum implements IntArrayValuable { */ private final String description; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotProductDeviceTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotProductDeviceTypeEnum::getType).toArray(Integer[]::new); @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProductFunctionTypeEnum.java b/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProductFunctionTypeEnum.java index 7a924997a..1e95c6b78 100644 --- a/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProductFunctionTypeEnum.java +++ b/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProductFunctionTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.iot.enums.product; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,13 +13,13 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum IotProductFunctionTypeEnum implements IntArrayValuable { +public enum IotProductFunctionTypeEnum implements ArrayValuable { PROPERTY(1, "属性"), SERVICE(2, "服务"), EVENT(3, "事件"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotProductFunctionTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotProductFunctionTypeEnum::getType).toArray(Integer[]::new); /** * 类型 @@ -31,7 +31,7 @@ public enum IotProductFunctionTypeEnum implements IntArrayValuable { private final String description; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProductStatusEnum.java b/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProductStatusEnum.java index e64a3d678..32daf1671 100644 --- a/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProductStatusEnum.java +++ b/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProductStatusEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.iot.enums.product; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,12 +13,12 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum IotProductStatusEnum implements IntArrayValuable { +public enum IotProductStatusEnum implements ArrayValuable { UNPUBLISHED(0, "开发中"), PUBLISHED(1, "已发布"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotProductStatusEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotProductStatusEnum::getType).toArray(Integer[]::new); /** * 类型 @@ -30,7 +30,7 @@ public enum IotProductStatusEnum implements IntArrayValuable { private final String description; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProtocolTypeEnum.java b/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProtocolTypeEnum.java index c36a37723..9eb57044f 100644 --- a/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProtocolTypeEnum.java +++ b/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProtocolTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.iot.enums.product; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,7 +13,7 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum IotProtocolTypeEnum implements IntArrayValuable { +public enum IotProtocolTypeEnum implements ArrayValuable { CUSTOM(0, "自定义"), MODBUS(1, "Modbus"), @@ -21,7 +21,7 @@ public enum IotProtocolTypeEnum implements IntArrayValuable { ZIGBEE(3, "ZigBee"), BLE(4, "BLE"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotProtocolTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotProtocolTypeEnum::getType).toArray(Integer[]::new); /** * 类型 @@ -33,7 +33,7 @@ public enum IotProtocolTypeEnum implements IntArrayValuable { private final String description; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotValidateTypeEnum.java b/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotValidateTypeEnum.java index 9a8092b7b..11604b4dd 100644 --- a/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotValidateTypeEnum.java +++ b/yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotValidateTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.iot.enums.product; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,12 +13,12 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum IotValidateTypeEnum implements IntArrayValuable { +public enum IotValidateTypeEnum implements ArrayValuable { WEAK(0, "弱校验"), NONE(1, "免校验"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotValidateTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotValidateTypeEnum::getType).toArray(Integer[]::new); /** * 类型 @@ -30,7 +30,7 @@ public enum IotValidateTypeEnum implements IntArrayValuable { private final String description; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/comment/ProductCommentAuditStatusEnum.java b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/comment/ProductCommentAuditStatusEnum.java index 276839daf..f46f1285c 100644 --- a/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/comment/ProductCommentAuditStatusEnum.java +++ b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/comment/ProductCommentAuditStatusEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.product.enums.comment; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,13 +13,13 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum ProductCommentAuditStatusEnum implements IntArrayValuable { +public enum ProductCommentAuditStatusEnum implements ArrayValuable { NONE(1, "待审核"), APPROVE(2, "审批通过"), REJECT(2, "审批不通过"),; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ProductCommentAuditStatusEnum::getStatus).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(ProductCommentAuditStatusEnum::getStatus).toArray(Integer[]::new); /** * 审批状态 @@ -31,7 +31,7 @@ public enum ProductCommentAuditStatusEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/comment/ProductCommentScoresEnum.java b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/comment/ProductCommentScoresEnum.java index a114e1ab8..58c6a45c5 100644 --- a/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/comment/ProductCommentScoresEnum.java +++ b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/comment/ProductCommentScoresEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.product.enums.comment; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,7 +13,7 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum ProductCommentScoresEnum implements IntArrayValuable { +public enum ProductCommentScoresEnum implements ArrayValuable { ONE(1, "1星"), TWO(2, "2星"), @@ -21,7 +21,7 @@ public enum ProductCommentScoresEnum implements IntArrayValuable { FOUR(4, "4星"), FIVE(5, "5星"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ProductCommentScoresEnum::getScores).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(ProductCommentScoresEnum::getScores).toArray(Integer[]::new); /** * 星级 @@ -34,7 +34,7 @@ public enum ProductCommentScoresEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/spu/ProductSpuStatusEnum.java b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/spu/ProductSpuStatusEnum.java index 4ba6124e0..5735f49b1 100644 --- a/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/spu/ProductSpuStatusEnum.java +++ b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/spu/ProductSpuStatusEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.product.enums.spu; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,13 +13,13 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum ProductSpuStatusEnum implements IntArrayValuable { +public enum ProductSpuStatusEnum implements ArrayValuable { RECYCLE(-1, "回收站"), DISABLE(0, "下架"), ENABLE(1, "上架"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ProductSpuStatusEnum::getStatus).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(ProductSpuStatusEnum::getStatus).toArray(Integer[]::new); /** * 状态 @@ -31,7 +31,7 @@ public enum ProductSpuStatusEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/banner/BannerPositionEnum.java b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/banner/BannerPositionEnum.java index 8a8338c8a..0d0db4e91 100644 --- a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/banner/BannerPositionEnum.java +++ b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/banner/BannerPositionEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.promotion.enums.banner; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,7 +13,7 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum BannerPositionEnum implements IntArrayValuable { +public enum BannerPositionEnum implements ArrayValuable { HOME_POSITION(1, "首页"), SECKILL_POSITION(2, "秒杀活动页"), @@ -21,7 +21,7 @@ public enum BannerPositionEnum implements IntArrayValuable { DISCOUNT_POSITION(4, "限时折扣页"), REWARD_POSITION(5, "满减送页"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BannerPositionEnum::getPosition).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BannerPositionEnum::getPosition).toArray(Integer[]::new); /** * 值 @@ -33,7 +33,7 @@ public enum BannerPositionEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/bargain/BargainRecordStatusEnum.java b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/bargain/BargainRecordStatusEnum.java index d5c22a7c5..85328d231 100644 --- a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/bargain/BargainRecordStatusEnum.java +++ b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/bargain/BargainRecordStatusEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.promotion.enums.bargain; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,14 +13,14 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum BargainRecordStatusEnum implements IntArrayValuable { +public enum BargainRecordStatusEnum implements ArrayValuable { IN_PROGRESS(1, "砍价中"), SUCCESS(2, "砍价成功"), FAILED(3, "砍价失败"), // 活动到期时,会自动将到期的砍价全部设置为过期 ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BargainRecordStatusEnum::getStatus).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BargainRecordStatusEnum::getStatus).toArray(Integer[]::new); /** * 值 @@ -32,7 +32,7 @@ public enum BargainRecordStatusEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/combination/CombinationRecordStatusEnum.java b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/combination/CombinationRecordStatusEnum.java index 627e13946..e11a2572a 100644 --- a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/combination/CombinationRecordStatusEnum.java +++ b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/combination/CombinationRecordStatusEnum.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.promotion.enums.combination; import cn.hutool.core.util.ObjectUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -14,13 +14,13 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum CombinationRecordStatusEnum implements IntArrayValuable { +public enum CombinationRecordStatusEnum implements ArrayValuable { IN_PROGRESS(0, "进行中"), SUCCESS(1, "拼团成功"), FAILED(2, "拼团失败"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CombinationRecordStatusEnum::getStatus).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CombinationRecordStatusEnum::getStatus).toArray(Integer[]::new); /** * 状态值 @@ -32,7 +32,7 @@ public enum CombinationRecordStatusEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionActivityStatusEnum.java b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionActivityStatusEnum.java index e45e37beb..1f2df82a4 100644 --- a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionActivityStatusEnum.java +++ b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionActivityStatusEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.promotion.enums.common; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -14,14 +14,14 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum PromotionActivityStatusEnum implements IntArrayValuable { +public enum PromotionActivityStatusEnum implements ArrayValuable { WAIT(10, "未开始"), RUN(20, "进行中"), END(30, "已结束"), CLOSE(40, "已关闭"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PromotionActivityStatusEnum::getStatus).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PromotionActivityStatusEnum::getStatus).toArray(Integer[]::new); /** * 状态值 @@ -33,7 +33,7 @@ public enum PromotionActivityStatusEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionConditionTypeEnum.java b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionConditionTypeEnum.java index 05e62e399..9f23c1dee 100644 --- a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionConditionTypeEnum.java +++ b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionConditionTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.promotion.enums.common; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,12 +13,12 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum PromotionConditionTypeEnum implements IntArrayValuable { +public enum PromotionConditionTypeEnum implements ArrayValuable { PRICE(10, "满 N 元"), COUNT(20, "满 N 件"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PromotionConditionTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PromotionConditionTypeEnum::getType).toArray(Integer[]::new); /** * 类型值 @@ -30,7 +30,7 @@ public enum PromotionConditionTypeEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionDiscountTypeEnum.java b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionDiscountTypeEnum.java index 7da6b4b08..1209de309 100644 --- a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionDiscountTypeEnum.java +++ b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionDiscountTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.promotion.enums.common; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,13 +13,13 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum PromotionDiscountTypeEnum implements IntArrayValuable { +public enum PromotionDiscountTypeEnum implements ArrayValuable { PRICE(1, "满减"), // 具体金额 PERCENT(2, "折扣"), // 百分比 ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PromotionDiscountTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PromotionDiscountTypeEnum::getType).toArray(Integer[]::new); /** * 优惠类型 @@ -31,7 +31,7 @@ public enum PromotionDiscountTypeEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionProductScopeEnum.java b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionProductScopeEnum.java index 4a95cb1fa..716ac77fb 100644 --- a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionProductScopeEnum.java +++ b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionProductScopeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.promotion.enums.common; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -14,13 +14,13 @@ import java.util.Objects; */ @Getter @AllArgsConstructor -public enum PromotionProductScopeEnum implements IntArrayValuable { +public enum PromotionProductScopeEnum implements ArrayValuable { ALL(1, "全部商品"), SPU(2, "指定商品"), CATEGORY(3, "指定品类"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PromotionProductScopeEnum::getScope).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PromotionProductScopeEnum::getScope).toArray(Integer[]::new); /** * 范围值 @@ -32,7 +32,7 @@ public enum PromotionProductScopeEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionTypeEnum.java b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionTypeEnum.java index 4524c198d..1501ed231 100644 --- a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionTypeEnum.java +++ b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.promotion.enums.common; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,7 +13,7 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum PromotionTypeEnum implements IntArrayValuable { +public enum PromotionTypeEnum implements ArrayValuable { SECKILL_ACTIVITY(1, "秒杀活动"), BARGAIN_ACTIVITY(2, "砍价活动"), @@ -27,7 +27,7 @@ public enum PromotionTypeEnum implements IntArrayValuable { POINT(8, "积分") ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PromotionTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PromotionTypeEnum::getType).toArray(Integer[]::new); /** * 类型值 @@ -39,7 +39,7 @@ public enum PromotionTypeEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/coupon/CouponStatusEnum.java b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/coupon/CouponStatusEnum.java index bef4db225..4121600cd 100644 --- a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/coupon/CouponStatusEnum.java +++ b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/coupon/CouponStatusEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.promotion.enums.coupon; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,13 +13,13 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum CouponStatusEnum implements IntArrayValuable { +public enum CouponStatusEnum implements ArrayValuable { UNUSED(1, "未使用"), USED(2, "已使用"), EXPIRE(3, "已过期"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CouponStatusEnum::getStatus).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CouponStatusEnum::getStatus).toArray(Integer[]::new); /** * 值 @@ -31,7 +31,7 @@ public enum CouponStatusEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/coupon/CouponTakeTypeEnum.java b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/coupon/CouponTakeTypeEnum.java index eff4137ac..ca3d370c2 100644 --- a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/coupon/CouponTakeTypeEnum.java +++ b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/coupon/CouponTakeTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.promotion.enums.coupon; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -14,14 +14,14 @@ import java.util.Objects; */ @AllArgsConstructor @Getter -public enum CouponTakeTypeEnum implements IntArrayValuable { +public enum CouponTakeTypeEnum implements ArrayValuable { USER(1, "直接领取"), // 用户可在首页、每日领劵直接领取 ADMIN(2, "指定发放"), // 后台指定会员赠送优惠劵 REGISTER(3, "新人券"), // 注册时自动领取 ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CouponTakeTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CouponTakeTypeEnum::getType).toArray(Integer[]::new); /** * 值 @@ -33,7 +33,7 @@ public enum CouponTakeTypeEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/coupon/CouponTemplateValidityTypeEnum.java b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/coupon/CouponTemplateValidityTypeEnum.java index 391515de3..27c1bb9d9 100644 --- a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/coupon/CouponTemplateValidityTypeEnum.java +++ b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/coupon/CouponTemplateValidityTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.promotion.enums.coupon; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,13 +13,13 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum CouponTemplateValidityTypeEnum implements IntArrayValuable { +public enum CouponTemplateValidityTypeEnum implements ArrayValuable { DATE(1, "固定日期"), TERM(2, "领取之后"), ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CouponTemplateValidityTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CouponTemplateValidityTypeEnum::getType).toArray(Integer[]::new); /** * 值 @@ -31,7 +31,7 @@ public enum CouponTemplateValidityTypeEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/diy/DiyPageEnum.java b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/diy/DiyPageEnum.java index fa00adaad..810585e7a 100644 --- a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/diy/DiyPageEnum.java +++ b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/diy/DiyPageEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.promotion.enums.diy; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,13 +13,13 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum DiyPageEnum implements IntArrayValuable { +public enum DiyPageEnum implements ArrayValuable { INDEX(1, "首页"), MY(2, "我的"), ; - private static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DiyPageEnum::getPage).toArray(); + private static final Integer[] ARRAYS = Arrays.stream(values()).map(DiyPageEnum::getPage).toArray(Integer[]::new); /** * 页面编号 @@ -32,7 +32,7 @@ public enum DiyPageEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/kefu/KeFuMessageContentTypeEnum.java b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/kefu/KeFuMessageContentTypeEnum.java index 4a058ab56..94329d2cd 100644 --- a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/kefu/KeFuMessageContentTypeEnum.java +++ b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/kefu/KeFuMessageContentTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.promotion.enums.kefu; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,7 +13,7 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum KeFuMessageContentTypeEnum implements IntArrayValuable { +public enum KeFuMessageContentTypeEnum implements ArrayValuable { TEXT(1, "文本消息"), IMAGE(2, "图片消息"), @@ -25,7 +25,7 @@ public enum KeFuMessageContentTypeEnum implements IntArrayValuable { PRODUCT(10, "商品消息"), ORDER(11, "订单消息"); - private static final int[] ARRAYS = Arrays.stream(values()).mapToInt(KeFuMessageContentTypeEnum::getType).toArray(); + private static final Integer[] ARRAYS = Arrays.stream(values()).map(KeFuMessageContentTypeEnum::getType).toArray(Integer[]::new); /** * 类型 @@ -38,7 +38,7 @@ public enum KeFuMessageContentTypeEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-statistics-api/src/main/java/cn/iocoder/yudao/module/statistics/enums/TimeRangeTypeEnum.java b/yudao-module-mall/yudao-module-statistics-api/src/main/java/cn/iocoder/yudao/module/statistics/enums/TimeRangeTypeEnum.java index 5f3c8fe22..42b09fdcb 100644 --- a/yudao-module-mall/yudao-module-statistics-api/src/main/java/cn/iocoder/yudao/module/statistics/enums/TimeRangeTypeEnum.java +++ b/yudao-module-mall/yudao-module-statistics-api/src/main/java/cn/iocoder/yudao/module/statistics/enums/TimeRangeTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.statistics.enums; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,7 +13,7 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum TimeRangeTypeEnum implements IntArrayValuable { +public enum TimeRangeTypeEnum implements ArrayValuable { /** * 天 @@ -33,7 +33,7 @@ public enum TimeRangeTypeEnum implements IntArrayValuable { YEAR(365), ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TimeRangeTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(TimeRangeTypeEnum::getType).toArray(Integer[]::new); /** * 类型 @@ -41,7 +41,7 @@ public enum TimeRangeTypeEnum implements IntArrayValuable { private final Integer type; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/aftersale/AfterSaleStatusEnum.java b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/aftersale/AfterSaleStatusEnum.java index 23c1b2efe..b29df1c65 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/aftersale/AfterSaleStatusEnum.java +++ b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/aftersale/AfterSaleStatusEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.trade.enums.aftersale; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -18,7 +18,7 @@ import static cn.hutool.core.util.ArrayUtil.firstMatch; */ @AllArgsConstructor @Getter -public enum AfterSaleStatusEnum implements IntArrayValuable { +public enum AfterSaleStatusEnum implements ArrayValuable { /** * 【申请售后】 @@ -54,7 +54,7 @@ public enum AfterSaleStatusEnum implements IntArrayValuable { SELLER_REFUSE(63,"卖家拒绝收货", "商家拒绝收货"), // 有赞的状态提示:商家拒绝收货,不同意退款 ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AfterSaleStatusEnum::getStatus).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AfterSaleStatusEnum::getStatus).toArray(Integer[]::new); /** * 进行中的售后状态 @@ -84,7 +84,7 @@ public enum AfterSaleStatusEnum implements IntArrayValuable { private final String content; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/aftersale/AfterSaleTypeEnum.java b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/aftersale/AfterSaleTypeEnum.java index dfb32f7be..8e0ed752c 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/aftersale/AfterSaleTypeEnum.java +++ b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/aftersale/AfterSaleTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.trade.enums.aftersale; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.Getter; import lombok.RequiredArgsConstructor; @@ -13,12 +13,12 @@ import java.util.Arrays; */ @RequiredArgsConstructor @Getter -public enum AfterSaleTypeEnum implements IntArrayValuable { +public enum AfterSaleTypeEnum implements ArrayValuable { IN_SALE(10, "售中退款"), // 交易完成前买家申请退款 AFTER_SALE(20, "售后退款"); // 交易完成后买家申请退款 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AfterSaleTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AfterSaleTypeEnum::getType).toArray(Integer[]::new); /** * 类型 @@ -30,7 +30,7 @@ public enum AfterSaleTypeEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/aftersale/AfterSaleWayEnum.java b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/aftersale/AfterSaleWayEnum.java index 1d608a102..ca1a39bf7 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/aftersale/AfterSaleWayEnum.java +++ b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/aftersale/AfterSaleWayEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.trade.enums.aftersale; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.Getter; import lombok.RequiredArgsConstructor; @@ -13,12 +13,12 @@ import java.util.Arrays; */ @RequiredArgsConstructor @Getter -public enum AfterSaleWayEnum implements IntArrayValuable { +public enum AfterSaleWayEnum implements ArrayValuable { REFUND(10, "仅退款"), RETURN_AND_REFUND(20, "退货退款"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AfterSaleWayEnum::getWay).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AfterSaleWayEnum::getWay).toArray(Integer[]::new); /** * 方式 @@ -30,7 +30,7 @@ public enum AfterSaleWayEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageBindModeEnum.java b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageBindModeEnum.java index 72ce10032..c8efa106c 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageBindModeEnum.java +++ b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageBindModeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.trade.enums.brokerage; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,7 +13,7 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum BrokerageBindModeEnum implements IntArrayValuable { +public enum BrokerageBindModeEnum implements ArrayValuable { /** * 只要用户没有推广人,随时都可以绑定分销关系 @@ -29,7 +29,7 @@ public enum BrokerageBindModeEnum implements IntArrayValuable { OVERRIDE(3, "覆盖绑定"), ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BrokerageBindModeEnum::getMode).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BrokerageBindModeEnum::getMode).toArray(Integer[]::new); /** * 模式 @@ -41,7 +41,7 @@ public enum BrokerageBindModeEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageEnabledConditionEnum.java b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageEnabledConditionEnum.java index 990d10e16..cbb62d44b 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageEnabledConditionEnum.java +++ b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageEnabledConditionEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.trade.enums.brokerage; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,7 +13,7 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum BrokerageEnabledConditionEnum implements IntArrayValuable { +public enum BrokerageEnabledConditionEnum implements ArrayValuable { /** * 所有用户都可以分销 @@ -25,7 +25,7 @@ public enum BrokerageEnabledConditionEnum implements IntArrayValuable { ADMIN(2, "指定分销"), ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BrokerageEnabledConditionEnum::getCondition).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BrokerageEnabledConditionEnum::getCondition).toArray(Integer[]::new); /** * 模式 @@ -37,7 +37,7 @@ public enum BrokerageEnabledConditionEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageRecordBizTypeEnum.java b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageRecordBizTypeEnum.java index 546069465..cf7fbc290 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageRecordBizTypeEnum.java +++ b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageRecordBizTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.trade.enums.brokerage; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,14 +13,14 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum BrokerageRecordBizTypeEnum implements IntArrayValuable { +public enum BrokerageRecordBizTypeEnum implements ArrayValuable { ORDER(1, "获得推广佣金", "获得推广佣金 {}", true), WITHDRAW(2, "提现申请", "提现申请扣除佣金 {}", false), WITHDRAW_REJECT(3, "提现申请驳回", "提现申请驳回,返还佣金 {}", true), ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BrokerageRecordBizTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BrokerageRecordBizTypeEnum::getType).toArray(Integer[]::new); /** * 类型 @@ -40,7 +40,7 @@ public enum BrokerageRecordBizTypeEnum implements IntArrayValuable { private final boolean add; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageRecordStatusEnum.java b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageRecordStatusEnum.java index 827390998..9bfba4a72 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageRecordStatusEnum.java +++ b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageRecordStatusEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.trade.enums.brokerage; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,14 +13,14 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum BrokerageRecordStatusEnum implements IntArrayValuable { +public enum BrokerageRecordStatusEnum implements ArrayValuable { WAIT_SETTLEMENT(0, "待结算"), SETTLEMENT(1, "已结算"), CANCEL(2, "已取消"), ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BrokerageRecordStatusEnum::getStatus).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BrokerageRecordStatusEnum::getStatus).toArray(Integer[]::new); /** * 状态 @@ -32,7 +32,7 @@ public enum BrokerageRecordStatusEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageWithdrawStatusEnum.java b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageWithdrawStatusEnum.java index b68db4a71..fe574f73e 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageWithdrawStatusEnum.java +++ b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageWithdrawStatusEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.trade.enums.brokerage; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -14,7 +14,7 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum BrokerageWithdrawStatusEnum implements IntArrayValuable { +public enum BrokerageWithdrawStatusEnum implements ArrayValuable { AUDITING(0, "审核中"), AUDIT_SUCCESS(10, "审核通过"), @@ -23,7 +23,7 @@ public enum BrokerageWithdrawStatusEnum implements IntArrayValuable { WITHDRAW_FAIL(21, "提现失败"), ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BrokerageWithdrawStatusEnum::getStatus).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BrokerageWithdrawStatusEnum::getStatus).toArray(Integer[]::new); /** * 状态 @@ -35,7 +35,7 @@ public enum BrokerageWithdrawStatusEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageWithdrawTypeEnum.java b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageWithdrawTypeEnum.java index cf063516c..b374566d3 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageWithdrawTypeEnum.java +++ b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageWithdrawTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.trade.enums.brokerage; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,7 +13,7 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum BrokerageWithdrawTypeEnum implements IntArrayValuable { +public enum BrokerageWithdrawTypeEnum implements ArrayValuable { WALLET(1, "钱包"), BANK(2, "银行卡"), @@ -22,7 +22,7 @@ public enum BrokerageWithdrawTypeEnum implements IntArrayValuable { WECHAT_API(5, "微信零钱"), // 自动打款,通过微信转账 API ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BrokerageWithdrawTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BrokerageWithdrawTypeEnum::getType).toArray(Integer[]::new); /** * 类型 @@ -34,7 +34,7 @@ public enum BrokerageWithdrawTypeEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/delivery/DeliveryExpressChargeModeEnum.java b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/delivery/DeliveryExpressChargeModeEnum.java index 7503dd322..2794f0618 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/delivery/DeliveryExpressChargeModeEnum.java +++ b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/delivery/DeliveryExpressChargeModeEnum.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.trade.enums.delivery; import cn.hutool.core.util.ArrayUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -14,13 +14,13 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum DeliveryExpressChargeModeEnum implements IntArrayValuable { +public enum DeliveryExpressChargeModeEnum implements ArrayValuable { COUNT(1, "按件"), WEIGHT(2,"按重量"), VOLUME(3, "按体积"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DeliveryExpressChargeModeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(DeliveryExpressChargeModeEnum::getType).toArray(Integer[]::new); /** * 类型 @@ -32,7 +32,7 @@ public enum DeliveryExpressChargeModeEnum implements IntArrayValuable { private final String desc; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/delivery/DeliveryTypeEnum.java b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/delivery/DeliveryTypeEnum.java index 27e11370c..0aaf388bf 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/delivery/DeliveryTypeEnum.java +++ b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/delivery/DeliveryTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.trade.enums.delivery; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,12 +13,12 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum DeliveryTypeEnum implements IntArrayValuable { +public enum DeliveryTypeEnum implements ArrayValuable { EXPRESS(1, "快递发货"), PICK_UP(2, "用户自提"),; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DeliveryTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(DeliveryTypeEnum::getType).toArray(Integer[]::new); /** * 配送方式 @@ -30,7 +30,7 @@ public enum DeliveryTypeEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderCancelTypeEnum.java b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderCancelTypeEnum.java index cfd25468f..b614f7865 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderCancelTypeEnum.java +++ b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderCancelTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.trade.enums.order; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.Getter; import lombok.RequiredArgsConstructor; @@ -13,14 +13,14 @@ import java.util.Arrays; */ @RequiredArgsConstructor @Getter -public enum TradeOrderCancelTypeEnum implements IntArrayValuable { +public enum TradeOrderCancelTypeEnum implements ArrayValuable { PAY_TIMEOUT(10, "超时未支付"), AFTER_SALE_CLOSE(20, "退款关闭"), MEMBER_CANCEL(30, "买家取消"), COMBINATION_CLOSE(40, "拼团关闭"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TradeOrderCancelTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(TradeOrderCancelTypeEnum::getType).toArray(Integer[]::new); /** * 关闭类型 @@ -32,7 +32,7 @@ public enum TradeOrderCancelTypeEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderItemAfterSaleStatusEnum.java b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderItemAfterSaleStatusEnum.java index 50640717e..f613981e6 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderItemAfterSaleStatusEnum.java +++ b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderItemAfterSaleStatusEnum.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.trade.enums.order; import cn.hutool.core.util.ObjectUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.Getter; import lombok.RequiredArgsConstructor; @@ -14,13 +14,13 @@ import java.util.Arrays; */ @RequiredArgsConstructor @Getter -public enum TradeOrderItemAfterSaleStatusEnum implements IntArrayValuable { +public enum TradeOrderItemAfterSaleStatusEnum implements ArrayValuable { NONE(0, "未售后"), APPLY(10, "售后中"), SUCCESS(20, "售后成功"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TradeOrderItemAfterSaleStatusEnum::getStatus).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(TradeOrderItemAfterSaleStatusEnum::getStatus).toArray(Integer[]::new); /** * 状态值 @@ -32,7 +32,7 @@ public enum TradeOrderItemAfterSaleStatusEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderRefundStatusEnum.java b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderRefundStatusEnum.java index d0e4190bb..20c93c3e3 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderRefundStatusEnum.java +++ b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderRefundStatusEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.trade.enums.order; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.Getter; import lombok.RequiredArgsConstructor; @@ -13,13 +13,13 @@ import java.util.Arrays; */ @RequiredArgsConstructor @Getter -public enum TradeOrderRefundStatusEnum implements IntArrayValuable { +public enum TradeOrderRefundStatusEnum implements ArrayValuable { NONE(0, "未退款"), PART(10, "部分退款"), ALL(20, "全部退款"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TradeOrderRefundStatusEnum::getStatus).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(TradeOrderRefundStatusEnum::getStatus).toArray(Integer[]::new); /** * 状态值 @@ -31,7 +31,7 @@ public enum TradeOrderRefundStatusEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderStatusEnum.java b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderStatusEnum.java index 86d3d996f..d1f90eb34 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderStatusEnum.java +++ b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderStatusEnum.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.trade.enums.order; import cn.hutool.core.util.ObjectUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import lombok.Getter; import lombok.RequiredArgsConstructor; @@ -15,7 +15,7 @@ import java.util.Arrays; */ @RequiredArgsConstructor @Getter -public enum TradeOrderStatusEnum implements IntArrayValuable { +public enum TradeOrderStatusEnum implements ArrayValuable { UNPAID(0, "待支付"), UNDELIVERED(10, "待发货"), @@ -23,7 +23,7 @@ public enum TradeOrderStatusEnum implements IntArrayValuable { COMPLETED(30, "已完成"), CANCELED(40, "已取消"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TradeOrderStatusEnum::getStatus).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(TradeOrderStatusEnum::getStatus).toArray(Integer[]::new); /** * 状态值 @@ -35,7 +35,7 @@ public enum TradeOrderStatusEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderTypeEnum.java b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderTypeEnum.java index 0fccebb47..94624560d 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderTypeEnum.java +++ b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderTypeEnum.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.trade.enums.order; import cn.hutool.core.util.ObjectUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.Getter; import lombok.RequiredArgsConstructor; @@ -14,7 +14,7 @@ import java.util.Arrays; */ @RequiredArgsConstructor @Getter -public enum TradeOrderTypeEnum implements IntArrayValuable { +public enum TradeOrderTypeEnum implements ArrayValuable { NORMAL(0, "普通订单"), SECKILL(1, "秒杀订单"), @@ -23,7 +23,7 @@ public enum TradeOrderTypeEnum implements IntArrayValuable { POINT(4, "积分商城"), ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TradeOrderTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(TradeOrderTypeEnum::getType).toArray(Integer[]::new); /** * 类型 @@ -35,7 +35,7 @@ public enum TradeOrderTypeEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/enums/point/MemberPointBizTypeEnum.java b/yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/enums/point/MemberPointBizTypeEnum.java index ef491f42a..794f230dd 100644 --- a/yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/enums/point/MemberPointBizTypeEnum.java +++ b/yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/enums/point/MemberPointBizTypeEnum.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.member.enums.point; import cn.hutool.core.util.EnumUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -14,7 +14,7 @@ import java.util.Objects; */ @AllArgsConstructor @Getter -public enum MemberPointBizTypeEnum implements IntArrayValuable { +public enum MemberPointBizTypeEnum implements ArrayValuable { SIGN(1, "签到", "签到获得 {} 积分", true), ADMIN(2, "管理员修改", "管理员修改 {} 积分", true), @@ -46,8 +46,8 @@ public enum MemberPointBizTypeEnum implements IntArrayValuable { private final boolean add; @Override - public int[] array() { - return new int[0]; + public Integer[] array() { + return new Integer[0]; } public static MemberPointBizTypeEnum getByType(Integer type) { diff --git a/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/order/PayOrderStatusEnum.java b/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/order/PayOrderStatusEnum.java index 0d8bfe9e9..d5c8b01aa 100644 --- a/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/order/PayOrderStatusEnum.java +++ b/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/order/PayOrderStatusEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.pay.enums.order; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import lombok.AllArgsConstructor; import lombok.Getter; @@ -14,7 +14,7 @@ import java.util.Objects; */ @Getter @AllArgsConstructor -public enum PayOrderStatusEnum implements IntArrayValuable { +public enum PayOrderStatusEnum implements ArrayValuable { WAITING(0, "未支付"), SUCCESS(10, "支付成功"), @@ -26,8 +26,8 @@ public enum PayOrderStatusEnum implements IntArrayValuable { private final String name; @Override - public int[] array() { - return new int[0]; + public Integer[] array() { + return new Integer[0]; } /** diff --git a/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/transfer/PayTransferTypeEnum.java b/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/transfer/PayTransferTypeEnum.java index c88151589..66fa6f38f 100644 --- a/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/transfer/PayTransferTypeEnum.java +++ b/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/transfer/PayTransferTypeEnum.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.pay.enums.transfer; import cn.hutool.core.util.ArrayUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -14,7 +14,7 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum PayTransferTypeEnum implements IntArrayValuable { +public enum PayTransferTypeEnum implements ArrayValuable { ALIPAY_BALANCE(1, "支付宝余额"), WX_BALANCE(2, "微信余额"), @@ -30,10 +30,10 @@ public enum PayTransferTypeEnum implements IntArrayValuable { private final Integer type; private final String name; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PayTransferTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PayTransferTypeEnum::getType).toArray(Integer[]::new); @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/wallet/PayWalletBizTypeEnum.java b/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/wallet/PayWalletBizTypeEnum.java index 6682dc5d6..30336da76 100644 --- a/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/wallet/PayWalletBizTypeEnum.java +++ b/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/wallet/PayWalletBizTypeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.pay.enums.wallet; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,7 +13,7 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum PayWalletBizTypeEnum implements IntArrayValuable { +public enum PayWalletBizTypeEnum implements ArrayValuable { RECHARGE(1, "充值"), RECHARGE_REFUND(2, "充值退款"), @@ -31,10 +31,10 @@ public enum PayWalletBizTypeEnum implements IntArrayValuable { */ private final String description; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PayWalletBizTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PayWalletBizTypeEnum::getType).toArray(Integer[]::new); @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-pay/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/enums/transfer/PayTransferTypeEnum.java b/yudao-module-pay/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/enums/transfer/PayTransferTypeEnum.java index a7580f013..a2d9d44c6 100644 --- a/yudao-module-pay/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/enums/transfer/PayTransferTypeEnum.java +++ b/yudao-module-pay/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/enums/transfer/PayTransferTypeEnum.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.framework.pay.core.enums.transfer; import cn.hutool.core.util.ArrayUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -14,7 +14,7 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum PayTransferTypeEnum implements IntArrayValuable { +public enum PayTransferTypeEnum implements ArrayValuable { ALIPAY_BALANCE(1, "支付宝余额"), WX_BALANCE(2, "微信余额"), @@ -30,10 +30,10 @@ public enum PayTransferTypeEnum implements IntArrayValuable { private final Integer type; private final String name; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PayTransferTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PayTransferTypeEnum::getType).toArray(Integer[]::new); @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/permission/DataScopeEnum.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/permission/DataScopeEnum.java index 6b06b06d6..3440a17c3 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/permission/DataScopeEnum.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/permission/DataScopeEnum.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.enums.permission; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -15,7 +15,7 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum DataScopeEnum implements IntArrayValuable { +public enum DataScopeEnum implements ArrayValuable { ALL(1), // 全部数据权限 @@ -30,10 +30,10 @@ public enum DataScopeEnum implements IntArrayValuable { */ private final Integer scope; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DataScopeEnum::getScope).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(DataScopeEnum::getScope).toArray(Integer[]::new); @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/sms/SmsSceneEnum.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/sms/SmsSceneEnum.java index 225685d1b..0cfa8844b 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/sms/SmsSceneEnum.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/sms/SmsSceneEnum.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.enums.sms; import cn.hutool.core.util.ArrayUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -14,7 +14,7 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum SmsSceneEnum implements IntArrayValuable { +public enum SmsSceneEnum implements ArrayValuable { MEMBER_LOGIN(1, "user-sms-login", "会员用户 - 手机号登陆"), MEMBER_UPDATE_MOBILE(2, "user-update-mobile", "会员用户 - 修改手机"), @@ -23,7 +23,7 @@ public enum SmsSceneEnum implements IntArrayValuable { ADMIN_MEMBER_LOGIN(21, "admin-sms-login", "后台用户 - 手机号登录"); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(SmsSceneEnum::getScene).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(SmsSceneEnum::getScene).toArray(Integer[]::new); /** * 验证场景的编号 @@ -39,7 +39,7 @@ public enum SmsSceneEnum implements IntArrayValuable { private final String description; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; } diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/social/SocialTypeEnum.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/social/SocialTypeEnum.java index 602eb1e63..e94b920b5 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/social/SocialTypeEnum.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/social/SocialTypeEnum.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.enums.social; import cn.hutool.core.util.ArrayUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.ArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -14,7 +14,7 @@ import java.util.Arrays; */ @Getter @AllArgsConstructor -public enum SocialTypeEnum implements IntArrayValuable { +public enum SocialTypeEnum implements ArrayValuable { /** * Gitee @@ -55,7 +55,7 @@ public enum SocialTypeEnum implements IntArrayValuable { WECHAT_MINI_APP(34, "WECHAT_MINI_APP"), ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(SocialTypeEnum::getType).toArray(); + public static final Integer[] ARRAYS = Arrays.stream(values()).map(SocialTypeEnum::getType).toArray(Integer[]::new); /** * 类型 @@ -67,7 +67,7 @@ public enum SocialTypeEnum implements IntArrayValuable { private final String source; @Override - public int[] array() { + public Integer[] array() { return ARRAYS; }