Просмотр исходного кода

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

puhui999 6 месяцев назад
Родитель
Сommit
d83b7cd5b9
87 измененных файлов с 366 добавлено и 365 удалено
  1. 15 0
      yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/core/ArrayValuable.java
  2. 0 15
      yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/core/IntArrayValuable.java
  3. 4 4
      yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/CommonStatusEnum.java
  4. 4 4
      yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/DateIntervalEnum.java
  5. 4 4
      yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/TerminalEnum.java
  6. 4 4
      yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/UserTypeEnum.java
  7. 4 4
      yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnum.java
  8. 11 9
      yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnumCollectionValidator.java
  9. 8 9
      yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnumValidator.java
  10. 4 4
      yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/java/cn/iocoder/yudao/framework/ip/core/enums/AreaTypeEnum.java
  11. 4 4
      yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/knowledge/AiKnowledgeDocumentStatusEnum.java
  12. 4 4
      yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/music/AiMusicGenerateModeEnum.java
  13. 4 4
      yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/music/AiMusicStatusEnum.java
  14. 4 4
      yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/write/AiWriteTypeEnum.java
  15. 4 4
      yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmModelFormTypeEnum.java
  16. 4 4
      yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmModelTypeEnum.java
  17. 4 4
      yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModeConditionType.java
  18. 4 4
      yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java
  19. 4 4
      yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskApproveMethodEnum.java
  20. 4 4
      yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskApproveTypeEnum.java
  21. 4 4
      yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskAssignEmptyHandlerTypeEnum.java
  22. 4 4
      yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskAssignStartUserHandlerTypeEnum.java
  23. 4 4
      yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskRejectHandlerType.java
  24. 4 4
      yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskTimeoutHandlerTypeEnum.java
  25. 4 4
      yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusEnum.java
  26. 4 4
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmTaskCandidateStrategyEnum.java
  27. 4 4
      yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/business/CrmBusinessEndStatusEnum.java
  28. 4 4
      yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/common/CrmAuditStatusEnum.java
  29. 4 4
      yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/common/CrmBizTypeEnum.java
  30. 4 4
      yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/common/CrmSceneTypeEnum.java
  31. 4 4
      yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/customer/CrmCustomerLevelEnum.java
  32. 4 4
      yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/customer/CrmCustomerLimitConfigTypeEnum.java
  33. 4 4
      yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/permission/CrmPermissionLevelEnum.java
  34. 4 4
      yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/product/CrmProductStatusEnum.java
  35. 4 4
      yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/receivable/CrmReceivableReturnTypeEnum.java
  36. 4 4
      yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/ErpAuditStatus.java
  37. 4 4
      yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/common/ErpBizTypeEnum.java
  38. 4 4
      yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/stock/ErpStockRecordBizTypeEnum.java
  39. 4 4
      yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/device/IotDeviceStatusEnum.java
  40. 4 4
      yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotDataFormatEnum.java
  41. 4 4
      yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotNetTypeEnum.java
  42. 4 4
      yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProductDeviceTypeEnum.java
  43. 4 4
      yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProductFunctionTypeEnum.java
  44. 4 4
      yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProductStatusEnum.java
  45. 4 4
      yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProtocolTypeEnum.java
  46. 4 4
      yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotValidateTypeEnum.java
  47. 4 4
      yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/comment/ProductCommentAuditStatusEnum.java
  48. 4 4
      yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/comment/ProductCommentScoresEnum.java
  49. 4 4
      yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/spu/ProductSpuStatusEnum.java
  50. 4 4
      yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/banner/BannerPositionEnum.java
  51. 4 4
      yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/bargain/BargainRecordStatusEnum.java
  52. 4 4
      yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/combination/CombinationRecordStatusEnum.java
  53. 4 4
      yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionActivityStatusEnum.java
  54. 4 4
      yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionConditionTypeEnum.java
  55. 4 4
      yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionDiscountTypeEnum.java
  56. 4 4
      yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionProductScopeEnum.java
  57. 4 4
      yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionTypeEnum.java
  58. 4 4
      yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/coupon/CouponStatusEnum.java
  59. 4 4
      yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/coupon/CouponTakeTypeEnum.java
  60. 4 4
      yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/coupon/CouponTemplateValidityTypeEnum.java
  61. 4 4
      yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/diy/DiyPageEnum.java
  62. 4 4
      yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/kefu/KeFuMessageContentTypeEnum.java
  63. 4 4
      yudao-module-mall/yudao-module-statistics-api/src/main/java/cn/iocoder/yudao/module/statistics/enums/TimeRangeTypeEnum.java
  64. 4 4
      yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/aftersale/AfterSaleStatusEnum.java
  65. 4 4
      yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/aftersale/AfterSaleTypeEnum.java
  66. 4 4
      yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/aftersale/AfterSaleWayEnum.java
  67. 4 4
      yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageBindModeEnum.java
  68. 4 4
      yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageEnabledConditionEnum.java
  69. 4 4
      yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageRecordBizTypeEnum.java
  70. 4 4
      yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageRecordStatusEnum.java
  71. 4 4
      yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageWithdrawStatusEnum.java
  72. 4 4
      yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageWithdrawTypeEnum.java
  73. 4 4
      yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/delivery/DeliveryExpressChargeModeEnum.java
  74. 4 4
      yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/delivery/DeliveryTypeEnum.java
  75. 4 4
      yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderCancelTypeEnum.java
  76. 4 4
      yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderItemAfterSaleStatusEnum.java
  77. 4 4
      yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderRefundStatusEnum.java
  78. 4 4
      yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderStatusEnum.java
  79. 4 4
      yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderTypeEnum.java
  80. 4 4
      yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/enums/point/MemberPointBizTypeEnum.java
  81. 4 4
      yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/order/PayOrderStatusEnum.java
  82. 4 4
      yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/transfer/PayTransferTypeEnum.java
  83. 4 4
      yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/wallet/PayWalletBizTypeEnum.java
  84. 4 4
      yudao-module-pay/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/enums/transfer/PayTransferTypeEnum.java
  85. 4 4
      yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/permission/DataScopeEnum.java
  86. 4 4
      yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/sms/SmsSceneEnum.java
  87. 4 4
      yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/social/SocialTypeEnum.java

+ 15 - 0
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<T> {
+
+    /**
+     * @return 数组
+     */
+    T[] array();
+
+} 

+ 0 - 15
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/core/IntArrayValuable.java

@@ -1,15 +0,0 @@
-package cn.iocoder.yudao.framework.common.core;
-
-/**
- * 可生成 Int 数组的接口
- *
- * @author 芋道源码
- */
-public interface IntArrayValuable {
-
-    /**
-     * @return int 数组
-     */
-    int[] array();
-
-}

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 }

+ 4 - 4
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<Integer> {
 
     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;
     }
 }

+ 4 - 4
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<? extends IntArrayValuable> value();
+    Class<? extends ArrayValuable<?>> value();
 
     String message() default "必须在指定范围 {value}";
 

+ 11 - 9
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<InEnum, Collection<Integer>> {
+public class InEnumCollectionValidator implements ConstraintValidator<InEnum, Collection<?>> {
 
-    private List<Integer> 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<Integer> 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(); // 重新添加错误提示语句

+ 8 - 9
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<InEnum, Integer> {
+public class InEnumValidator implements ConstraintValidator<InEnum, Object> {
 
-    private List<Integer> 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<InEnum, Integer> {
         if (values.contains(value)) {
             return true;
         }
-        // 校验不通过,自定义提示语句(因为,注解上的 value 是枚举类,无法获得枚举类的实际值)
+        // 校验不通过,自定义提示语句
         context.disableDefaultConstraintViolation(); // 禁用默认的 message 的值
         context.buildConstraintViolationWithTemplate(context.getDefaultConstraintMessageTemplate()
                 .replaceAll("\\{value}", values.toString())).addConstraintViolation(); // 重新添加错误提示语句

+ 4 - 4
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<Integer> {
 
     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;
     }
 }

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 }

+ 4 - 4
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<Integer> {
 
     // 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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 }

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 }

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     /**
      * 拥有客户数限制
@@ -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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     /**
      * 天
@@ -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;
     }
 

+ 4 - 4
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<Integer> {
 
     /**
      * 【申请售后】
@@ -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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     /**
      * 只要用户没有推广人,随时都可以绑定分销关系
@@ -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;
     }
 

+ 4 - 4
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<Integer> {
 
     /**
      * 所有用户都可以分销
@@ -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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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) {

+ 4 - 4
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<Integer> {
 
     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];
     }
 
     /**

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     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;
     }
 

+ 4 - 4
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<Integer> {
 
     /**
      * 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;
     }