Commit 295fad7d975569e3efab7414713295eb0b660cd1

Authored by YunaiV
2 parents bd7f9761 a33fb127

Merge branch 'develop' of https://gitee.com/zhijiantianya/ruoyi-vue-pro into master-jdk17

Showing 100 changed files with 434 additions and 398 deletions
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/core/IntArrayValuable.java renamed to yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/core/ArrayValuable.java
1 package cn.iocoder.yudao.framework.common.core; 1 package cn.iocoder.yudao.framework.common.core;
2 2
3 /** 3 /**
4 - * 可生成 Int 数组的接口 4 + * 可生成 T 数组的接口
5 * 5 *
6 - * @author 芋道源码 6 + * @author HUIHUI
7 */ 7 */
8 -public interface IntArrayValuable { 8 +public interface ArrayValuable<T> {
9 9
10 /** 10 /**
11 - * @return int 数组 11 + * @return 数组
12 */ 12 */
13 - int[] array(); 13 + T[] array();
14 14
15 -} 15 +}
16 \ No newline at end of file 16 \ No newline at end of file
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/CommonStatusEnum.java
1 package cn.iocoder.yudao.framework.common.enums; 1 package cn.iocoder.yudao.framework.common.enums;
2 2
3 import cn.hutool.core.util.ObjUtil; 3 import cn.hutool.core.util.ObjUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,12 +14,12 @@ import java.util.Arrays; @@ -14,12 +14,12 @@ import java.util.Arrays;
14 */ 14 */
15 @Getter 15 @Getter
16 @AllArgsConstructor 16 @AllArgsConstructor
17 -public enum CommonStatusEnum implements IntArrayValuable { 17 +public enum CommonStatusEnum implements ArrayValuable<Integer> {
18 18
19 ENABLE(0, "开启"), 19 ENABLE(0, "开启"),
20 DISABLE(1, "关闭"); 20 DISABLE(1, "关闭");
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CommonStatusEnum::getStatus).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CommonStatusEnum::getStatus).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 状态值 25 * 状态值
@@ -31,7 +31,7 @@ public enum CommonStatusEnum implements IntArrayValuable { @@ -31,7 +31,7 @@ public enum CommonStatusEnum implements IntArrayValuable {
31 private final String name; 31 private final String name;
32 32
33 @Override 33 @Override
34 - public int[] array() { 34 + public Integer[] array() {
35 return ARRAYS; 35 return ARRAYS;
36 } 36 }
37 37
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/DateIntervalEnum.java
1 package cn.iocoder.yudao.framework.common.enums; 1 package cn.iocoder.yudao.framework.common.enums;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,7 +14,7 @@ import java.util.Arrays; @@ -14,7 +14,7 @@ import java.util.Arrays;
14 */ 14 */
15 @Getter 15 @Getter
16 @AllArgsConstructor 16 @AllArgsConstructor
17 -public enum DateIntervalEnum implements IntArrayValuable { 17 +public enum DateIntervalEnum implements ArrayValuable<Integer> {
18 18
19 DAY(1, "天"), 19 DAY(1, "天"),
20 WEEK(2, "周"), 20 WEEK(2, "周"),
@@ -23,7 +23,7 @@ public enum DateIntervalEnum implements IntArrayValuable { @@ -23,7 +23,7 @@ public enum DateIntervalEnum implements IntArrayValuable {
23 YEAR(5, "年") 23 YEAR(5, "年")
24 ; 24 ;
25 25
26 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DateIntervalEnum::getInterval).toArray(); 26 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(DateIntervalEnum::getInterval).toArray(Integer[]::new);
27 27
28 /** 28 /**
29 * 类型 29 * 类型
@@ -35,7 +35,7 @@ public enum DateIntervalEnum implements IntArrayValuable { @@ -35,7 +35,7 @@ public enum DateIntervalEnum implements IntArrayValuable {
35 private final String name; 35 private final String name;
36 36
37 @Override 37 @Override
38 - public int[] array() { 38 + public Integer[] array() {
39 return ARRAYS; 39 return ARRAYS;
40 } 40 }
41 41
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/TerminalEnum.java
1 package cn.iocoder.yudao.framework.common.enums; 1 package cn.iocoder.yudao.framework.common.enums;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.Getter; 4 import lombok.Getter;
5 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @RequiredArgsConstructor 14 @RequiredArgsConstructor
15 @Getter 15 @Getter
16 -public enum TerminalEnum implements IntArrayValuable { 16 +public enum TerminalEnum implements ArrayValuable<Integer> {
17 17
18 UNKNOWN(0, "未知"), // 目的:在无法解析到 terminal 时,使用它 18 UNKNOWN(0, "未知"), // 目的:在无法解析到 terminal 时,使用它
19 WECHAT_MINI_PROGRAM(10, "微信小程序"), 19 WECHAT_MINI_PROGRAM(10, "微信小程序"),
@@ -22,7 +22,7 @@ public enum TerminalEnum implements IntArrayValuable { @@ -22,7 +22,7 @@ public enum TerminalEnum implements IntArrayValuable {
22 APP(31, "手机 App"), 22 APP(31, "手机 App"),
23 ; 23 ;
24 24
25 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TerminalEnum::getTerminal).toArray(); 25 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(TerminalEnum::getTerminal).toArray(Integer[]::new);
26 26
27 /** 27 /**
28 * 终端 28 * 终端
@@ -34,7 +34,7 @@ public enum TerminalEnum implements IntArrayValuable { @@ -34,7 +34,7 @@ public enum TerminalEnum implements IntArrayValuable {
34 private final String name; 34 private final String name;
35 35
36 @Override 36 @Override
37 - public int[] array() { 37 + public Integer[] array() {
38 return ARRAYS; 38 return ARRAYS;
39 } 39 }
40 } 40 }
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/UserTypeEnum.java
1 package cn.iocoder.yudao.framework.common.enums; 1 package cn.iocoder.yudao.framework.common.enums;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -12,12 +12,12 @@ import java.util.Arrays; @@ -12,12 +12,12 @@ import java.util.Arrays;
12 */ 12 */
13 @AllArgsConstructor 13 @AllArgsConstructor
14 @Getter 14 @Getter
15 -public enum UserTypeEnum implements IntArrayValuable { 15 +public enum UserTypeEnum implements ArrayValuable<Integer> {
16 16
17 MEMBER(1, "会员"), // 面向 c 端,普通用户 17 MEMBER(1, "会员"), // 面向 c 端,普通用户
18 ADMIN(2, "管理员"); // 面向 b 端,管理后台 18 ADMIN(2, "管理员"); // 面向 b 端,管理后台
19 19
20 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(UserTypeEnum::getValue).toArray(); 20 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(UserTypeEnum::getValue).toArray(Integer[]::new);
21 21
22 /** 22 /**
23 * 类型 23 * 类型
@@ -33,7 +33,7 @@ public enum UserTypeEnum implements IntArrayValuable { @@ -33,7 +33,7 @@ public enum UserTypeEnum implements IntArrayValuable {
33 } 33 }
34 34
35 @Override 35 @Override
36 - public int[] array() { 36 + public Integer[] array() {
37 return ARRAYS; 37 return ARRAYS;
38 } 38 }
39 } 39 }
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnum.java
1 package cn.iocoder.yudao.framework.common.validation; 1 package cn.iocoder.yudao.framework.common.validation;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable;  
4 - 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import jakarta.validation.Constraint; 4 import jakarta.validation.Constraint;
6 import jakarta.validation.Payload; 5 import jakarta.validation.Payload;
  6 +
7 import java.lang.annotation.*; 7 import java.lang.annotation.*;
8 8
9 @Target({ 9 @Target({
@@ -22,9 +22,9 @@ import java.lang.annotation.*; @@ -22,9 +22,9 @@ import java.lang.annotation.*;
22 public @interface InEnum { 22 public @interface InEnum {
23 23
24 /** 24 /**
25 - * @return 实现 EnumValuable 接口的 25 + * @return 实现 ArrayValuable 接口的类
26 */ 26 */
27 - Class<? extends IntArrayValuable> value(); 27 + Class<? extends ArrayValuable<?>> value();
28 28
29 String message() default "必须在指定范围 {value}"; 29 String message() default "必须在指定范围 {value}";
30 30
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnumCollectionValidator.java
1 package cn.iocoder.yudao.framework.common.validation; 1 package cn.iocoder.yudao.framework.common.validation;
2 2
3 import cn.hutool.core.collection.CollUtil; 3 import cn.hutool.core.collection.CollUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable;  
5 - 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
6 import jakarta.validation.ConstraintValidator; 5 import jakarta.validation.ConstraintValidator;
7 import jakarta.validation.ConstraintValidatorContext; 6 import jakarta.validation.ConstraintValidatorContext;
  7 +
8 import java.util.Arrays; 8 import java.util.Arrays;
9 import java.util.Collection; 9 import java.util.Collection;
10 import java.util.Collections; 10 import java.util.Collections;
11 import java.util.List; 11 import java.util.List;
12 -import java.util.stream.Collectors;  
13 12
14 -public class InEnumCollectionValidator implements ConstraintValidator<InEnum, Collection<Integer>> { 13 +public class InEnumCollectionValidator implements ConstraintValidator<InEnum, Collection<?>> {
15 14
16 - private List<Integer> values; 15 + private List<?> values;
17 16
18 @Override 17 @Override
19 public void initialize(InEnum annotation) { 18 public void initialize(InEnum annotation) {
20 - IntArrayValuable[] values = annotation.value().getEnumConstants(); 19 + ArrayValuable<?>[] values = annotation.value().getEnumConstants();
21 if (values.length == 0) { 20 if (values.length == 0) {
22 this.values = Collections.emptyList(); 21 this.values = Collections.emptyList();
23 } else { 22 } else {
24 - this.values = Arrays.stream(values[0].array()).boxed().collect(Collectors.toList()); 23 + this.values = Arrays.asList(values[0].array());
25 } 24 }
26 } 25 }
27 26
28 @Override 27 @Override
29 - public boolean isValid(Collection<Integer> list, ConstraintValidatorContext context) { 28 + public boolean isValid(Collection<?> list, ConstraintValidatorContext context) {
  29 + if (list == null) {
  30 + return true;
  31 + }
30 // 校验通过 32 // 校验通过
31 if (CollUtil.containsAll(values, list)) { 33 if (CollUtil.containsAll(values, list)) {
32 return true; 34 return true;
33 } 35 }
34 - // 校验不通过,自定义提示语句(因为,注解上的 value 是枚举类,无法获得枚举类的实际值) 36 + // 校验不通过,自定义提示语句
35 context.disableDefaultConstraintViolation(); // 禁用默认的 message 的值 37 context.disableDefaultConstraintViolation(); // 禁用默认的 message 的值
36 context.buildConstraintViolationWithTemplate(context.getDefaultConstraintMessageTemplate() 38 context.buildConstraintViolationWithTemplate(context.getDefaultConstraintMessageTemplate()
37 .replaceAll("\\{value}", CollUtil.join(list, ","))).addConstraintViolation(); // 重新添加错误提示语句 39 .replaceAll("\\{value}", CollUtil.join(list, ","))).addConstraintViolation(); // 重新添加错误提示语句
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnumValidator.java
1 package cn.iocoder.yudao.framework.common.validation; 1 package cn.iocoder.yudao.framework.common.validation;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable;  
4 - 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import jakarta.validation.ConstraintValidator; 4 import jakarta.validation.ConstraintValidator;
6 import jakarta.validation.ConstraintValidatorContext; 5 import jakarta.validation.ConstraintValidatorContext;
  6 +
7 import java.util.Arrays; 7 import java.util.Arrays;
8 import java.util.Collections; 8 import java.util.Collections;
9 import java.util.List; 9 import java.util.List;
10 -import java.util.stream.Collectors;  
11 10
12 -public class InEnumValidator implements ConstraintValidator<InEnum, Integer> { 11 +public class InEnumValidator implements ConstraintValidator<InEnum, Object> {
13 12
14 - private List<Integer> values; 13 + private List<?> values;
15 14
16 @Override 15 @Override
17 public void initialize(InEnum annotation) { 16 public void initialize(InEnum annotation) {
18 - IntArrayValuable[] values = annotation.value().getEnumConstants(); 17 + ArrayValuable<?>[] values = annotation.value().getEnumConstants();
19 if (values.length == 0) { 18 if (values.length == 0) {
20 this.values = Collections.emptyList(); 19 this.values = Collections.emptyList();
21 } else { 20 } else {
22 - this.values = Arrays.stream(values[0].array()).boxed().collect(Collectors.toList()); 21 + this.values = Arrays.asList(values[0].array());
23 } 22 }
24 } 23 }
25 24
26 @Override 25 @Override
27 - public boolean isValid(Integer value, ConstraintValidatorContext context) { 26 + public boolean isValid(Object value, ConstraintValidatorContext context) {
28 // 为空时,默认不校验,即认为通过 27 // 为空时,默认不校验,即认为通过
29 if (value == null) { 28 if (value == null) {
30 return true; 29 return true;
@@ -33,7 +32,7 @@ public class InEnumValidator implements ConstraintValidator&lt;InEnum, Integer&gt; { @@ -33,7 +32,7 @@ public class InEnumValidator implements ConstraintValidator&lt;InEnum, Integer&gt; {
33 if (values.contains(value)) { 32 if (values.contains(value)) {
34 return true; 33 return true;
35 } 34 }
36 - // 校验不通过,自定义提示语句(因为,注解上的 value 是枚举类,无法获得枚举类的实际值) 35 + // 校验不通过,自定义提示语句
37 context.disableDefaultConstraintViolation(); // 禁用默认的 message 的值 36 context.disableDefaultConstraintViolation(); // 禁用默认的 message 的值
38 context.buildConstraintViolationWithTemplate(context.getDefaultConstraintMessageTemplate() 37 context.buildConstraintViolationWithTemplate(context.getDefaultConstraintMessageTemplate()
39 .replaceAll("\\{value}", values.toString())).addConstraintViolation(); // 重新添加错误提示语句 38 .replaceAll("\\{value}", values.toString())).addConstraintViolation(); // 重新添加错误提示语句
yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/java/cn/iocoder/yudao/framework/ip/core/enums/AreaTypeEnum.java
1 package cn.iocoder.yudao.framework.ip.core.enums; 1 package cn.iocoder.yudao.framework.ip.core.enums;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum AreaTypeEnum implements IntArrayValuable { 16 +public enum AreaTypeEnum implements ArrayValuable<Integer> {
17 17
18 COUNTRY(1, "国家"), 18 COUNTRY(1, "国家"),
19 PROVINCE(2, "省份"), 19 PROVINCE(2, "省份"),
@@ -21,7 +21,7 @@ public enum AreaTypeEnum implements IntArrayValuable { @@ -21,7 +21,7 @@ public enum AreaTypeEnum implements IntArrayValuable {
21 DISTRICT(4, "地区"), // 县、镇、区等 21 DISTRICT(4, "地区"), // 县、镇、区等
22 ; 22 ;
23 23
24 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AreaTypeEnum::getType).toArray(); 24 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AreaTypeEnum::getType).toArray(Integer[]::new);
25 25
26 /** 26 /**
27 * 类型 27 * 类型
@@ -33,7 +33,7 @@ public enum AreaTypeEnum implements IntArrayValuable { @@ -33,7 +33,7 @@ public enum AreaTypeEnum implements IntArrayValuable {
33 private final String name; 33 private final String name;
34 34
35 @Override 35 @Override
36 - public int[] array() { 36 + public Integer[] array() {
37 return ARRAYS; 37 return ARRAYS;
38 } 38 }
39 } 39 }
yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/knowledge/AiKnowledgeDocumentStatusEnum.java
1 package cn.iocoder.yudao.module.ai.enums.knowledge; 1 package cn.iocoder.yudao.module.ai.enums.knowledge;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum AiKnowledgeDocumentStatusEnum implements IntArrayValuable { 16 +public enum AiKnowledgeDocumentStatusEnum implements ArrayValuable<Integer> {
17 17
18 IN_PROGRESS(10, "索引中"), 18 IN_PROGRESS(10, "索引中"),
19 SUCCESS(20, "可用"), 19 SUCCESS(20, "可用"),
@@ -29,10 +29,10 @@ public enum AiKnowledgeDocumentStatusEnum implements IntArrayValuable { @@ -29,10 +29,10 @@ public enum AiKnowledgeDocumentStatusEnum implements IntArrayValuable {
29 */ 29 */
30 private final String name; 30 private final String name;
31 31
32 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AiKnowledgeDocumentStatusEnum::getStatus).toArray(); 32 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AiKnowledgeDocumentStatusEnum::getStatus).toArray(Integer[]::new);
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/music/AiMusicGenerateModeEnum.java
1 package cn.iocoder.yudao.module.ai.enums.music; 1 package cn.iocoder.yudao.module.ai.enums.music;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum AiMusicGenerateModeEnum implements IntArrayValuable { 16 +public enum AiMusicGenerateModeEnum implements ArrayValuable<Integer> {
17 17
18 DESCRIPTION(1, "描述模式"), 18 DESCRIPTION(1, "描述模式"),
19 LYRIC(2, "歌词模式"); 19 LYRIC(2, "歌词模式");
@@ -27,10 +27,10 @@ public enum AiMusicGenerateModeEnum implements IntArrayValuable { @@ -27,10 +27,10 @@ public enum AiMusicGenerateModeEnum implements IntArrayValuable {
27 */ 27 */
28 private final String name; 28 private final String name;
29 29
30 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AiMusicGenerateModeEnum::getMode).toArray(); 30 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AiMusicGenerateModeEnum::getMode).toArray(Integer[]::new);
31 31
32 @Override 32 @Override
33 - public int[] array() { 33 + public Integer[] array() {
34 return ARRAYS; 34 return ARRAYS;
35 } 35 }
36 36
yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/music/AiMusicStatusEnum.java
1 package cn.iocoder.yudao.module.ai.enums.music; 1 package cn.iocoder.yudao.module.ai.enums.music;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum AiMusicStatusEnum implements IntArrayValuable { 16 +public enum AiMusicStatusEnum implements ArrayValuable<Integer> {
17 17
18 IN_PROGRESS(10, "进行中"), 18 IN_PROGRESS(10, "进行中"),
19 SUCCESS(20, "已完成"), 19 SUCCESS(20, "已完成"),
@@ -29,10 +29,10 @@ public enum AiMusicStatusEnum implements IntArrayValuable { @@ -29,10 +29,10 @@ public enum AiMusicStatusEnum implements IntArrayValuable {
29 */ 29 */
30 private final String name; 30 private final String name;
31 31
32 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AiMusicStatusEnum::getStatus).toArray(); 32 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AiMusicStatusEnum::getStatus).toArray(Integer[]::new);
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/write/AiWriteTypeEnum.java
1 package cn.iocoder.yudao.module.ai.enums.write; 1 package cn.iocoder.yudao.module.ai.enums.write;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum AiWriteTypeEnum implements IntArrayValuable { 16 +public enum AiWriteTypeEnum implements ArrayValuable<Integer> {
17 17
18 WRITING(1, "撰写", "请撰写一篇关于 [{}] 的文章。文章的内容格式:{},语气:{},语言:{},长度:{}。请确保涵盖主要内容,不需要除了正文内容外的其他回复,如标题、额外的解释或道歉。"), 18 WRITING(1, "撰写", "请撰写一篇关于 [{}] 的文章。文章的内容格式:{},语气:{},语言:{},长度:{}。请确保涵盖主要内容,不需要除了正文内容外的其他回复,如标题、额外的解释或道歉。"),
19 REPLY(2, "回复", "请针对如下内容:[{}] 做个回复。回复内容参考:[{}], 回复格式:{},语气:{},语言:{},长度:{}。不需要除了正文内容外的其他回复,如标题、开头、额外的解释或道歉。"); 19 REPLY(2, "回复", "请针对如下内容:[{}] 做个回复。回复内容参考:[{}], 回复格式:{},语气:{},语言:{},长度:{}。不需要除了正文内容外的其他回复,如标题、开头、额外的解释或道歉。");
@@ -32,10 +32,10 @@ public enum AiWriteTypeEnum implements IntArrayValuable { @@ -32,10 +32,10 @@ public enum AiWriteTypeEnum implements IntArrayValuable {
32 */ 32 */
33 private final String prompt; 33 private final String prompt;
34 34
35 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AiWriteTypeEnum::getType).toArray(); 35 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AiWriteTypeEnum::getType).toArray(Integer[]::new);
36 36
37 @Override 37 @Override
38 - public int[] array() { 38 + public Integer[] array() {
39 return ARRAYS; 39 return ARRAYS;
40 } 40 }
41 41
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmModelFormTypeEnum.java
1 package cn.iocoder.yudao.module.bpm.enums.definition; 1 package cn.iocoder.yudao.module.bpm.enums.definition;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,19 +13,19 @@ import java.util.Arrays; @@ -13,19 +13,19 @@ import java.util.Arrays;
13 */ 13 */
14 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum BpmModelFormTypeEnum implements IntArrayValuable { 16 +public enum BpmModelFormTypeEnum implements ArrayValuable<Integer> {
17 17
18 NORMAL(10, "流程表单"), // 对应 BpmFormDO 18 NORMAL(10, "流程表单"), // 对应 BpmFormDO
19 CUSTOM(20, "业务表单") // 业务自己定义的表单,自己进行数据的存储 19 CUSTOM(20, "业务表单") // 业务自己定义的表单,自己进行数据的存储
20 ; 20 ;
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmModelFormTypeEnum::getType).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmModelFormTypeEnum::getType).toArray(Integer[]::new);
23 23
24 private final Integer type; 24 private final Integer type;
25 private final String name; 25 private final String name;
26 26
27 @Override 27 @Override
28 - public int[] array() { 28 + public Integer[] array() {
29 return ARRAYS; 29 return ARRAYS;
30 } 30 }
31 31
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmModelTypeEnum.java
1 package cn.iocoder.yudao.module.bpm.enums.definition; 1 package cn.iocoder.yudao.module.bpm.enums.definition;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,18 +13,18 @@ import java.util.Arrays; @@ -13,18 +13,18 @@ import java.util.Arrays;
13 */ 13 */
14 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum BpmModelTypeEnum implements IntArrayValuable { 16 +public enum BpmModelTypeEnum implements ArrayValuable<Integer> {
17 17
18 BPMN(10, "BPMN 设计器"), // https://bpmn.io/toolkit/bpmn-js/ 18 BPMN(10, "BPMN 设计器"), // https://bpmn.io/toolkit/bpmn-js/
19 SIMPLE(20, "SIMPLE 设计器"); // 参考钉钉、飞书工作流的设计器 19 SIMPLE(20, "SIMPLE 设计器"); // 参考钉钉、飞书工作流的设计器
20 20
21 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmModelTypeEnum::getType).toArray(); 21 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmModelTypeEnum::getType).toArray(Integer[]::new);
22 22
23 private final Integer type; 23 private final Integer type;
24 private final String name; 24 private final String name;
25 25
26 @Override 26 @Override
27 - public int[] array() { 27 + public Integer[] array() {
28 return ARRAYS; 28 return ARRAYS;
29 } 29 }
30 30
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModeConditionType.java
1 package cn.iocoder.yudao.module.bpm.enums.definition; 1 package cn.iocoder.yudao.module.bpm.enums.definition;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,12 +14,12 @@ import java.util.Arrays; @@ -14,12 +14,12 @@ import java.util.Arrays;
14 */ 14 */
15 @Getter 15 @Getter
16 @AllArgsConstructor 16 @AllArgsConstructor
17 -public enum BpmSimpleModeConditionType implements IntArrayValuable { 17 +public enum BpmSimpleModeConditionType implements ArrayValuable<Integer> {
18 18
19 EXPRESSION(1, "条件表达式"), 19 EXPRESSION(1, "条件表达式"),
20 RULE(2, "条件规则"); 20 RULE(2, "条件规则");
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmSimpleModeConditionType::getType).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmSimpleModeConditionType::getType).toArray(Integer[]::new);
23 23
24 private final Integer type; 24 private final Integer type;
25 25
@@ -30,7 +30,7 @@ public enum BpmSimpleModeConditionType implements IntArrayValuable { @@ -30,7 +30,7 @@ public enum BpmSimpleModeConditionType implements IntArrayValuable {
30 } 30 }
31 31
32 @Override 32 @Override
33 - public int[] array() { 33 + public Integer[] array() {
34 return ARRAYS; 34 return ARRAYS;
35 } 35 }
36 } 36 }
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java
1 package cn.iocoder.yudao.module.bpm.enums.definition; 1 package cn.iocoder.yudao.module.bpm.enums.definition;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -15,7 +15,7 @@ import java.util.Objects; @@ -15,7 +15,7 @@ import java.util.Objects;
15 */ 15 */
16 @Getter 16 @Getter
17 @AllArgsConstructor 17 @AllArgsConstructor
18 -public enum BpmSimpleModelNodeType implements IntArrayValuable { 18 +public enum BpmSimpleModelNodeType implements ArrayValuable<Integer> {
19 19
20 // 0 ~ 1 开始和结束 20 // 0 ~ 1 开始和结束
21 START_NODE(0, "开始", "startEvent"), 21 START_NODE(0, "开始", "startEvent"),
@@ -33,7 +33,7 @@ public enum BpmSimpleModelNodeType implements IntArrayValuable { @@ -33,7 +33,7 @@ public enum BpmSimpleModelNodeType implements IntArrayValuable {
33 INCLUSIVE_BRANCH_NODE(53, "包容分支", "inclusiveGateway"), 33 INCLUSIVE_BRANCH_NODE(53, "包容分支", "inclusiveGateway"),
34 ; 34 ;
35 35
36 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmSimpleModelNodeType::getType).toArray(); 36 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmSimpleModelNodeType::getType).toArray(Integer[]::new);
37 37
38 private final Integer type; 38 private final Integer type;
39 private final String name; 39 private final String name;
@@ -55,7 +55,7 @@ public enum BpmSimpleModelNodeType implements IntArrayValuable { @@ -55,7 +55,7 @@ public enum BpmSimpleModelNodeType implements IntArrayValuable {
55 } 55 }
56 56
57 @Override 57 @Override
58 - public int[] array() { 58 + public Integer[] array() {
59 return ARRAYS; 59 return ARRAYS;
60 } 60 }
61 61
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskApproveMethodEnum.java
1 package cn.iocoder.yudao.module.bpm.enums.definition; 1 package cn.iocoder.yudao.module.bpm.enums.definition;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,7 +14,7 @@ import java.util.Arrays; @@ -14,7 +14,7 @@ import java.util.Arrays;
14 */ 14 */
15 @Getter 15 @Getter
16 @AllArgsConstructor 16 @AllArgsConstructor
17 -public enum BpmUserTaskApproveMethodEnum implements IntArrayValuable { 17 +public enum BpmUserTaskApproveMethodEnum implements ArrayValuable<Integer> {
18 18
19 RANDOM(1, "随机挑选一人审批", null), 19 RANDOM(1, "随机挑选一人审批", null),
20 RATIO(2, "多人会签(按通过比例)", "${ nrOfCompletedInstances/nrOfInstances >= %s}"), // 会签(按通过比例) 20 RATIO(2, "多人会签(按通过比例)", "${ nrOfCompletedInstances/nrOfInstances >= %s}"), // 会签(按通过比例)
@@ -34,14 +34,14 @@ public enum BpmUserTaskApproveMethodEnum implements IntArrayValuable { @@ -34,14 +34,14 @@ public enum BpmUserTaskApproveMethodEnum implements IntArrayValuable {
34 */ 34 */
35 private final String completionCondition; 35 private final String completionCondition;
36 36
37 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskApproveMethodEnum::getMethod).toArray(); 37 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskApproveMethodEnum::getMethod).toArray(Integer[]::new);
38 38
39 public static BpmUserTaskApproveMethodEnum valueOf(Integer method) { 39 public static BpmUserTaskApproveMethodEnum valueOf(Integer method) {
40 return ArrayUtil.firstMatch(item -> item.getMethod().equals(method), values()); 40 return ArrayUtil.firstMatch(item -> item.getMethod().equals(method), values());
41 } 41 }
42 42
43 @Override 43 @Override
44 - public int[] array() { 44 + public Integer[] array() {
45 return ARRAYS; 45 return ARRAYS;
46 } 46 }
47 } 47 }
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskApproveTypeEnum.java
1 package cn.iocoder.yudao.module.bpm.enums.definition; 1 package cn.iocoder.yudao.module.bpm.enums.definition;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,18 +13,18 @@ import java.util.Arrays; @@ -13,18 +13,18 @@ import java.util.Arrays;
13 */ 13 */
14 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum BpmUserTaskApproveTypeEnum implements IntArrayValuable { 16 +public enum BpmUserTaskApproveTypeEnum implements ArrayValuable<Integer> {
17 17
18 USER(1), // 人工审批 18 USER(1), // 人工审批
19 AUTO_APPROVE(2), // 自动通过 19 AUTO_APPROVE(2), // 自动通过
20 AUTO_REJECT(3); // 自动拒绝 20 AUTO_REJECT(3); // 自动拒绝
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskApproveTypeEnum::getType).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskApproveTypeEnum::getType).toArray(Integer[]::new);
23 23
24 private final Integer type; 24 private final Integer type;
25 25
26 @Override 26 @Override
27 - public int[] array() { 27 + public Integer[] array() {
28 return ARRAYS; 28 return ARRAYS;
29 } 29 }
30 30
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskAssignEmptyHandlerTypeEnum.java
1 package cn.iocoder.yudao.module.bpm.enums.definition; 1 package cn.iocoder.yudao.module.bpm.enums.definition;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.Getter; 4 import lombok.Getter;
5 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @RequiredArgsConstructor 14 @RequiredArgsConstructor
15 @Getter 15 @Getter
16 -public enum BpmUserTaskAssignEmptyHandlerTypeEnum implements IntArrayValuable { 16 +public enum BpmUserTaskAssignEmptyHandlerTypeEnum implements ArrayValuable<Integer> {
17 17
18 APPROVE(1), // 自动通过 18 APPROVE(1), // 自动通过
19 REJECT(2), // 自动拒绝 19 REJECT(2), // 自动拒绝
@@ -21,12 +21,12 @@ public enum BpmUserTaskAssignEmptyHandlerTypeEnum implements IntArrayValuable { @@ -21,12 +21,12 @@ public enum BpmUserTaskAssignEmptyHandlerTypeEnum implements IntArrayValuable {
21 ASSIGN_ADMIN(4), // 转交给流程管理员 21 ASSIGN_ADMIN(4), // 转交给流程管理员
22 ; 22 ;
23 23
24 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskAssignEmptyHandlerTypeEnum::getType).toArray(); 24 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskAssignEmptyHandlerTypeEnum::getType).toArray(Integer[]::new);
25 25
26 private final Integer type; 26 private final Integer type;
27 27
28 @Override 28 @Override
29 - public int[] array() { 29 + public Integer[] array() {
30 return ARRAYS; 30 return ARRAYS;
31 } 31 }
32 32
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskAssignStartUserHandlerTypeEnum.java
1 package cn.iocoder.yudao.module.bpm.enums.definition; 1 package cn.iocoder.yudao.module.bpm.enums.definition;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.Getter; 4 import lombok.Getter;
5 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -13,18 +13,18 @@ import java.util.Arrays; @@ -13,18 +13,18 @@ import java.util.Arrays;
13 */ 13 */
14 @RequiredArgsConstructor 14 @RequiredArgsConstructor
15 @Getter 15 @Getter
16 -public enum BpmUserTaskAssignStartUserHandlerTypeEnum implements IntArrayValuable { 16 +public enum BpmUserTaskAssignStartUserHandlerTypeEnum implements ArrayValuable<Integer> {
17 17
18 START_USER_AUDIT(1), // 由发起人对自己审批 18 START_USER_AUDIT(1), // 由发起人对自己审批
19 SKIP(2), // 自动跳过【参考飞书】:1)如果当前节点还有其他审批人,则交由其他审批人进行审批;2)如果当前节点没有其他审批人,则该节点自动通过 19 SKIP(2), // 自动跳过【参考飞书】:1)如果当前节点还有其他审批人,则交由其他审批人进行审批;2)如果当前节点没有其他审批人,则该节点自动通过
20 TRANSFER_DEPT_LEADER(3); // 转交给部门负责人审批【参考飞书】:若部门负责人为空,则自动通过 20 TRANSFER_DEPT_LEADER(3); // 转交给部门负责人审批【参考飞书】:若部门负责人为空,则自动通过
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskAssignStartUserHandlerTypeEnum::getType).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskAssignStartUserHandlerTypeEnum::getType).toArray(Integer[]::new);
23 23
24 private final Integer type; 24 private final Integer type;
25 25
26 @Override 26 @Override
27 - public int[] array() { 27 + public Integer[] array() {
28 return ARRAYS; 28 return ARRAYS;
29 } 29 }
30 30
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskRejectHandlerType.java
1 package cn.iocoder.yudao.module.bpm.enums.definition; 1 package cn.iocoder.yudao.module.bpm.enums.definition;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,7 +14,7 @@ import java.util.Arrays; @@ -14,7 +14,7 @@ import java.util.Arrays;
14 */ 14 */
15 @Getter 15 @Getter
16 @AllArgsConstructor 16 @AllArgsConstructor
17 -public enum BpmUserTaskRejectHandlerType implements IntArrayValuable { 17 +public enum BpmUserTaskRejectHandlerType implements ArrayValuable<Integer> {
18 18
19 FINISH_PROCESS_INSTANCE(1, "终止流程"), 19 FINISH_PROCESS_INSTANCE(1, "终止流程"),
20 RETURN_USER_TASK(2, "驳回到指定任务节点"); 20 RETURN_USER_TASK(2, "驳回到指定任务节点");
@@ -22,14 +22,14 @@ public enum BpmUserTaskRejectHandlerType implements IntArrayValuable { @@ -22,14 +22,14 @@ public enum BpmUserTaskRejectHandlerType implements IntArrayValuable {
22 private final Integer type; 22 private final Integer type;
23 private final String name; 23 private final String name;
24 24
25 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskRejectHandlerType::getType).toArray(); 25 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskRejectHandlerType::getType).toArray(Integer[]::new);
26 26
27 public static BpmUserTaskRejectHandlerType typeOf(Integer type) { 27 public static BpmUserTaskRejectHandlerType typeOf(Integer type) {
28 return ArrayUtil.firstMatch(item -> item.getType().equals(type), values()); 28 return ArrayUtil.firstMatch(item -> item.getType().equals(type), values());
29 } 29 }
30 30
31 @Override 31 @Override
32 - public int[] array() { 32 + public Integer[] array() {
33 return ARRAYS; 33 return ARRAYS;
34 } 34 }
35 } 35 }
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskTimeoutHandlerTypeEnum.java
1 package cn.iocoder.yudao.module.bpm.enums.definition; 1 package cn.iocoder.yudao.module.bpm.enums.definition;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum BpmUserTaskTimeoutHandlerTypeEnum implements IntArrayValuable { 16 +public enum BpmUserTaskTimeoutHandlerTypeEnum implements ArrayValuable<Integer> {
17 17
18 REMINDER(1,"自动提醒"), 18 REMINDER(1,"自动提醒"),
19 APPROVE(2, "自动同意"), 19 APPROVE(2, "自动同意"),
@@ -22,10 +22,10 @@ public enum BpmUserTaskTimeoutHandlerTypeEnum implements IntArrayValuable { @@ -22,10 +22,10 @@ public enum BpmUserTaskTimeoutHandlerTypeEnum implements IntArrayValuable {
22 private final Integer type; 22 private final Integer type;
23 private final String name; 23 private final String name;
24 24
25 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskTimeoutHandlerTypeEnum::getType).toArray(); 25 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskTimeoutHandlerTypeEnum::getType).toArray(Integer[]::new);
26 26
27 @Override 27 @Override
28 - public int[] array() { 28 + public Integer[] array() {
29 return ARRAYS; 29 return ARRAYS;
30 } 30 }
31 31
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusEnum.java
1 package cn.iocoder.yudao.module.bpm.enums.task; 1 package cn.iocoder.yudao.module.bpm.enums.task;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; 4 import cn.iocoder.yudao.framework.common.util.object.ObjectUtils;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
@@ -14,7 +14,7 @@ import java.util.Arrays; @@ -14,7 +14,7 @@ import java.util.Arrays;
14 */ 14 */
15 @Getter 15 @Getter
16 @AllArgsConstructor 16 @AllArgsConstructor
17 -public enum BpmProcessInstanceStatusEnum implements IntArrayValuable { 17 +public enum BpmProcessInstanceStatusEnum implements ArrayValuable<Integer> {
18 18
19 NOT_START(-1, "未开始"), 19 NOT_START(-1, "未开始"),
20 RUNNING(1, "审批中"), 20 RUNNING(1, "审批中"),
@@ -22,7 +22,7 @@ public enum BpmProcessInstanceStatusEnum implements IntArrayValuable { @@ -22,7 +22,7 @@ public enum BpmProcessInstanceStatusEnum implements IntArrayValuable {
22 REJECT(3, "审批不通过"), 22 REJECT(3, "审批不通过"),
23 CANCEL(4, "已取消"); 23 CANCEL(4, "已取消");
24 24
25 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmProcessInstanceStatusEnum::getStatus).toArray(); 25 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmProcessInstanceStatusEnum::getStatus).toArray(Integer[]::new);
26 26
27 /** 27 /**
28 * 状态 28 * 状态
@@ -34,7 +34,7 @@ public enum BpmProcessInstanceStatusEnum implements IntArrayValuable { @@ -34,7 +34,7 @@ public enum BpmProcessInstanceStatusEnum implements IntArrayValuable {
34 private final String desc; 34 private final String desc;
35 35
36 @Override 36 @Override
37 - public int[] array() { 37 + public Integer[] array() {
38 return ARRAYS; 38 return ARRAYS;
39 } 39 }
40 40
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmTaskCandidateStrategyEnum.java
1 package cn.iocoder.yudao.module.bpm.framework.flowable.core.enums; 1 package cn.iocoder.yudao.module.bpm.framework.flowable.core.enums;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -16,7 +16,7 @@ import java.util.Arrays; @@ -16,7 +16,7 @@ import java.util.Arrays;
16 */ 16 */
17 @Getter 17 @Getter
18 @AllArgsConstructor 18 @AllArgsConstructor
19 -public enum BpmTaskCandidateStrategyEnum implements IntArrayValuable { 19 +public enum BpmTaskCandidateStrategyEnum implements ArrayValuable<Integer> {
20 20
21 ROLE(10, "角色"), 21 ROLE(10, "角色"),
22 DEPT_MEMBER(20, "部门的成员"), // 包括负责人 22 DEPT_MEMBER(20, "部门的成员"), // 包括负责人
@@ -35,7 +35,7 @@ public enum BpmTaskCandidateStrategyEnum implements IntArrayValuable { @@ -35,7 +35,7 @@ public enum BpmTaskCandidateStrategyEnum implements IntArrayValuable {
35 ASSIGN_EMPTY(1, "审批人为空"), 35 ASSIGN_EMPTY(1, "审批人为空"),
36 ; 36 ;
37 37
38 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmTaskCandidateStrategyEnum::getStrategy).toArray(); 38 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmTaskCandidateStrategyEnum::getStrategy).toArray(Integer[]::new);
39 39
40 /** 40 /**
41 * 类型 41 * 类型
@@ -51,7 +51,7 @@ public enum BpmTaskCandidateStrategyEnum implements IntArrayValuable { @@ -51,7 +51,7 @@ public enum BpmTaskCandidateStrategyEnum implements IntArrayValuable {
51 } 51 }
52 52
53 @Override 53 @Override
54 - public int[] array() { 54 + public Integer[] array() {
55 return ARRAYS; 55 return ARRAYS;
56 } 56 }
57 57
yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/business/CrmBusinessEndStatusEnum.java
1 package cn.iocoder.yudao.module.crm.enums.business; 1 package cn.iocoder.yudao.module.crm.enums.business;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.Getter; 4 import lombok.Getter;
5 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -13,13 +13,13 @@ import java.util.Arrays; @@ -13,13 +13,13 @@ import java.util.Arrays;
13 */ 13 */
14 @RequiredArgsConstructor 14 @RequiredArgsConstructor
15 @Getter 15 @Getter
16 -public enum CrmBusinessEndStatusEnum implements IntArrayValuable { 16 +public enum CrmBusinessEndStatusEnum implements ArrayValuable<Integer> {
17 17
18 WIN(1, "赢单"), 18 WIN(1, "赢单"),
19 LOSE(2, "输单"), 19 LOSE(2, "输单"),
20 INVALID(3, "无效"); 20 INVALID(3, "无效");
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmBusinessEndStatusEnum::getStatus).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmBusinessEndStatusEnum::getStatus).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 场景类型 25 * 场景类型
@@ -31,7 +31,7 @@ public enum CrmBusinessEndStatusEnum implements IntArrayValuable { @@ -31,7 +31,7 @@ public enum CrmBusinessEndStatusEnum implements IntArrayValuable {
31 private final String name; 31 private final String name;
32 32
33 @Override 33 @Override
34 - public int[] array() { 34 + public Integer[] array() {
35 return ARRAYS; 35 return ARRAYS;
36 } 36 }
37 37
yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/common/CrmAuditStatusEnum.java
1 package cn.iocoder.yudao.module.crm.enums.common; 1 package cn.iocoder.yudao.module.crm.enums.common;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.Getter; 4 import lombok.Getter;
5 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @RequiredArgsConstructor 14 @RequiredArgsConstructor
15 @Getter 15 @Getter
16 -public enum CrmAuditStatusEnum implements IntArrayValuable { 16 +public enum CrmAuditStatusEnum implements ArrayValuable<Integer> {
17 17
18 DRAFT(0, "未提交"), 18 DRAFT(0, "未提交"),
19 PROCESS(10, "审批中"), 19 PROCESS(10, "审批中"),
@@ -24,10 +24,10 @@ public enum CrmAuditStatusEnum implements IntArrayValuable { @@ -24,10 +24,10 @@ public enum CrmAuditStatusEnum implements IntArrayValuable {
24 private final Integer status; 24 private final Integer status;
25 private final String name; 25 private final String name;
26 26
27 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmAuditStatusEnum::getStatus).toArray(); 27 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmAuditStatusEnum::getStatus).toArray(Integer[]::new);
28 28
29 @Override 29 @Override
30 - public int[] array() { 30 + public Integer[] array() {
31 return ARRAYS; 31 return ARRAYS;
32 } 32 }
33 33
yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/common/CrmBizTypeEnum.java
@@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.crm.enums.common; @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.crm.enums.common;
2 2
3 import cn.hutool.core.collection.CollUtil; 3 import cn.hutool.core.collection.CollUtil;
4 import cn.hutool.core.util.ObjUtil; 4 import cn.hutool.core.util.ObjUtil;
5 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 5 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
6 import lombok.Getter; 6 import lombok.Getter;
7 import lombok.RequiredArgsConstructor; 7 import lombok.RequiredArgsConstructor;
8 8
@@ -15,7 +15,7 @@ import java.util.Arrays; @@ -15,7 +15,7 @@ import java.util.Arrays;
15 */ 15 */
16 @RequiredArgsConstructor 16 @RequiredArgsConstructor
17 @Getter 17 @Getter
18 -public enum CrmBizTypeEnum implements IntArrayValuable { 18 +public enum CrmBizTypeEnum implements ArrayValuable<Integer> {
19 19
20 CRM_CLUE(1, "线索"), 20 CRM_CLUE(1, "线索"),
21 CRM_CUSTOMER(2, "客户"), 21 CRM_CUSTOMER(2, "客户"),
@@ -27,7 +27,7 @@ public enum CrmBizTypeEnum implements IntArrayValuable { @@ -27,7 +27,7 @@ public enum CrmBizTypeEnum implements IntArrayValuable {
27 CRM_RECEIVABLE_PLAN(8, "回款计划") 27 CRM_RECEIVABLE_PLAN(8, "回款计划")
28 ; 28 ;
29 29
30 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmBizTypeEnum::getType).toArray(); 30 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmBizTypeEnum::getType).toArray(Integer[]::new);
31 31
32 /** 32 /**
33 * 类型 33 * 类型
@@ -45,7 +45,7 @@ public enum CrmBizTypeEnum implements IntArrayValuable { @@ -45,7 +45,7 @@ public enum CrmBizTypeEnum implements IntArrayValuable {
45 } 45 }
46 46
47 @Override 47 @Override
48 - public int[] array() { 48 + public Integer[] array() {
49 return ARRAYS; 49 return ARRAYS;
50 } 50 }
51 51
yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/common/CrmSceneTypeEnum.java
1 package cn.iocoder.yudao.module.crm.enums.common; 1 package cn.iocoder.yudao.module.crm.enums.common;
2 2
3 import cn.hutool.core.util.ObjUtil; 3 import cn.hutool.core.util.ObjUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,13 +14,13 @@ import java.util.Arrays; @@ -14,13 +14,13 @@ import java.util.Arrays;
14 */ 14 */
15 @Getter 15 @Getter
16 @AllArgsConstructor 16 @AllArgsConstructor
17 -public enum CrmSceneTypeEnum implements IntArrayValuable { 17 +public enum CrmSceneTypeEnum implements ArrayValuable<Integer> {
18 18
19 OWNER(1, "我负责的"), 19 OWNER(1, "我负责的"),
20 INVOLVED(2, "我参与的"), 20 INVOLVED(2, "我参与的"),
21 SUBORDINATE(3, "下属负责的"); 21 SUBORDINATE(3, "下属负责的");
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmSceneTypeEnum::getType).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmSceneTypeEnum::getType).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 场景类型 26 * 场景类型
@@ -44,7 +44,7 @@ public enum CrmSceneTypeEnum implements IntArrayValuable { @@ -44,7 +44,7 @@ public enum CrmSceneTypeEnum implements IntArrayValuable {
44 } 44 }
45 45
46 @Override 46 @Override
47 - public int[] array() { 47 + public Integer[] array() {
48 return ARRAYS; 48 return ARRAYS;
49 } 49 }
50 50
yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/customer/CrmCustomerLevelEnum.java
1 package cn.iocoder.yudao.module.crm.enums.customer; 1 package cn.iocoder.yudao.module.crm.enums.customer;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,13 +13,13 @@ import java.util.Arrays; @@ -13,13 +13,13 @@ import java.util.Arrays;
13 */ 13 */
14 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum CrmCustomerLevelEnum implements IntArrayValuable { 16 +public enum CrmCustomerLevelEnum implements ArrayValuable<Integer> {
17 17
18 IMPORTANT(1, "A(重点客户)"), 18 IMPORTANT(1, "A(重点客户)"),
19 GENERAL(2, "B(普通客户)"), 19 GENERAL(2, "B(普通客户)"),
20 LOW_PRIORITY(3, "C(非优先客户)"); 20 LOW_PRIORITY(3, "C(非优先客户)");
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmCustomerLevelEnum::getLevel).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmCustomerLevelEnum::getLevel).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 状态 25 * 状态
@@ -31,7 +31,7 @@ public enum CrmCustomerLevelEnum implements IntArrayValuable { @@ -31,7 +31,7 @@ public enum CrmCustomerLevelEnum implements IntArrayValuable {
31 private final String name; 31 private final String name;
32 32
33 @Override 33 @Override
34 - public int[] array() { 34 + public Integer[] array() {
35 return ARRAYS; 35 return ARRAYS;
36 } 36 }
37 37
yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/customer/CrmCustomerLimitConfigTypeEnum.java
@@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.crm.enums.customer; @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.crm.enums.customer;
2 2
3 import cn.hutool.core.collection.CollUtil; 3 import cn.hutool.core.collection.CollUtil;
4 import cn.hutool.core.util.ObjUtil; 4 import cn.hutool.core.util.ObjUtil;
5 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 5 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
6 import lombok.AllArgsConstructor; 6 import lombok.AllArgsConstructor;
7 import lombok.Getter; 7 import lombok.Getter;
8 8
@@ -15,7 +15,7 @@ import java.util.Arrays; @@ -15,7 +15,7 @@ import java.util.Arrays;
15 */ 15 */
16 @Getter 16 @Getter
17 @AllArgsConstructor 17 @AllArgsConstructor
18 -public enum CrmCustomerLimitConfigTypeEnum implements IntArrayValuable { 18 +public enum CrmCustomerLimitConfigTypeEnum implements ArrayValuable<Integer> {
19 19
20 /** 20 /**
21 * 拥有客户数限制 21 * 拥有客户数限制
@@ -27,7 +27,7 @@ public enum CrmCustomerLimitConfigTypeEnum implements IntArrayValuable { @@ -27,7 +27,7 @@ public enum CrmCustomerLimitConfigTypeEnum implements IntArrayValuable {
27 CUSTOMER_LOCK_LIMIT(2, "锁定客户数限制"), 27 CUSTOMER_LOCK_LIMIT(2, "锁定客户数限制"),
28 ; 28 ;
29 29
30 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmCustomerLimitConfigTypeEnum::getType).toArray(); 30 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmCustomerLimitConfigTypeEnum::getType).toArray(Integer[]::new);
31 31
32 /** 32 /**
33 * 状态 33 * 状态
@@ -45,7 +45,7 @@ public enum CrmCustomerLimitConfigTypeEnum implements IntArrayValuable { @@ -45,7 +45,7 @@ public enum CrmCustomerLimitConfigTypeEnum implements IntArrayValuable {
45 } 45 }
46 46
47 @Override 47 @Override
48 - public int[] array() { 48 + public Integer[] array() {
49 return ARRAYS; 49 return ARRAYS;
50 } 50 }
51 51
yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/permission/CrmPermissionLevelEnum.java
@@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.crm.enums.permission; @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.crm.enums.permission;
2 2
3 import cn.hutool.core.collection.CollUtil; 3 import cn.hutool.core.collection.CollUtil;
4 import cn.hutool.core.util.ObjUtil; 4 import cn.hutool.core.util.ObjUtil;
5 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 5 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
6 import lombok.AllArgsConstructor; 6 import lombok.AllArgsConstructor;
7 import lombok.Getter; 7 import lombok.Getter;
8 8
@@ -17,13 +17,13 @@ import java.util.Arrays; @@ -17,13 +17,13 @@ import java.util.Arrays;
17 */ 17 */
18 @Getter 18 @Getter
19 @AllArgsConstructor 19 @AllArgsConstructor
20 -public enum CrmPermissionLevelEnum implements IntArrayValuable { 20 +public enum CrmPermissionLevelEnum implements ArrayValuable<Integer> {
21 21
22 OWNER(1, "负责人"), 22 OWNER(1, "负责人"),
23 READ(2, "只读"), 23 READ(2, "只读"),
24 WRITE(3, "读写"); 24 WRITE(3, "读写");
25 25
26 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmPermissionLevelEnum::getLevel).toArray(); 26 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmPermissionLevelEnum::getLevel).toArray(Integer[]::new);
27 27
28 /** 28 /**
29 * 级别 29 * 级别
@@ -35,7 +35,7 @@ public enum CrmPermissionLevelEnum implements IntArrayValuable { @@ -35,7 +35,7 @@ public enum CrmPermissionLevelEnum implements IntArrayValuable {
35 private final String name; 35 private final String name;
36 36
37 @Override 37 @Override
38 - public int[] array() { 38 + public Integer[] array() {
39 return ARRAYS; 39 return ARRAYS;
40 } 40 }
41 41
yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/product/CrmProductStatusEnum.java
1 package cn.iocoder.yudao.module.crm.enums.product; 1 package cn.iocoder.yudao.module.crm.enums.product;
2 2
3 import cn.hutool.core.util.ObjUtil; 3 import cn.hutool.core.util.ObjUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -15,12 +15,12 @@ import java.util.Arrays; @@ -15,12 +15,12 @@ import java.util.Arrays;
15 */ 15 */
16 @Getter 16 @Getter
17 @AllArgsConstructor 17 @AllArgsConstructor
18 -public enum CrmProductStatusEnum implements IntArrayValuable { 18 +public enum CrmProductStatusEnum implements ArrayValuable<Integer> {
19 19
20 DISABLE(0, "下架"), 20 DISABLE(0, "下架"),
21 ENABLE(1, "上架"); 21 ENABLE(1, "上架");
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmProductStatusEnum::getStatus).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmProductStatusEnum::getStatus).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 状态 26 * 状态
@@ -32,7 +32,7 @@ public enum CrmProductStatusEnum implements IntArrayValuable { @@ -32,7 +32,7 @@ public enum CrmProductStatusEnum implements IntArrayValuable {
32 private final String name; 32 private final String name;
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/receivable/CrmReceivableReturnTypeEnum.java
1 package cn.iocoder.yudao.module.crm.enums.receivable; 1 package cn.iocoder.yudao.module.crm.enums.receivable;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum CrmReceivableReturnTypeEnum implements IntArrayValuable { 16 +public enum CrmReceivableReturnTypeEnum implements ArrayValuable<Integer> {
17 17
18 CHECK(1, "支票"), 18 CHECK(1, "支票"),
19 CASH(2, "现金"), 19 CASH(2, "现金"),
@@ -24,7 +24,7 @@ public enum CrmReceivableReturnTypeEnum implements IntArrayValuable { @@ -24,7 +24,7 @@ public enum CrmReceivableReturnTypeEnum implements IntArrayValuable {
24 WECHAT_PAY(7, "微信支付"), 24 WECHAT_PAY(7, "微信支付"),
25 OTHER(8, "其它"); 25 OTHER(8, "其它");
26 26
27 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmReceivableReturnTypeEnum::getType).toArray(); 27 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmReceivableReturnTypeEnum::getType).toArray(Integer[]::new);
28 28
29 /** 29 /**
30 * 类型 30 * 类型
@@ -36,7 +36,7 @@ public enum CrmReceivableReturnTypeEnum implements IntArrayValuable { @@ -36,7 +36,7 @@ public enum CrmReceivableReturnTypeEnum implements IntArrayValuable {
36 private final String name; 36 private final String name;
37 37
38 @Override 38 @Override
39 - public int[] array() { 39 + public Integer[] array() {
40 return ARRAYS; 40 return ARRAYS;
41 } 41 }
42 42
yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/ErpAuditStatus.java
1 package cn.iocoder.yudao.module.erp.enums; 1 package cn.iocoder.yudao.module.erp.enums;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.Getter; 4 import lombok.Getter;
5 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -15,12 +15,12 @@ import java.util.Arrays; @@ -15,12 +15,12 @@ import java.util.Arrays;
15 */ 15 */
16 @RequiredArgsConstructor 16 @RequiredArgsConstructor
17 @Getter 17 @Getter
18 -public enum ErpAuditStatus implements IntArrayValuable { 18 +public enum ErpAuditStatus implements ArrayValuable<Integer> {
19 19
20 PROCESS(10, "未审核"), // 审核中 20 PROCESS(10, "未审核"), // 审核中
21 APPROVE(20, "已审核"); // 审核通过 21 APPROVE(20, "已审核"); // 审核通过
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ErpAuditStatus::getStatus).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(ErpAuditStatus::getStatus).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 状态 26 * 状态
@@ -32,7 +32,7 @@ public enum ErpAuditStatus implements IntArrayValuable { @@ -32,7 +32,7 @@ public enum ErpAuditStatus implements IntArrayValuable {
32 private final String name; 32 private final String name;
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/common/ErpBizTypeEnum.java
1 package cn.iocoder.yudao.module.erp.enums.common; 1 package cn.iocoder.yudao.module.erp.enums.common;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.Getter; 4 import lombok.Getter;
5 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @RequiredArgsConstructor 14 @RequiredArgsConstructor
15 @Getter 15 @Getter
16 -public enum ErpBizTypeEnum implements IntArrayValuable { 16 +public enum ErpBizTypeEnum implements ArrayValuable<Integer> {
17 17
18 PURCHASE_ORDER(10, "采购订单"), 18 PURCHASE_ORDER(10, "采购订单"),
19 PURCHASE_IN(11, "采购入库"), 19 PURCHASE_IN(11, "采购入库"),
@@ -24,7 +24,7 @@ public enum ErpBizTypeEnum implements IntArrayValuable { @@ -24,7 +24,7 @@ public enum ErpBizTypeEnum implements IntArrayValuable {
24 SALE_RETURN(22, "销售退货"), 24 SALE_RETURN(22, "销售退货"),
25 ; 25 ;
26 26
27 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ErpBizTypeEnum::getType).toArray(); 27 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(ErpBizTypeEnum::getType).toArray(Integer[]::new);
28 28
29 /** 29 /**
30 * 类型 30 * 类型
@@ -36,7 +36,7 @@ public enum ErpBizTypeEnum implements IntArrayValuable { @@ -36,7 +36,7 @@ public enum ErpBizTypeEnum implements IntArrayValuable {
36 private final String name; 36 private final String name;
37 37
38 @Override 38 @Override
39 - public int[] array() { 39 + public Integer[] array() {
40 return ARRAYS; 40 return ARRAYS;
41 } 41 }
42 42
yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/stock/ErpStockRecordBizTypeEnum.java
1 package cn.iocoder.yudao.module.erp.enums.stock; 1 package cn.iocoder.yudao.module.erp.enums.stock;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.Getter; 4 import lombok.Getter;
5 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @RequiredArgsConstructor 14 @RequiredArgsConstructor
15 @Getter 15 @Getter
16 -public enum ErpStockRecordBizTypeEnum implements IntArrayValuable { 16 +public enum ErpStockRecordBizTypeEnum implements ArrayValuable<Integer> {
17 17
18 OTHER_IN(10, "其它入库"), 18 OTHER_IN(10, "其它入库"),
19 OTHER_IN_CANCEL(11, "其它入库(作废)"), 19 OTHER_IN_CANCEL(11, "其它入库(作废)"),
@@ -44,7 +44,7 @@ public enum ErpStockRecordBizTypeEnum implements IntArrayValuable { @@ -44,7 +44,7 @@ public enum ErpStockRecordBizTypeEnum implements IntArrayValuable {
44 PURCHASE_RETURN_CANCEL(81, "采购退货出库(作废)"), 44 PURCHASE_RETURN_CANCEL(81, "采购退货出库(作废)"),
45 ; 45 ;
46 46
47 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ErpStockRecordBizTypeEnum::getType).toArray(); 47 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(ErpStockRecordBizTypeEnum::getType).toArray(Integer[]::new);
48 48
49 /** 49 /**
50 * 类型 50 * 类型
@@ -56,7 +56,7 @@ public enum ErpStockRecordBizTypeEnum implements IntArrayValuable { @@ -56,7 +56,7 @@ public enum ErpStockRecordBizTypeEnum implements IntArrayValuable {
56 private final String name; 56 private final String name;
57 57
58 @Override 58 @Override
59 - public int[] array() { 59 + public Integer[] array() {
60 return ARRAYS; 60 return ARRAYS;
61 } 61 }
62 62
yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/device/IotDeviceStatusEnum.java
1 package cn.iocoder.yudao.module.iot.enums.device; 1 package cn.iocoder.yudao.module.iot.enums.device;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.Getter; 4 import lombok.Getter;
5 5
6 import java.util.Arrays; 6 import java.util.Arrays;
@@ -11,14 +11,14 @@ import java.util.Arrays; @@ -11,14 +11,14 @@ import java.util.Arrays;
11 * @author haohao 11 * @author haohao
12 */ 12 */
13 @Getter 13 @Getter
14 -public enum IotDeviceStatusEnum implements IntArrayValuable { 14 +public enum IotDeviceStatusEnum implements ArrayValuable<Integer> {
15 15
16 INACTIVE(0, "未激活"), 16 INACTIVE(0, "未激活"),
17 ONLINE(1, "在线"), 17 ONLINE(1, "在线"),
18 OFFLINE(2, "离线"), 18 OFFLINE(2, "离线"),
19 DISABLED(3, "已禁用"); 19 DISABLED(3, "已禁用");
20 20
21 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotDeviceStatusEnum::getStatus).toArray(); 21 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotDeviceStatusEnum::getStatus).toArray(Integer[]::new);
22 22
23 /** 23 /**
24 * 状态 24 * 状态
@@ -48,7 +48,7 @@ public enum IotDeviceStatusEnum implements IntArrayValuable { @@ -48,7 +48,7 @@ public enum IotDeviceStatusEnum implements IntArrayValuable {
48 } 48 }
49 49
50 @Override 50 @Override
51 - public int[] array() { 51 + public Integer[] array() {
52 return ARRAYS; 52 return ARRAYS;
53 } 53 }
54 54
yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotDataFormatEnum.java
1 package cn.iocoder.yudao.module.iot.enums.product; 1 package cn.iocoder.yudao.module.iot.enums.product;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -14,12 +14,12 @@ import java.util.Arrays; @@ -14,12 +14,12 @@ import java.util.Arrays;
14 */ 14 */
15 @AllArgsConstructor 15 @AllArgsConstructor
16 @Getter 16 @Getter
17 -public enum IotDataFormatEnum implements IntArrayValuable { 17 +public enum IotDataFormatEnum implements ArrayValuable<Integer> {
18 18
19 JSON(0, "标准数据格式(JSON)"), 19 JSON(0, "标准数据格式(JSON)"),
20 CUSTOMIZE(1, "透传/自定义"); 20 CUSTOMIZE(1, "透传/自定义");
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotDataFormatEnum::getType).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotDataFormatEnum::getType).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 类型 25 * 类型
@@ -31,7 +31,7 @@ public enum IotDataFormatEnum implements IntArrayValuable { @@ -31,7 +31,7 @@ public enum IotDataFormatEnum implements IntArrayValuable {
31 private final String description; 31 private final String description;
32 32
33 @Override 33 @Override
34 - public int[] array() { 34 + public Integer[] array() {
35 return ARRAYS; 35 return ARRAYS;
36 } 36 }
37 37
yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotNetTypeEnum.java
1 package cn.iocoder.yudao.module.iot.enums.product; 1 package cn.iocoder.yudao.module.iot.enums.product;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,14 +13,14 @@ import java.util.Arrays; @@ -13,14 +13,14 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum IotNetTypeEnum implements IntArrayValuable { 16 +public enum IotNetTypeEnum implements ArrayValuable<Integer> {
17 17
18 WIFI(0, "Wi-Fi"), 18 WIFI(0, "Wi-Fi"),
19 CELLULAR(1, "Cellular"), 19 CELLULAR(1, "Cellular"),
20 ETHERNET(2, "Ethernet"), 20 ETHERNET(2, "Ethernet"),
21 OTHER(3, "其他"); 21 OTHER(3, "其他");
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotNetTypeEnum::getType).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotNetTypeEnum::getType).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 类型 26 * 类型
@@ -32,7 +32,7 @@ public enum IotNetTypeEnum implements IntArrayValuable { @@ -32,7 +32,7 @@ public enum IotNetTypeEnum implements IntArrayValuable {
32 private final String description; 32 private final String description;
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProductDeviceTypeEnum.java
1 package cn.iocoder.yudao.module.iot.enums.product; 1 package cn.iocoder.yudao.module.iot.enums.product;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum IotProductDeviceTypeEnum implements IntArrayValuable { 16 +public enum IotProductDeviceTypeEnum implements ArrayValuable<Integer> {
17 17
18 DIRECT(0, "直连设备"), 18 DIRECT(0, "直连设备"),
19 GATEWAY_CHILD(1, "网关子设备"), 19 GATEWAY_CHILD(1, "网关子设备"),
@@ -29,10 +29,10 @@ public enum IotProductDeviceTypeEnum implements IntArrayValuable { @@ -29,10 +29,10 @@ public enum IotProductDeviceTypeEnum implements IntArrayValuable {
29 */ 29 */
30 private final String description; 30 private final String description;
31 31
32 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotProductDeviceTypeEnum::getType).toArray(); 32 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotProductDeviceTypeEnum::getType).toArray(Integer[]::new);
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProductFunctionTypeEnum.java
1 package cn.iocoder.yudao.module.iot.enums.product; 1 package cn.iocoder.yudao.module.iot.enums.product;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,13 +13,13 @@ import java.util.Arrays; @@ -13,13 +13,13 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum IotProductFunctionTypeEnum implements IntArrayValuable { 16 +public enum IotProductFunctionTypeEnum implements ArrayValuable<Integer> {
17 17
18 PROPERTY(1, "属性"), 18 PROPERTY(1, "属性"),
19 SERVICE(2, "服务"), 19 SERVICE(2, "服务"),
20 EVENT(3, "事件"); 20 EVENT(3, "事件");
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotProductFunctionTypeEnum::getType).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotProductFunctionTypeEnum::getType).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 类型 25 * 类型
@@ -31,7 +31,7 @@ public enum IotProductFunctionTypeEnum implements IntArrayValuable { @@ -31,7 +31,7 @@ public enum IotProductFunctionTypeEnum implements IntArrayValuable {
31 private final String description; 31 private final String description;
32 32
33 @Override 33 @Override
34 - public int[] array() { 34 + public Integer[] array() {
35 return ARRAYS; 35 return ARRAYS;
36 } 36 }
37 37
yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProductStatusEnum.java
1 package cn.iocoder.yudao.module.iot.enums.product; 1 package cn.iocoder.yudao.module.iot.enums.product;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,12 +13,12 @@ import java.util.Arrays; @@ -13,12 +13,12 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum IotProductStatusEnum implements IntArrayValuable { 16 +public enum IotProductStatusEnum implements ArrayValuable<Integer> {
17 17
18 UNPUBLISHED(0, "开发中"), 18 UNPUBLISHED(0, "开发中"),
19 PUBLISHED(1, "已发布"); 19 PUBLISHED(1, "已发布");
20 20
21 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotProductStatusEnum::getType).toArray(); 21 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotProductStatusEnum::getType).toArray(Integer[]::new);
22 22
23 /** 23 /**
24 * 类型 24 * 类型
@@ -30,7 +30,7 @@ public enum IotProductStatusEnum implements IntArrayValuable { @@ -30,7 +30,7 @@ public enum IotProductStatusEnum implements IntArrayValuable {
30 private final String description; 30 private final String description;
31 31
32 @Override 32 @Override
33 - public int[] array() { 33 + public Integer[] array() {
34 return ARRAYS; 34 return ARRAYS;
35 } 35 }
36 36
yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotProtocolTypeEnum.java
1 package cn.iocoder.yudao.module.iot.enums.product; 1 package cn.iocoder.yudao.module.iot.enums.product;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum IotProtocolTypeEnum implements IntArrayValuable { 16 +public enum IotProtocolTypeEnum implements ArrayValuable<Integer> {
17 17
18 CUSTOM(0, "自定义"), 18 CUSTOM(0, "自定义"),
19 MODBUS(1, "Modbus"), 19 MODBUS(1, "Modbus"),
@@ -21,7 +21,7 @@ public enum IotProtocolTypeEnum implements IntArrayValuable { @@ -21,7 +21,7 @@ public enum IotProtocolTypeEnum implements IntArrayValuable {
21 ZIGBEE(3, "ZigBee"), 21 ZIGBEE(3, "ZigBee"),
22 BLE(4, "BLE"); 22 BLE(4, "BLE");
23 23
24 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotProtocolTypeEnum::getType).toArray(); 24 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotProtocolTypeEnum::getType).toArray(Integer[]::new);
25 25
26 /** 26 /**
27 * 类型 27 * 类型
@@ -33,7 +33,7 @@ public enum IotProtocolTypeEnum implements IntArrayValuable { @@ -33,7 +33,7 @@ public enum IotProtocolTypeEnum implements IntArrayValuable {
33 private final String description; 33 private final String description;
34 34
35 @Override 35 @Override
36 - public int[] array() { 36 + public Integer[] array() {
37 return ARRAYS; 37 return ARRAYS;
38 } 38 }
39 39
yudao-module-iot/yudao-module-iot-api/src/main/java/cn/iocoder/yudao/module/iot/enums/product/IotValidateTypeEnum.java
1 package cn.iocoder.yudao.module.iot.enums.product; 1 package cn.iocoder.yudao.module.iot.enums.product;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,12 +13,12 @@ import java.util.Arrays; @@ -13,12 +13,12 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum IotValidateTypeEnum implements IntArrayValuable { 16 +public enum IotValidateTypeEnum implements ArrayValuable<Integer> {
17 17
18 WEAK(0, "弱校验"), 18 WEAK(0, "弱校验"),
19 NONE(1, "免校验"); 19 NONE(1, "免校验");
20 20
21 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotValidateTypeEnum::getType).toArray(); 21 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(IotValidateTypeEnum::getType).toArray(Integer[]::new);
22 22
23 /** 23 /**
24 * 类型 24 * 类型
@@ -30,7 +30,7 @@ public enum IotValidateTypeEnum implements IntArrayValuable { @@ -30,7 +30,7 @@ public enum IotValidateTypeEnum implements IntArrayValuable {
30 private final String description; 30 private final String description;
31 31
32 @Override 32 @Override
33 - public int[] array() { 33 + public Integer[] array() {
34 return ARRAYS; 34 return ARRAYS;
35 } 35 }
36 36
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/comment/ProductCommentAuditStatusEnum.java
1 package cn.iocoder.yudao.module.product.enums.comment; 1 package cn.iocoder.yudao.module.product.enums.comment;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,13 +13,13 @@ import java.util.Arrays; @@ -13,13 +13,13 @@ import java.util.Arrays;
13 */ 13 */
14 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum ProductCommentAuditStatusEnum implements IntArrayValuable { 16 +public enum ProductCommentAuditStatusEnum implements ArrayValuable<Integer> {
17 17
18 NONE(0, "待审核"), 18 NONE(0, "待审核"),
19 APPROVE(1, "审批通过"), 19 APPROVE(1, "审批通过"),
20 REJECT(2, "审批不通过"),; 20 REJECT(2, "审批不通过"),;
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ProductCommentAuditStatusEnum::getStatus).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(ProductCommentAuditStatusEnum::getStatus).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 审批状态 25 * 审批状态
@@ -31,7 +31,7 @@ public enum ProductCommentAuditStatusEnum implements IntArrayValuable { @@ -31,7 +31,7 @@ public enum ProductCommentAuditStatusEnum implements IntArrayValuable {
31 private final String name; 31 private final String name;
32 32
33 @Override 33 @Override
34 - public int[] array() { 34 + public Integer[] array() {
35 return ARRAYS; 35 return ARRAYS;
36 } 36 }
37 37
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/comment/ProductCommentScoresEnum.java
1 package cn.iocoder.yudao.module.product.enums.comment; 1 package cn.iocoder.yudao.module.product.enums.comment;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum ProductCommentScoresEnum implements IntArrayValuable { 16 +public enum ProductCommentScoresEnum implements ArrayValuable<Integer> {
17 17
18 ONE(1, "1星"), 18 ONE(1, "1星"),
19 TWO(2, "2星"), 19 TWO(2, "2星"),
@@ -21,7 +21,7 @@ public enum ProductCommentScoresEnum implements IntArrayValuable { @@ -21,7 +21,7 @@ public enum ProductCommentScoresEnum implements IntArrayValuable {
21 FOUR(4, "4星"), 21 FOUR(4, "4星"),
22 FIVE(5, "5星"); 22 FIVE(5, "5星");
23 23
24 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ProductCommentScoresEnum::getScores).toArray(); 24 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(ProductCommentScoresEnum::getScores).toArray(Integer[]::new);
25 25
26 /** 26 /**
27 * 星级 27 * 星级
@@ -34,7 +34,7 @@ public enum ProductCommentScoresEnum implements IntArrayValuable { @@ -34,7 +34,7 @@ public enum ProductCommentScoresEnum implements IntArrayValuable {
34 private final String name; 34 private final String name;
35 35
36 @Override 36 @Override
37 - public int[] array() { 37 + public Integer[] array() {
38 return ARRAYS; 38 return ARRAYS;
39 } 39 }
40 40
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/spu/ProductSpuStatusEnum.java
1 package cn.iocoder.yudao.module.product.enums.spu; 1 package cn.iocoder.yudao.module.product.enums.spu;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,13 +13,13 @@ import java.util.Arrays; @@ -13,13 +13,13 @@ import java.util.Arrays;
13 */ 13 */
14 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum ProductSpuStatusEnum implements IntArrayValuable { 16 +public enum ProductSpuStatusEnum implements ArrayValuable<Integer> {
17 17
18 RECYCLE(-1, "回收站"), 18 RECYCLE(-1, "回收站"),
19 DISABLE(0, "下架"), 19 DISABLE(0, "下架"),
20 ENABLE(1, "上架"); 20 ENABLE(1, "上架");
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ProductSpuStatusEnum::getStatus).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(ProductSpuStatusEnum::getStatus).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 状态 25 * 状态
@@ -31,7 +31,7 @@ public enum ProductSpuStatusEnum implements IntArrayValuable { @@ -31,7 +31,7 @@ public enum ProductSpuStatusEnum implements IntArrayValuable {
31 private final String name; 31 private final String name;
32 32
33 @Override 33 @Override
34 - public int[] array() { 34 + public Integer[] array() {
35 return ARRAYS; 35 return ARRAYS;
36 } 36 }
37 37
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/banner/BannerPositionEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.banner; 1 package cn.iocoder.yudao.module.promotion.enums.banner;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum BannerPositionEnum implements IntArrayValuable { 16 +public enum BannerPositionEnum implements ArrayValuable<Integer> {
17 17
18 HOME_POSITION(1, "首页"), 18 HOME_POSITION(1, "首页"),
19 SECKILL_POSITION(2, "秒杀活动页"), 19 SECKILL_POSITION(2, "秒杀活动页"),
@@ -21,7 +21,7 @@ public enum BannerPositionEnum implements IntArrayValuable { @@ -21,7 +21,7 @@ public enum BannerPositionEnum implements IntArrayValuable {
21 DISCOUNT_POSITION(4, "限时折扣页"), 21 DISCOUNT_POSITION(4, "限时折扣页"),
22 REWARD_POSITION(5, "满减送页"); 22 REWARD_POSITION(5, "满减送页");
23 23
24 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BannerPositionEnum::getPosition).toArray(); 24 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BannerPositionEnum::getPosition).toArray(Integer[]::new);
25 25
26 /** 26 /**
27 * 值 27 * 值
@@ -33,7 +33,7 @@ public enum BannerPositionEnum implements IntArrayValuable { @@ -33,7 +33,7 @@ public enum BannerPositionEnum implements IntArrayValuable {
33 private final String name; 33 private final String name;
34 34
35 @Override 35 @Override
36 - public int[] array() { 36 + public Integer[] array() {
37 return ARRAYS; 37 return ARRAYS;
38 } 38 }
39 39
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/bargain/BargainRecordStatusEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.bargain; 1 package cn.iocoder.yudao.module.promotion.enums.bargain;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,14 +13,14 @@ import java.util.Arrays; @@ -13,14 +13,14 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum BargainRecordStatusEnum implements IntArrayValuable { 16 +public enum BargainRecordStatusEnum implements ArrayValuable<Integer> {
17 17
18 IN_PROGRESS(1, "砍价中"), 18 IN_PROGRESS(1, "砍价中"),
19 SUCCESS(2, "砍价成功"), 19 SUCCESS(2, "砍价成功"),
20 FAILED(3, "砍价失败"), // 活动到期时,会自动将到期的砍价全部设置为过期 20 FAILED(3, "砍价失败"), // 活动到期时,会自动将到期的砍价全部设置为过期
21 ; 21 ;
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BargainRecordStatusEnum::getStatus).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BargainRecordStatusEnum::getStatus).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 值 26 * 值
@@ -32,7 +32,7 @@ public enum BargainRecordStatusEnum implements IntArrayValuable { @@ -32,7 +32,7 @@ public enum BargainRecordStatusEnum implements IntArrayValuable {
32 private final String name; 32 private final String name;
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/combination/CombinationRecordStatusEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.combination; 1 package cn.iocoder.yudao.module.promotion.enums.combination;
2 2
3 import cn.hutool.core.util.ObjectUtil; 3 import cn.hutool.core.util.ObjectUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,13 +14,13 @@ import java.util.Arrays; @@ -14,13 +14,13 @@ import java.util.Arrays;
14 */ 14 */
15 @AllArgsConstructor 15 @AllArgsConstructor
16 @Getter 16 @Getter
17 -public enum CombinationRecordStatusEnum implements IntArrayValuable { 17 +public enum CombinationRecordStatusEnum implements ArrayValuable<Integer> {
18 18
19 IN_PROGRESS(0, "进行中"), 19 IN_PROGRESS(0, "进行中"),
20 SUCCESS(1, "拼团成功"), 20 SUCCESS(1, "拼团成功"),
21 FAILED(2, "拼团失败"); 21 FAILED(2, "拼团失败");
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CombinationRecordStatusEnum::getStatus).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CombinationRecordStatusEnum::getStatus).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 状态值 26 * 状态值
@@ -32,7 +32,7 @@ public enum CombinationRecordStatusEnum implements IntArrayValuable { @@ -32,7 +32,7 @@ public enum CombinationRecordStatusEnum implements IntArrayValuable {
32 private final String name; 32 private final String name;
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionActivityStatusEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.common; 1 package cn.iocoder.yudao.module.promotion.enums.common;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -14,14 +14,14 @@ import java.util.Arrays; @@ -14,14 +14,14 @@ import java.util.Arrays;
14 */ 14 */
15 @AllArgsConstructor 15 @AllArgsConstructor
16 @Getter 16 @Getter
17 -public enum PromotionActivityStatusEnum implements IntArrayValuable { 17 +public enum PromotionActivityStatusEnum implements ArrayValuable<Integer> {
18 18
19 WAIT(10, "未开始"), 19 WAIT(10, "未开始"),
20 RUN(20, "进行中"), 20 RUN(20, "进行中"),
21 END(30, "已结束"), 21 END(30, "已结束"),
22 CLOSE(40, "已关闭"); 22 CLOSE(40, "已关闭");
23 23
24 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PromotionActivityStatusEnum::getStatus).toArray(); 24 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PromotionActivityStatusEnum::getStatus).toArray(Integer[]::new);
25 25
26 /** 26 /**
27 * 状态值 27 * 状态值
@@ -33,7 +33,7 @@ public enum PromotionActivityStatusEnum implements IntArrayValuable { @@ -33,7 +33,7 @@ public enum PromotionActivityStatusEnum implements IntArrayValuable {
33 private final String name; 33 private final String name;
34 34
35 @Override 35 @Override
36 - public int[] array() { 36 + public Integer[] array() {
37 return ARRAYS; 37 return ARRAYS;
38 } 38 }
39 39
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionConditionTypeEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.common; 1 package cn.iocoder.yudao.module.promotion.enums.common;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,12 +13,12 @@ import java.util.Arrays; @@ -13,12 +13,12 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum PromotionConditionTypeEnum implements IntArrayValuable { 16 +public enum PromotionConditionTypeEnum implements ArrayValuable<Integer> {
17 17
18 PRICE(10, "满 N 元"), 18 PRICE(10, "满 N 元"),
19 COUNT(20, "满 N 件"); 19 COUNT(20, "满 N 件");
20 20
21 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PromotionConditionTypeEnum::getType).toArray(); 21 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PromotionConditionTypeEnum::getType).toArray(Integer[]::new);
22 22
23 /** 23 /**
24 * 类型值 24 * 类型值
@@ -30,7 +30,7 @@ public enum PromotionConditionTypeEnum implements IntArrayValuable { @@ -30,7 +30,7 @@ public enum PromotionConditionTypeEnum implements IntArrayValuable {
30 private final String name; 30 private final String name;
31 31
32 @Override 32 @Override
33 - public int[] array() { 33 + public Integer[] array() {
34 return ARRAYS; 34 return ARRAYS;
35 } 35 }
36 36
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionDiscountTypeEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.common; 1 package cn.iocoder.yudao.module.promotion.enums.common;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,13 +13,13 @@ import java.util.Arrays; @@ -13,13 +13,13 @@ import java.util.Arrays;
13 */ 13 */
14 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum PromotionDiscountTypeEnum implements IntArrayValuable { 16 +public enum PromotionDiscountTypeEnum implements ArrayValuable<Integer> {
17 17
18 PRICE(1, "满减"), // 具体金额 18 PRICE(1, "满减"), // 具体金额
19 PERCENT(2, "折扣"), // 百分比 19 PERCENT(2, "折扣"), // 百分比
20 ; 20 ;
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PromotionDiscountTypeEnum::getType).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PromotionDiscountTypeEnum::getType).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 优惠类型 25 * 优惠类型
@@ -31,7 +31,7 @@ public enum PromotionDiscountTypeEnum implements IntArrayValuable { @@ -31,7 +31,7 @@ public enum PromotionDiscountTypeEnum implements IntArrayValuable {
31 private final String name; 31 private final String name;
32 32
33 @Override 33 @Override
34 - public int[] array() { 34 + public Integer[] array() {
35 return ARRAYS; 35 return ARRAYS;
36 } 36 }
37 37
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionProductScopeEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.common; 1 package cn.iocoder.yudao.module.promotion.enums.common;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -14,13 +14,13 @@ import java.util.Objects; @@ -14,13 +14,13 @@ import java.util.Objects;
14 */ 14 */
15 @Getter 15 @Getter
16 @AllArgsConstructor 16 @AllArgsConstructor
17 -public enum PromotionProductScopeEnum implements IntArrayValuable { 17 +public enum PromotionProductScopeEnum implements ArrayValuable<Integer> {
18 18
19 ALL(1, "全部商品"), 19 ALL(1, "全部商品"),
20 SPU(2, "指定商品"), 20 SPU(2, "指定商品"),
21 CATEGORY(3, "指定品类"); 21 CATEGORY(3, "指定品类");
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PromotionProductScopeEnum::getScope).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PromotionProductScopeEnum::getScope).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 范围值 26 * 范围值
@@ -32,7 +32,7 @@ public enum PromotionProductScopeEnum implements IntArrayValuable { @@ -32,7 +32,7 @@ public enum PromotionProductScopeEnum implements IntArrayValuable {
32 private final String name; 32 private final String name;
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/common/PromotionTypeEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.common; 1 package cn.iocoder.yudao.module.promotion.enums.common;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum PromotionTypeEnum implements IntArrayValuable { 16 +public enum PromotionTypeEnum implements ArrayValuable<Integer> {
17 17
18 SECKILL_ACTIVITY(1, "秒杀活动"), 18 SECKILL_ACTIVITY(1, "秒杀活动"),
19 BARGAIN_ACTIVITY(2, "砍价活动"), 19 BARGAIN_ACTIVITY(2, "砍价活动"),
@@ -27,7 +27,7 @@ public enum PromotionTypeEnum implements IntArrayValuable { @@ -27,7 +27,7 @@ public enum PromotionTypeEnum implements IntArrayValuable {
27 POINT(8, "积分") 27 POINT(8, "积分")
28 ; 28 ;
29 29
30 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PromotionTypeEnum::getType).toArray(); 30 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PromotionTypeEnum::getType).toArray(Integer[]::new);
31 31
32 /** 32 /**
33 * 类型值 33 * 类型值
@@ -39,7 +39,7 @@ public enum PromotionTypeEnum implements IntArrayValuable { @@ -39,7 +39,7 @@ public enum PromotionTypeEnum implements IntArrayValuable {
39 private final String name; 39 private final String name;
40 40
41 @Override 41 @Override
42 - public int[] array() { 42 + public Integer[] array() {
43 return ARRAYS; 43 return ARRAYS;
44 } 44 }
45 45
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/coupon/CouponStatusEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.coupon; 1 package cn.iocoder.yudao.module.promotion.enums.coupon;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,13 +13,13 @@ import java.util.Arrays; @@ -13,13 +13,13 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum CouponStatusEnum implements IntArrayValuable { 16 +public enum CouponStatusEnum implements ArrayValuable<Integer> {
17 17
18 UNUSED(1, "未使用"), 18 UNUSED(1, "未使用"),
19 USED(2, "已使用"), 19 USED(2, "已使用"),
20 EXPIRE(3, "已过期"); 20 EXPIRE(3, "已过期");
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CouponStatusEnum::getStatus).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CouponStatusEnum::getStatus).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 值 25 * 值
@@ -31,7 +31,7 @@ public enum CouponStatusEnum implements IntArrayValuable { @@ -31,7 +31,7 @@ public enum CouponStatusEnum implements IntArrayValuable {
31 private final String name; 31 private final String name;
32 32
33 @Override 33 @Override
34 - public int[] array() { 34 + public Integer[] array() {
35 return ARRAYS; 35 return ARRAYS;
36 } 36 }
37 37
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/coupon/CouponTakeTypeEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.coupon; 1 package cn.iocoder.yudao.module.promotion.enums.coupon;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -14,14 +14,14 @@ import java.util.Objects; @@ -14,14 +14,14 @@ import java.util.Objects;
14 */ 14 */
15 @AllArgsConstructor 15 @AllArgsConstructor
16 @Getter 16 @Getter
17 -public enum CouponTakeTypeEnum implements IntArrayValuable { 17 +public enum CouponTakeTypeEnum implements ArrayValuable<Integer> {
18 18
19 USER(1, "直接领取"), // 用户可在首页、每日领劵直接领取 19 USER(1, "直接领取"), // 用户可在首页、每日领劵直接领取
20 ADMIN(2, "指定发放"), // 后台指定会员赠送优惠劵 20 ADMIN(2, "指定发放"), // 后台指定会员赠送优惠劵
21 REGISTER(3, "新人券"), // 注册时自动领取 21 REGISTER(3, "新人券"), // 注册时自动领取
22 ; 22 ;
23 23
24 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CouponTakeTypeEnum::getType).toArray(); 24 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CouponTakeTypeEnum::getType).toArray(Integer[]::new);
25 25
26 /** 26 /**
27 * 值 27 * 值
@@ -33,7 +33,7 @@ public enum CouponTakeTypeEnum implements IntArrayValuable { @@ -33,7 +33,7 @@ public enum CouponTakeTypeEnum implements IntArrayValuable {
33 private final String name; 33 private final String name;
34 34
35 @Override 35 @Override
36 - public int[] array() { 36 + public Integer[] array() {
37 return ARRAYS; 37 return ARRAYS;
38 } 38 }
39 39
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/coupon/CouponTemplateValidityTypeEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.coupon; 1 package cn.iocoder.yudao.module.promotion.enums.coupon;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,13 +13,13 @@ import java.util.Arrays; @@ -13,13 +13,13 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum CouponTemplateValidityTypeEnum implements IntArrayValuable { 16 +public enum CouponTemplateValidityTypeEnum implements ArrayValuable<Integer> {
17 17
18 DATE(1, "固定日期"), 18 DATE(1, "固定日期"),
19 TERM(2, "领取之后"), 19 TERM(2, "领取之后"),
20 ; 20 ;
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CouponTemplateValidityTypeEnum::getType).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(CouponTemplateValidityTypeEnum::getType).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 值 25 * 值
@@ -31,7 +31,7 @@ public enum CouponTemplateValidityTypeEnum implements IntArrayValuable { @@ -31,7 +31,7 @@ public enum CouponTemplateValidityTypeEnum implements IntArrayValuable {
31 private final String name; 31 private final String name;
32 32
33 @Override 33 @Override
34 - public int[] array() { 34 + public Integer[] array() {
35 return ARRAYS; 35 return ARRAYS;
36 } 36 }
37 37
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/diy/DiyPageEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.diy; 1 package cn.iocoder.yudao.module.promotion.enums.diy;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,13 +13,13 @@ import java.util.Arrays; @@ -13,13 +13,13 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum DiyPageEnum implements IntArrayValuable { 16 +public enum DiyPageEnum implements ArrayValuable<Integer> {
17 17
18 INDEX(1, "首页"), 18 INDEX(1, "首页"),
19 MY(2, "我的"), 19 MY(2, "我的"),
20 ; 20 ;
21 21
22 - private static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DiyPageEnum::getPage).toArray(); 22 + private static final Integer[] ARRAYS = Arrays.stream(values()).map(DiyPageEnum::getPage).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 页面编号 25 * 页面编号
@@ -32,7 +32,7 @@ public enum DiyPageEnum implements IntArrayValuable { @@ -32,7 +32,7 @@ public enum DiyPageEnum implements IntArrayValuable {
32 private final String name; 32 private final String name;
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/kefu/KeFuMessageContentTypeEnum.java
1 package cn.iocoder.yudao.module.promotion.enums.kefu; 1 package cn.iocoder.yudao.module.promotion.enums.kefu;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum KeFuMessageContentTypeEnum implements IntArrayValuable { 16 +public enum KeFuMessageContentTypeEnum implements ArrayValuable<Integer> {
17 17
18 TEXT(1, "文本消息"), 18 TEXT(1, "文本消息"),
19 IMAGE(2, "图片消息"), 19 IMAGE(2, "图片消息"),
@@ -25,7 +25,7 @@ public enum KeFuMessageContentTypeEnum implements IntArrayValuable { @@ -25,7 +25,7 @@ public enum KeFuMessageContentTypeEnum implements IntArrayValuable {
25 PRODUCT(10, "商品消息"), 25 PRODUCT(10, "商品消息"),
26 ORDER(11, "订单消息"); 26 ORDER(11, "订单消息");
27 27
28 - private static final int[] ARRAYS = Arrays.stream(values()).mapToInt(KeFuMessageContentTypeEnum::getType).toArray(); 28 + private static final Integer[] ARRAYS = Arrays.stream(values()).map(KeFuMessageContentTypeEnum::getType).toArray(Integer[]::new);
29 29
30 /** 30 /**
31 * 类型 31 * 类型
@@ -38,7 +38,7 @@ public enum KeFuMessageContentTypeEnum implements IntArrayValuable { @@ -38,7 +38,7 @@ public enum KeFuMessageContentTypeEnum implements IntArrayValuable {
38 private final String name; 38 private final String name;
39 39
40 @Override 40 @Override
41 - public int[] array() { 41 + public Integer[] array() {
42 return ARRAYS; 42 return ARRAYS;
43 } 43 }
44 44
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/combination/CombinationRecordServiceImpl.java
@@ -375,7 +375,7 @@ public class CombinationRecordServiceImpl implements CombinationRecordService { @@ -375,7 +375,7 @@ public class CombinationRecordServiceImpl implements CombinationRecordService {
375 CombinationRecordDO updateRecord = new CombinationRecordDO().setId(item.getId()) 375 CombinationRecordDO updateRecord = new CombinationRecordDO().setId(item.getId())
376 .setStatus(status.getStatus()).setEndTime(now); 376 .setStatus(status.getStatus()).setEndTime(now);
377 if (CombinationRecordStatusEnum.isSuccess(status.getStatus())) { // 虚拟成团完事更改状态成功后还需要把参与人数修改为成团需要人数 377 if (CombinationRecordStatusEnum.isSuccess(status.getStatus())) { // 虚拟成团完事更改状态成功后还需要把参与人数修改为成团需要人数
378 - updateRecord.setUserCount(records.size()); 378 + updateRecord.setUserCount(records.size()).setVirtualGroup(Boolean.TRUE); // 标记为虚拟成团
379 } 379 }
380 updateRecords.add(updateRecord); 380 updateRecords.add(updateRecord);
381 }); 381 });
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/point/PointActivityServiceImpl.java
@@ -100,7 +100,7 @@ public class PointActivityServiceImpl implements PointActivityService { @@ -100,7 +100,7 @@ public class PointActivityServiceImpl implements PointActivityService {
100 } 100 }
101 pointActivityMapper.updateById(updateObj); 101 pointActivityMapper.updateById(updateObj);
102 // 2.2 更新商品 102 // 2.2 更新商品
103 - updateSeckillProduct(updateObj, updateReqVO.getProducts()); 103 + updatePointProduct(updateObj, updateReqVO.getProducts());
104 } 104 }
105 105
106 @Override 106 @Override
@@ -157,12 +157,12 @@ public class PointActivityServiceImpl implements PointActivityService { @@ -157,12 +157,12 @@ public class PointActivityServiceImpl implements PointActivityService {
157 } 157 }
158 158
159 /** 159 /**
160 - * 更新秒杀商品 160 + * 更新积分商品
161 * 161 *
162 - * @param activity 秒杀活动 162 + * @param activity 积分活动
163 * @param products 该活动的最新商品配置 163 * @param products 该活动的最新商品配置
164 */ 164 */
165 - private void updateSeckillProduct(PointActivityDO activity, List<PointProductSaveReqVO> products) { 165 + private void updatePointProduct(PointActivityDO activity, List<PointProductSaveReqVO> products) {
166 // 第一步,对比新老数据,获得添加、修改、删除的列表 166 // 第一步,对比新老数据,获得添加、修改、删除的列表
167 List<PointProductDO> newList = buildPointProductDO(activity, products); 167 List<PointProductDO> newList = buildPointProductDO(activity, products);
168 List<PointProductDO> oldList = pointProductMapper.selectListByActivityId(activity.getId()); 168 List<PointProductDO> oldList = pointProductMapper.selectListByActivityId(activity.getId());
@@ -211,10 +211,10 @@ public class PointActivityServiceImpl implements PointActivityService { @@ -211,10 +211,10 @@ public class PointActivityServiceImpl implements PointActivityService {
211 } 211 }
212 212
213 /** 213 /**
214 - * 校验秒杀商品是否都存在 214 + * 校验积分商品是否都存在
215 * 215 *
216 * @param spuId 商品 SPU 编号 216 * @param spuId 商品 SPU 编号
217 - * @param products 秒杀商品 217 + * @param products 积分商品
218 */ 218 */
219 private void validateProductExists(Long spuId, List<PointProductSaveReqVO> products) { 219 private void validateProductExists(Long spuId, List<PointProductSaveReqVO> products) {
220 // 1. 校验商品 spu 是否存在 220 // 1. 校验商品 spu 是否存在
yudao-module-mall/yudao-module-statistics-api/src/main/java/cn/iocoder/yudao/module/statistics/enums/TimeRangeTypeEnum.java
1 package cn.iocoder.yudao.module.statistics.enums; 1 package cn.iocoder.yudao.module.statistics.enums;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum TimeRangeTypeEnum implements IntArrayValuable { 16 +public enum TimeRangeTypeEnum implements ArrayValuable<Integer> {
17 17
18 /** 18 /**
19 * 天 19 * 天
@@ -33,7 +33,7 @@ public enum TimeRangeTypeEnum implements IntArrayValuable { @@ -33,7 +33,7 @@ public enum TimeRangeTypeEnum implements IntArrayValuable {
33 YEAR(365), 33 YEAR(365),
34 ; 34 ;
35 35
36 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TimeRangeTypeEnum::getType).toArray(); 36 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(TimeRangeTypeEnum::getType).toArray(Integer[]::new);
37 37
38 /** 38 /**
39 * 类型 39 * 类型
@@ -41,7 +41,7 @@ public enum TimeRangeTypeEnum implements IntArrayValuable { @@ -41,7 +41,7 @@ public enum TimeRangeTypeEnum implements IntArrayValuable {
41 private final Integer type; 41 private final Integer type;
42 42
43 @Override 43 @Override
44 - public int[] array() { 44 + public Integer[] array() {
45 return ARRAYS; 45 return ARRAYS;
46 } 46 }
47 47
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/ErrorCodeConstants.java
@@ -37,6 +37,7 @@ public interface ErrorCodeConstants { @@ -37,6 +37,7 @@ public interface ErrorCodeConstants {
37 ErrorCode ORDER_CREATE_FAIL_EXIST_UNPAID = new ErrorCode(1_011_000_032, "交易订单创建失败,原因:存在未付款订单"); 37 ErrorCode ORDER_CREATE_FAIL_EXIST_UNPAID = new ErrorCode(1_011_000_032, "交易订单创建失败,原因:存在未付款订单");
38 ErrorCode ORDER_CANCEL_PAID_FAIL = new ErrorCode(1_011_000_033, "交易订单取消支付失败,原因:订单不是【{}】状态"); 38 ErrorCode ORDER_CANCEL_PAID_FAIL = new ErrorCode(1_011_000_033, "交易订单取消支付失败,原因:订单不是【{}】状态");
39 ErrorCode ORDER_PICK_UP_FAIL_NOT_VERIFY_USER = new ErrorCode(1_011_000_034, "交易订单自提失败,原因:你没有核销该门店订单的权限"); 39 ErrorCode ORDER_PICK_UP_FAIL_NOT_VERIFY_USER = new ErrorCode(1_011_000_034, "交易订单自提失败,原因:你没有核销该门店订单的权限");
  40 + ErrorCode ORDER_CREATE_FAIL_INSUFFICIENT_USER_POINTS = new ErrorCode(1_011_000_035, "交易订单创建失败,原因:用户积分不足");
40 41
41 // ========== After Sale 模块 1-011-000-100 ========== 42 // ========== After Sale 模块 1-011-000-100 ==========
42 ErrorCode AFTER_SALE_NOT_FOUND = new ErrorCode(1_011_000_100, "售后单不存在"); 43 ErrorCode AFTER_SALE_NOT_FOUND = new ErrorCode(1_011_000_100, "售后单不存在");
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/aftersale/AfterSaleStatusEnum.java
1 package cn.iocoder.yudao.module.trade.enums.aftersale; 1 package cn.iocoder.yudao.module.trade.enums.aftersale;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -18,7 +18,7 @@ import static cn.hutool.core.util.ArrayUtil.firstMatch; @@ -18,7 +18,7 @@ import static cn.hutool.core.util.ArrayUtil.firstMatch;
18 */ 18 */
19 @AllArgsConstructor 19 @AllArgsConstructor
20 @Getter 20 @Getter
21 -public enum AfterSaleStatusEnum implements IntArrayValuable { 21 +public enum AfterSaleStatusEnum implements ArrayValuable<Integer> {
22 22
23 /** 23 /**
24 * 【申请售后】 24 * 【申请售后】
@@ -54,7 +54,7 @@ public enum AfterSaleStatusEnum implements IntArrayValuable { @@ -54,7 +54,7 @@ public enum AfterSaleStatusEnum implements IntArrayValuable {
54 SELLER_REFUSE(63,"卖家拒绝收货", "商家拒绝收货"), // 有赞的状态提示:商家拒绝收货,不同意退款 54 SELLER_REFUSE(63,"卖家拒绝收货", "商家拒绝收货"), // 有赞的状态提示:商家拒绝收货,不同意退款
55 ; 55 ;
56 56
57 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AfterSaleStatusEnum::getStatus).toArray(); 57 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AfterSaleStatusEnum::getStatus).toArray(Integer[]::new);
58 58
59 /** 59 /**
60 * 进行中的售后状态 60 * 进行中的售后状态
@@ -84,7 +84,7 @@ public enum AfterSaleStatusEnum implements IntArrayValuable { @@ -84,7 +84,7 @@ public enum AfterSaleStatusEnum implements IntArrayValuable {
84 private final String content; 84 private final String content;
85 85
86 @Override 86 @Override
87 - public int[] array() { 87 + public Integer[] array() {
88 return ARRAYS; 88 return ARRAYS;
89 } 89 }
90 90
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/aftersale/AfterSaleTypeEnum.java
1 package cn.iocoder.yudao.module.trade.enums.aftersale; 1 package cn.iocoder.yudao.module.trade.enums.aftersale;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.Getter; 4 import lombok.Getter;
5 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -13,12 +13,12 @@ import java.util.Arrays; @@ -13,12 +13,12 @@ import java.util.Arrays;
13 */ 13 */
14 @RequiredArgsConstructor 14 @RequiredArgsConstructor
15 @Getter 15 @Getter
16 -public enum AfterSaleTypeEnum implements IntArrayValuable { 16 +public enum AfterSaleTypeEnum implements ArrayValuable<Integer> {
17 17
18 IN_SALE(10, "售中退款"), // 交易完成前买家申请退款 18 IN_SALE(10, "售中退款"), // 交易完成前买家申请退款
19 AFTER_SALE(20, "售后退款"); // 交易完成后买家申请退款 19 AFTER_SALE(20, "售后退款"); // 交易完成后买家申请退款
20 20
21 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AfterSaleTypeEnum::getType).toArray(); 21 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AfterSaleTypeEnum::getType).toArray(Integer[]::new);
22 22
23 /** 23 /**
24 * 类型 24 * 类型
@@ -30,7 +30,7 @@ public enum AfterSaleTypeEnum implements IntArrayValuable { @@ -30,7 +30,7 @@ public enum AfterSaleTypeEnum implements IntArrayValuable {
30 private final String name; 30 private final String name;
31 31
32 @Override 32 @Override
33 - public int[] array() { 33 + public Integer[] array() {
34 return ARRAYS; 34 return ARRAYS;
35 } 35 }
36 36
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/aftersale/AfterSaleWayEnum.java
1 package cn.iocoder.yudao.module.trade.enums.aftersale; 1 package cn.iocoder.yudao.module.trade.enums.aftersale;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.Getter; 4 import lombok.Getter;
5 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -13,12 +13,12 @@ import java.util.Arrays; @@ -13,12 +13,12 @@ import java.util.Arrays;
13 */ 13 */
14 @RequiredArgsConstructor 14 @RequiredArgsConstructor
15 @Getter 15 @Getter
16 -public enum AfterSaleWayEnum implements IntArrayValuable { 16 +public enum AfterSaleWayEnum implements ArrayValuable<Integer> {
17 17
18 REFUND(10, "仅退款"), 18 REFUND(10, "仅退款"),
19 RETURN_AND_REFUND(20, "退货退款"); 19 RETURN_AND_REFUND(20, "退货退款");
20 20
21 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AfterSaleWayEnum::getWay).toArray(); 21 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(AfterSaleWayEnum::getWay).toArray(Integer[]::new);
22 22
23 /** 23 /**
24 * 方式 24 * 方式
@@ -30,7 +30,7 @@ public enum AfterSaleWayEnum implements IntArrayValuable { @@ -30,7 +30,7 @@ public enum AfterSaleWayEnum implements IntArrayValuable {
30 private final String name; 30 private final String name;
31 31
32 @Override 32 @Override
33 - public int[] array() { 33 + public Integer[] array() {
34 return ARRAYS; 34 return ARRAYS;
35 } 35 }
36 36
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageBindModeEnum.java
1 package cn.iocoder.yudao.module.trade.enums.brokerage; 1 package cn.iocoder.yudao.module.trade.enums.brokerage;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum BrokerageBindModeEnum implements IntArrayValuable { 16 +public enum BrokerageBindModeEnum implements ArrayValuable<Integer> {
17 17
18 /** 18 /**
19 * 只要用户没有推广人,随时都可以绑定分销关系 19 * 只要用户没有推广人,随时都可以绑定分销关系
@@ -29,7 +29,7 @@ public enum BrokerageBindModeEnum implements IntArrayValuable { @@ -29,7 +29,7 @@ public enum BrokerageBindModeEnum implements IntArrayValuable {
29 OVERRIDE(3, "覆盖绑定"), 29 OVERRIDE(3, "覆盖绑定"),
30 ; 30 ;
31 31
32 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BrokerageBindModeEnum::getMode).toArray(); 32 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BrokerageBindModeEnum::getMode).toArray(Integer[]::new);
33 33
34 /** 34 /**
35 * 模式 35 * 模式
@@ -41,7 +41,7 @@ public enum BrokerageBindModeEnum implements IntArrayValuable { @@ -41,7 +41,7 @@ public enum BrokerageBindModeEnum implements IntArrayValuable {
41 private final String name; 41 private final String name;
42 42
43 @Override 43 @Override
44 - public int[] array() { 44 + public Integer[] array() {
45 return ARRAYS; 45 return ARRAYS;
46 } 46 }
47 47
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageEnabledConditionEnum.java
1 package cn.iocoder.yudao.module.trade.enums.brokerage; 1 package cn.iocoder.yudao.module.trade.enums.brokerage;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum BrokerageEnabledConditionEnum implements IntArrayValuable { 16 +public enum BrokerageEnabledConditionEnum implements ArrayValuable<Integer> {
17 17
18 /** 18 /**
19 * 所有用户都可以分销 19 * 所有用户都可以分销
@@ -25,7 +25,7 @@ public enum BrokerageEnabledConditionEnum implements IntArrayValuable { @@ -25,7 +25,7 @@ public enum BrokerageEnabledConditionEnum implements IntArrayValuable {
25 ADMIN(2, "指定分销"), 25 ADMIN(2, "指定分销"),
26 ; 26 ;
27 27
28 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BrokerageEnabledConditionEnum::getCondition).toArray(); 28 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BrokerageEnabledConditionEnum::getCondition).toArray(Integer[]::new);
29 29
30 /** 30 /**
31 * 模式 31 * 模式
@@ -37,7 +37,7 @@ public enum BrokerageEnabledConditionEnum implements IntArrayValuable { @@ -37,7 +37,7 @@ public enum BrokerageEnabledConditionEnum implements IntArrayValuable {
37 private final String name; 37 private final String name;
38 38
39 @Override 39 @Override
40 - public int[] array() { 40 + public Integer[] array() {
41 return ARRAYS; 41 return ARRAYS;
42 } 42 }
43 43
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageRecordBizTypeEnum.java
1 package cn.iocoder.yudao.module.trade.enums.brokerage; 1 package cn.iocoder.yudao.module.trade.enums.brokerage;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,14 +13,14 @@ import java.util.Arrays; @@ -13,14 +13,14 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum BrokerageRecordBizTypeEnum implements IntArrayValuable { 16 +public enum BrokerageRecordBizTypeEnum implements ArrayValuable<Integer> {
17 17
18 ORDER(1, "获得推广佣金", "获得推广佣金 {}", true), 18 ORDER(1, "获得推广佣金", "获得推广佣金 {}", true),
19 WITHDRAW(2, "提现申请", "提现申请扣除佣金 {}", false), 19 WITHDRAW(2, "提现申请", "提现申请扣除佣金 {}", false),
20 WITHDRAW_REJECT(3, "提现申请驳回", "提现申请驳回,返还佣金 {}", true), 20 WITHDRAW_REJECT(3, "提现申请驳回", "提现申请驳回,返还佣金 {}", true),
21 ; 21 ;
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BrokerageRecordBizTypeEnum::getType).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BrokerageRecordBizTypeEnum::getType).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 类型 26 * 类型
@@ -40,7 +40,7 @@ public enum BrokerageRecordBizTypeEnum implements IntArrayValuable { @@ -40,7 +40,7 @@ public enum BrokerageRecordBizTypeEnum implements IntArrayValuable {
40 private final boolean add; 40 private final boolean add;
41 41
42 @Override 42 @Override
43 - public int[] array() { 43 + public Integer[] array() {
44 return ARRAYS; 44 return ARRAYS;
45 } 45 }
46 46
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageRecordStatusEnum.java
1 package cn.iocoder.yudao.module.trade.enums.brokerage; 1 package cn.iocoder.yudao.module.trade.enums.brokerage;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,14 +13,14 @@ import java.util.Arrays; @@ -13,14 +13,14 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum BrokerageRecordStatusEnum implements IntArrayValuable { 16 +public enum BrokerageRecordStatusEnum implements ArrayValuable<Integer> {
17 17
18 WAIT_SETTLEMENT(0, "待结算"), 18 WAIT_SETTLEMENT(0, "待结算"),
19 SETTLEMENT(1, "已结算"), 19 SETTLEMENT(1, "已结算"),
20 CANCEL(2, "已取消"), 20 CANCEL(2, "已取消"),
21 ; 21 ;
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BrokerageRecordStatusEnum::getStatus).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BrokerageRecordStatusEnum::getStatus).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 状态 26 * 状态
@@ -32,7 +32,7 @@ public enum BrokerageRecordStatusEnum implements IntArrayValuable { @@ -32,7 +32,7 @@ public enum BrokerageRecordStatusEnum implements IntArrayValuable {
32 private final String name; 32 private final String name;
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageWithdrawStatusEnum.java
1 package cn.iocoder.yudao.module.trade.enums.brokerage; 1 package cn.iocoder.yudao.module.trade.enums.brokerage;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -14,7 +14,7 @@ import java.util.Arrays; @@ -14,7 +14,7 @@ import java.util.Arrays;
14 */ 14 */
15 @AllArgsConstructor 15 @AllArgsConstructor
16 @Getter 16 @Getter
17 -public enum BrokerageWithdrawStatusEnum implements IntArrayValuable { 17 +public enum BrokerageWithdrawStatusEnum implements ArrayValuable<Integer> {
18 18
19 AUDITING(0, "审核中"), 19 AUDITING(0, "审核中"),
20 AUDIT_SUCCESS(10, "审核通过"), 20 AUDIT_SUCCESS(10, "审核通过"),
@@ -23,7 +23,7 @@ public enum BrokerageWithdrawStatusEnum implements IntArrayValuable { @@ -23,7 +23,7 @@ public enum BrokerageWithdrawStatusEnum implements IntArrayValuable {
23 WITHDRAW_FAIL(21, "提现失败"), 23 WITHDRAW_FAIL(21, "提现失败"),
24 ; 24 ;
25 25
26 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BrokerageWithdrawStatusEnum::getStatus).toArray(); 26 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BrokerageWithdrawStatusEnum::getStatus).toArray(Integer[]::new);
27 27
28 /** 28 /**
29 * 状态 29 * 状态
@@ -35,7 +35,7 @@ public enum BrokerageWithdrawStatusEnum implements IntArrayValuable { @@ -35,7 +35,7 @@ public enum BrokerageWithdrawStatusEnum implements IntArrayValuable {
35 private final String name; 35 private final String name;
36 36
37 @Override 37 @Override
38 - public int[] array() { 38 + public Integer[] array() {
39 return ARRAYS; 39 return ARRAYS;
40 } 40 }
41 41
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageWithdrawTypeEnum.java
1 package cn.iocoder.yudao.module.trade.enums.brokerage; 1 package cn.iocoder.yudao.module.trade.enums.brokerage;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum BrokerageWithdrawTypeEnum implements IntArrayValuable { 16 +public enum BrokerageWithdrawTypeEnum implements ArrayValuable<Integer> {
17 17
18 WALLET(1, "钱包"), 18 WALLET(1, "钱包"),
19 BANK(2, "银行卡"), 19 BANK(2, "银行卡"),
@@ -22,7 +22,7 @@ public enum BrokerageWithdrawTypeEnum implements IntArrayValuable { @@ -22,7 +22,7 @@ public enum BrokerageWithdrawTypeEnum implements IntArrayValuable {
22 WECHAT_API(5, "微信零钱"), // 自动打款,通过微信转账 API 22 WECHAT_API(5, "微信零钱"), // 自动打款,通过微信转账 API
23 ; 23 ;
24 24
25 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BrokerageWithdrawTypeEnum::getType).toArray(); 25 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(BrokerageWithdrawTypeEnum::getType).toArray(Integer[]::new);
26 26
27 /** 27 /**
28 * 类型 28 * 类型
@@ -34,7 +34,7 @@ public enum BrokerageWithdrawTypeEnum implements IntArrayValuable { @@ -34,7 +34,7 @@ public enum BrokerageWithdrawTypeEnum implements IntArrayValuable {
34 private final String name; 34 private final String name;
35 35
36 @Override 36 @Override
37 - public int[] array() { 37 + public Integer[] array() {
38 return ARRAYS; 38 return ARRAYS;
39 } 39 }
40 40
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/delivery/DeliveryExpressChargeModeEnum.java
1 package cn.iocoder.yudao.module.trade.enums.delivery; 1 package cn.iocoder.yudao.module.trade.enums.delivery;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,13 +14,13 @@ import java.util.Arrays; @@ -14,13 +14,13 @@ import java.util.Arrays;
14 */ 14 */
15 @AllArgsConstructor 15 @AllArgsConstructor
16 @Getter 16 @Getter
17 -public enum DeliveryExpressChargeModeEnum implements IntArrayValuable { 17 +public enum DeliveryExpressChargeModeEnum implements ArrayValuable<Integer> {
18 18
19 COUNT(1, "按件"), 19 COUNT(1, "按件"),
20 WEIGHT(2,"按重量"), 20 WEIGHT(2,"按重量"),
21 VOLUME(3, "按体积"); 21 VOLUME(3, "按体积");
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DeliveryExpressChargeModeEnum::getType).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(DeliveryExpressChargeModeEnum::getType).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 类型 26 * 类型
@@ -32,7 +32,7 @@ public enum DeliveryExpressChargeModeEnum implements IntArrayValuable { @@ -32,7 +32,7 @@ public enum DeliveryExpressChargeModeEnum implements IntArrayValuable {
32 private final String desc; 32 private final String desc;
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/delivery/DeliveryTypeEnum.java
1 package cn.iocoder.yudao.module.trade.enums.delivery; 1 package cn.iocoder.yudao.module.trade.enums.delivery;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,12 +13,12 @@ import java.util.Arrays; @@ -13,12 +13,12 @@ import java.util.Arrays;
13 */ 13 */
14 @Getter 14 @Getter
15 @AllArgsConstructor 15 @AllArgsConstructor
16 -public enum DeliveryTypeEnum implements IntArrayValuable { 16 +public enum DeliveryTypeEnum implements ArrayValuable<Integer> {
17 17
18 EXPRESS(1, "快递发货"), 18 EXPRESS(1, "快递发货"),
19 PICK_UP(2, "用户自提"),; 19 PICK_UP(2, "用户自提"),;
20 20
21 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DeliveryTypeEnum::getType).toArray(); 21 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(DeliveryTypeEnum::getType).toArray(Integer[]::new);
22 22
23 /** 23 /**
24 * 配送方式 24 * 配送方式
@@ -30,7 +30,7 @@ public enum DeliveryTypeEnum implements IntArrayValuable { @@ -30,7 +30,7 @@ public enum DeliveryTypeEnum implements IntArrayValuable {
30 private final String name; 30 private final String name;
31 31
32 @Override 32 @Override
33 - public int[] array() { 33 + public Integer[] array() {
34 return ARRAYS; 34 return ARRAYS;
35 } 35 }
36 36
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderCancelTypeEnum.java
1 package cn.iocoder.yudao.module.trade.enums.order; 1 package cn.iocoder.yudao.module.trade.enums.order;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.Getter; 4 import lombok.Getter;
5 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -13,14 +13,14 @@ import java.util.Arrays; @@ -13,14 +13,14 @@ import java.util.Arrays;
13 */ 13 */
14 @RequiredArgsConstructor 14 @RequiredArgsConstructor
15 @Getter 15 @Getter
16 -public enum TradeOrderCancelTypeEnum implements IntArrayValuable { 16 +public enum TradeOrderCancelTypeEnum implements ArrayValuable<Integer> {
17 17
18 PAY_TIMEOUT(10, "超时未支付"), 18 PAY_TIMEOUT(10, "超时未支付"),
19 AFTER_SALE_CLOSE(20, "退款关闭"), 19 AFTER_SALE_CLOSE(20, "退款关闭"),
20 MEMBER_CANCEL(30, "买家取消"), 20 MEMBER_CANCEL(30, "买家取消"),
21 COMBINATION_CLOSE(40, "拼团关闭"); 21 COMBINATION_CLOSE(40, "拼团关闭");
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TradeOrderCancelTypeEnum::getType).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(TradeOrderCancelTypeEnum::getType).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 关闭类型 26 * 关闭类型
@@ -32,7 +32,7 @@ public enum TradeOrderCancelTypeEnum implements IntArrayValuable { @@ -32,7 +32,7 @@ public enum TradeOrderCancelTypeEnum implements IntArrayValuable {
32 private final String name; 32 private final String name;
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderItemAfterSaleStatusEnum.java
1 package cn.iocoder.yudao.module.trade.enums.order; 1 package cn.iocoder.yudao.module.trade.enums.order;
2 2
3 import cn.hutool.core.util.ObjectUtil; 3 import cn.hutool.core.util.ObjectUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.Getter; 5 import lombok.Getter;
6 import lombok.RequiredArgsConstructor; 6 import lombok.RequiredArgsConstructor;
7 7
@@ -14,13 +14,13 @@ import java.util.Arrays; @@ -14,13 +14,13 @@ import java.util.Arrays;
14 */ 14 */
15 @RequiredArgsConstructor 15 @RequiredArgsConstructor
16 @Getter 16 @Getter
17 -public enum TradeOrderItemAfterSaleStatusEnum implements IntArrayValuable { 17 +public enum TradeOrderItemAfterSaleStatusEnum implements ArrayValuable<Integer> {
18 18
19 NONE(0, "未售后"), 19 NONE(0, "未售后"),
20 APPLY(10, "售后中"), 20 APPLY(10, "售后中"),
21 SUCCESS(20, "售后成功"); 21 SUCCESS(20, "售后成功");
22 22
23 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TradeOrderItemAfterSaleStatusEnum::getStatus).toArray(); 23 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(TradeOrderItemAfterSaleStatusEnum::getStatus).toArray(Integer[]::new);
24 24
25 /** 25 /**
26 * 状态值 26 * 状态值
@@ -32,7 +32,7 @@ public enum TradeOrderItemAfterSaleStatusEnum implements IntArrayValuable { @@ -32,7 +32,7 @@ public enum TradeOrderItemAfterSaleStatusEnum implements IntArrayValuable {
32 private final String name; 32 private final String name;
33 33
34 @Override 34 @Override
35 - public int[] array() { 35 + public Integer[] array() {
36 return ARRAYS; 36 return ARRAYS;
37 } 37 }
38 38
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderRefundStatusEnum.java
1 package cn.iocoder.yudao.module.trade.enums.order; 1 package cn.iocoder.yudao.module.trade.enums.order;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.Getter; 4 import lombok.Getter;
5 import lombok.RequiredArgsConstructor; 5 import lombok.RequiredArgsConstructor;
6 6
@@ -13,13 +13,13 @@ import java.util.Arrays; @@ -13,13 +13,13 @@ import java.util.Arrays;
13 */ 13 */
14 @RequiredArgsConstructor 14 @RequiredArgsConstructor
15 @Getter 15 @Getter
16 -public enum TradeOrderRefundStatusEnum implements IntArrayValuable { 16 +public enum TradeOrderRefundStatusEnum implements ArrayValuable<Integer> {
17 17
18 NONE(0, "未退款"), 18 NONE(0, "未退款"),
19 PART(10, "部分退款"), 19 PART(10, "部分退款"),
20 ALL(20, "全部退款"); 20 ALL(20, "全部退款");
21 21
22 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TradeOrderRefundStatusEnum::getStatus).toArray(); 22 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(TradeOrderRefundStatusEnum::getStatus).toArray(Integer[]::new);
23 23
24 /** 24 /**
25 * 状态值 25 * 状态值
@@ -31,7 +31,7 @@ public enum TradeOrderRefundStatusEnum implements IntArrayValuable { @@ -31,7 +31,7 @@ public enum TradeOrderRefundStatusEnum implements IntArrayValuable {
31 private final String name; 31 private final String name;
32 32
33 @Override 33 @Override
34 - public int[] array() { 34 + public Integer[] array() {
35 return ARRAYS; 35 return ARRAYS;
36 } 36 }
37 37
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderStatusEnum.java
1 package cn.iocoder.yudao.module.trade.enums.order; 1 package cn.iocoder.yudao.module.trade.enums.order;
2 2
3 import cn.hutool.core.util.ObjectUtil; 3 import cn.hutool.core.util.ObjectUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; 5 import cn.iocoder.yudao.framework.common.util.object.ObjectUtils;
6 import lombok.Getter; 6 import lombok.Getter;
7 import lombok.RequiredArgsConstructor; 7 import lombok.RequiredArgsConstructor;
@@ -15,7 +15,7 @@ import java.util.Arrays; @@ -15,7 +15,7 @@ import java.util.Arrays;
15 */ 15 */
16 @RequiredArgsConstructor 16 @RequiredArgsConstructor
17 @Getter 17 @Getter
18 -public enum TradeOrderStatusEnum implements IntArrayValuable { 18 +public enum TradeOrderStatusEnum implements ArrayValuable<Integer> {
19 19
20 UNPAID(0, "待支付"), 20 UNPAID(0, "待支付"),
21 UNDELIVERED(10, "待发货"), 21 UNDELIVERED(10, "待发货"),
@@ -23,7 +23,7 @@ public enum TradeOrderStatusEnum implements IntArrayValuable { @@ -23,7 +23,7 @@ public enum TradeOrderStatusEnum implements IntArrayValuable {
23 COMPLETED(30, "已完成"), 23 COMPLETED(30, "已完成"),
24 CANCELED(40, "已取消"); 24 CANCELED(40, "已取消");
25 25
26 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TradeOrderStatusEnum::getStatus).toArray(); 26 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(TradeOrderStatusEnum::getStatus).toArray(Integer[]::new);
27 27
28 /** 28 /**
29 * 状态值 29 * 状态值
@@ -35,7 +35,7 @@ public enum TradeOrderStatusEnum implements IntArrayValuable { @@ -35,7 +35,7 @@ public enum TradeOrderStatusEnum implements IntArrayValuable {
35 private final String name; 35 private final String name;
36 36
37 @Override 37 @Override
38 - public int[] array() { 38 + public Integer[] array() {
39 return ARRAYS; 39 return ARRAYS;
40 } 40 }
41 41
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderTypeEnum.java
1 package cn.iocoder.yudao.module.trade.enums.order; 1 package cn.iocoder.yudao.module.trade.enums.order;
2 2
3 import cn.hutool.core.util.ObjectUtil; 3 import cn.hutool.core.util.ObjectUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.Getter; 5 import lombok.Getter;
6 import lombok.RequiredArgsConstructor; 6 import lombok.RequiredArgsConstructor;
7 7
@@ -14,7 +14,7 @@ import java.util.Arrays; @@ -14,7 +14,7 @@ import java.util.Arrays;
14 */ 14 */
15 @RequiredArgsConstructor 15 @RequiredArgsConstructor
16 @Getter 16 @Getter
17 -public enum TradeOrderTypeEnum implements IntArrayValuable { 17 +public enum TradeOrderTypeEnum implements ArrayValuable<Integer> {
18 18
19 NORMAL(0, "普通订单"), 19 NORMAL(0, "普通订单"),
20 SECKILL(1, "秒杀订单"), 20 SECKILL(1, "秒杀订单"),
@@ -23,7 +23,7 @@ public enum TradeOrderTypeEnum implements IntArrayValuable { @@ -23,7 +23,7 @@ public enum TradeOrderTypeEnum implements IntArrayValuable {
23 POINT(4, "积分商城"), 23 POINT(4, "积分商城"),
24 ; 24 ;
25 25
26 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TradeOrderTypeEnum::getType).toArray(); 26 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(TradeOrderTypeEnum::getType).toArray(Integer[]::new);
27 27
28 /** 28 /**
29 * 类型 29 * 类型
@@ -35,7 +35,7 @@ public enum TradeOrderTypeEnum implements IntArrayValuable { @@ -35,7 +35,7 @@ public enum TradeOrderTypeEnum implements IntArrayValuable {
35 private final String name; 35 private final String name;
36 36
37 @Override 37 @Override
38 - public int[] array() { 38 + public Integer[] array() {
39 return ARRAYS; 39 return ARRAYS;
40 } 40 }
41 41
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/brokerage/BrokerageUserController.java
@@ -13,23 +13,24 @@ import cn.iocoder.yudao.module.trade.enums.brokerage.BrokerageWithdrawStatusEnum @@ -13,23 +13,24 @@ import cn.iocoder.yudao.module.trade.enums.brokerage.BrokerageWithdrawStatusEnum
13 import cn.iocoder.yudao.module.trade.service.brokerage.BrokerageRecordService; 13 import cn.iocoder.yudao.module.trade.service.brokerage.BrokerageRecordService;
14 import cn.iocoder.yudao.module.trade.service.brokerage.BrokerageUserService; 14 import cn.iocoder.yudao.module.trade.service.brokerage.BrokerageUserService;
15 import cn.iocoder.yudao.module.trade.service.brokerage.BrokerageWithdrawService; 15 import cn.iocoder.yudao.module.trade.service.brokerage.BrokerageWithdrawService;
16 -import cn.iocoder.yudao.module.trade.service.brokerage.bo.UserBrokerageSummaryRespBO;  
17 import cn.iocoder.yudao.module.trade.service.brokerage.bo.BrokerageWithdrawSummaryRespBO; 16 import cn.iocoder.yudao.module.trade.service.brokerage.bo.BrokerageWithdrawSummaryRespBO;
  17 +import cn.iocoder.yudao.module.trade.service.brokerage.bo.UserBrokerageSummaryRespBO;
18 import io.swagger.v3.oas.annotations.Operation; 18 import io.swagger.v3.oas.annotations.Operation;
19 import io.swagger.v3.oas.annotations.Parameter; 19 import io.swagger.v3.oas.annotations.Parameter;
20 import io.swagger.v3.oas.annotations.tags.Tag; 20 import io.swagger.v3.oas.annotations.tags.Tag;
  21 +import jakarta.annotation.Resource;
  22 +import jakarta.validation.Valid;
21 import org.springframework.security.access.prepost.PreAuthorize; 23 import org.springframework.security.access.prepost.PreAuthorize;
22 import org.springframework.validation.annotation.Validated; 24 import org.springframework.validation.annotation.Validated;
23 import org.springframework.web.bind.annotation.*; 25 import org.springframework.web.bind.annotation.*;
24 26
25 -import jakarta.annotation.Resource;  
26 -import jakarta.validation.Valid;  
27 import java.util.Map; 27 import java.util.Map;
28 import java.util.Set; 28 import java.util.Set;
29 29
30 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; 30 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
31 import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; 31 import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap;
32 import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; 32 import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
  33 +import static java.util.Arrays.asList;
33 34
34 @Tag(name = "管理后台 - 分销用户") 35 @Tag(name = "管理后台 - 分销用户")
35 @RestController 36 @RestController
@@ -110,7 +111,7 @@ public class BrokerageUserController { @@ -110,7 +111,7 @@ public class BrokerageUserController {
110 // 合计分佣的提现 111 // 合计分佣的提现
111 // TODO @疯狂:如果未来支持了打款这个动作,可能 status 会不对; 112 // TODO @疯狂:如果未来支持了打款这个动作,可能 status 会不对;
112 Map<Long, BrokerageWithdrawSummaryRespBO> withdrawMap = brokerageWithdrawService.getWithdrawSummaryMapByUserId( 113 Map<Long, BrokerageWithdrawSummaryRespBO> withdrawMap = brokerageWithdrawService.getWithdrawSummaryMapByUserId(
113 - userIds, BrokerageWithdrawStatusEnum.AUDIT_SUCCESS); 114 + userIds, asList(BrokerageWithdrawStatusEnum.AUDIT_SUCCESS, BrokerageWithdrawStatusEnum.WITHDRAW_SUCCESS));
114 // 拼接返回 115 // 拼接返回
115 return success(BrokerageUserConvert.INSTANCE.convertPage(pageResult, userMap, brokerageUserCountMap, 116 return success(BrokerageUserConvert.INSTANCE.convertPage(pageResult, userMap, brokerageUserCountMap,
116 brokerageOrderSummaryMap, withdrawMap)); 117 brokerageOrderSummaryMap, withdrawMap));
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/AppBrokerageUserController.java
@@ -35,6 +35,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @@ -35,6 +35,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
35 import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; 35 import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
36 import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; 36 import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
37 import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; 37 import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
  38 +import static java.util.Arrays.asList;
38 39
39 @Tag(name = "用户 APP - 分销用户") 40 @Tag(name = "用户 APP - 分销用户")
40 @RestController 41 @RestController
@@ -84,7 +85,7 @@ public class AppBrokerageUserController { @@ -84,7 +85,7 @@ public class AppBrokerageUserController {
84 BrokerageRecordBizTypeEnum.ORDER, BrokerageRecordStatusEnum.SETTLEMENT, beginTime, endTime); 85 BrokerageRecordBizTypeEnum.ORDER, BrokerageRecordStatusEnum.SETTLEMENT, beginTime, endTime);
85 // 统计用户提现的佣金 86 // 统计用户提现的佣金
86 Integer withdrawPrice = brokerageWithdrawService.getWithdrawSummaryListByUserId(Collections.singleton(userId), 87 Integer withdrawPrice = brokerageWithdrawService.getWithdrawSummaryListByUserId(Collections.singleton(userId),
87 - BrokerageWithdrawStatusEnum.AUDIT_SUCCESS).stream() 88 + asList(BrokerageWithdrawStatusEnum.AUDIT_SUCCESS, BrokerageWithdrawStatusEnum.WITHDRAW_SUCCESS)).stream()
88 .findFirst().map(BrokerageWithdrawSummaryRespBO::getPrice).orElse(0); 89 .findFirst().map(BrokerageWithdrawSummaryRespBO::getPrice).orElse(0);
89 // 统计分销用户数量(一级) 90 // 统计分销用户数量(一级)
90 Long firstBrokerageUserCount = brokerageUserService.getBrokerageUserCountByBindUserId(userId, 1); 91 Long firstBrokerageUserCount = brokerageUserService.getBrokerageUserCountByBindUserId(userId, 1);
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/brokerage/BrokerageWithdrawMapper.java
@@ -41,13 +41,14 @@ public interface BrokerageWithdrawMapper extends BaseMapperX&lt;BrokerageWithdrawDO @@ -41,13 +41,14 @@ public interface BrokerageWithdrawMapper extends BaseMapperX&lt;BrokerageWithdrawDO
41 .eq(BrokerageWithdrawDO::getStatus, status)); 41 .eq(BrokerageWithdrawDO::getStatus, status));
42 } 42 }
43 43
44 - default List<BrokerageWithdrawSummaryRespBO> selectCountAndSumPriceByUserIdAndStatus(Collection<Long> userIds, Integer status) { 44 + default List<BrokerageWithdrawSummaryRespBO> selectCountAndSumPriceByUserIdAndStatus(Collection<Long> userIds,
  45 + Collection<Integer> status) {
45 List<Map<String, Object>> list = selectMaps(new MPJLambdaWrapper<BrokerageWithdrawDO>() 46 List<Map<String, Object>> list = selectMaps(new MPJLambdaWrapper<BrokerageWithdrawDO>()
46 .select(BrokerageWithdrawDO::getUserId) 47 .select(BrokerageWithdrawDO::getUserId)
47 .selectCount(BrokerageWithdrawDO::getId, BrokerageWithdrawSummaryRespBO::getCount) 48 .selectCount(BrokerageWithdrawDO::getId, BrokerageWithdrawSummaryRespBO::getCount)
48 .selectSum(BrokerageWithdrawDO::getPrice) 49 .selectSum(BrokerageWithdrawDO::getPrice)
49 .in(BrokerageWithdrawDO::getUserId, userIds) 50 .in(BrokerageWithdrawDO::getUserId, userIds)
50 - .eq(BrokerageWithdrawDO::getStatus, status) 51 + .in(BrokerageWithdrawDO::getStatus, status)
51 .groupBy(BrokerageWithdrawDO::getUserId)); 52 .groupBy(BrokerageWithdrawDO::getUserId));
52 return BeanUtil.copyToList(list, BrokerageWithdrawSummaryRespBO.class); 53 return BeanUtil.copyToList(list, BrokerageWithdrawSummaryRespBO.class);
53 // selectJoinList有BUG,会与租户插件冲突:解析SQL时,发生异常 https://gitee.com/best_handsome/mybatis-plus-join/issues/I84GYW 54 // selectJoinList有BUG,会与租户插件冲突:解析SQL时,发生异常 https://gitee.com/best_handsome/mybatis-plus-join/issues/I84GYW
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/order/TradeOrderMapper.java
@@ -7,6 +7,7 @@ import cn.iocoder.yudao.framework.mybatis.core.query.MPJLambdaWrapperX; @@ -7,6 +7,7 @@ import cn.iocoder.yudao.framework.mybatis.core.query.MPJLambdaWrapperX;
7 import cn.iocoder.yudao.module.trade.controller.admin.order.vo.TradeOrderPageReqVO; 7 import cn.iocoder.yudao.module.trade.controller.admin.order.vo.TradeOrderPageReqVO;
8 import cn.iocoder.yudao.module.trade.controller.app.order.vo.AppTradeOrderPageReqVO; 8 import cn.iocoder.yudao.module.trade.controller.app.order.vo.AppTradeOrderPageReqVO;
9 import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderDO; 9 import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderDO;
  10 +import cn.iocoder.yudao.module.trade.enums.order.TradeOrderTypeEnum;
10 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; 11 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
11 import org.apache.ibatis.annotations.Mapper; 12 import org.apache.ibatis.annotations.Mapper;
12 13
@@ -106,10 +107,22 @@ public interface TradeOrderMapper extends BaseMapperX&lt;TradeOrderDO&gt; { @@ -106,10 +107,22 @@ public interface TradeOrderMapper extends BaseMapperX&lt;TradeOrderDO&gt; {
106 .eq(TradeOrderDO::getCommentStatus, commentStatus)); 107 .eq(TradeOrderDO::getCommentStatus, commentStatus));
107 } 108 }
108 109
109 - default List<TradeOrderDO> selectListByUserIdAndSeckillActivityId(Long userId, Long seckillActivityId) {  
110 - return selectList(new LambdaUpdateWrapper<>(TradeOrderDO.class)  
111 - .eq(TradeOrderDO::getUserId, userId)  
112 - .eq(TradeOrderDO::getSeckillActivityId, seckillActivityId)); 110 + default List<TradeOrderDO> selectListByUserIdAndActivityId(Long userId, Long activityId, TradeOrderTypeEnum type) {
  111 + LambdaQueryWrapperX<TradeOrderDO> queryWrapperX = new LambdaQueryWrapperX<>();
  112 + queryWrapperX.eq(TradeOrderDO::getUserId, userId);
  113 + if (TradeOrderTypeEnum.isSeckill(type.getType())) {
  114 + queryWrapperX.eq(TradeOrderDO::getSeckillActivityId, activityId);
  115 + }
  116 + if (TradeOrderTypeEnum.isBargain(type.getType())) {
  117 + queryWrapperX.eq(TradeOrderDO::getBargainActivityId, activityId);
  118 + }
  119 + if (TradeOrderTypeEnum.isCombination(type.getType())) {
  120 + queryWrapperX.eq(TradeOrderDO::getCombinationActivityId, activityId);
  121 + }
  122 + if (TradeOrderTypeEnum.isPoint(type.getType())) {
  123 + queryWrapperX.eq(TradeOrderDO::getPointActivityId, activityId);
  124 + }
  125 + return selectList(queryWrapperX);
113 } 126 }
114 127
115 default TradeOrderDO selectOneByPickUpVerifyCode(String pickUpVerifyCode) { 128 default TradeOrderDO selectOneByPickUpVerifyCode(String pickUpVerifyCode) {
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageWithdrawService.java
@@ -74,7 +74,7 @@ public interface BrokerageWithdrawService { @@ -74,7 +74,7 @@ public interface BrokerageWithdrawService {
74 * @return 用户提现汇总 List 74 * @return 用户提现汇总 List
75 */ 75 */
76 List<BrokerageWithdrawSummaryRespBO> getWithdrawSummaryListByUserId(Collection<Long> userIds, 76 List<BrokerageWithdrawSummaryRespBO> getWithdrawSummaryListByUserId(Collection<Long> userIds,
77 - BrokerageWithdrawStatusEnum status); 77 + Collection<BrokerageWithdrawStatusEnum> status);
78 78
79 /** 79 /**
80 * 按照 userId,汇总每个用户的提现 80 * 按照 userId,汇总每个用户的提现
@@ -84,7 +84,7 @@ public interface BrokerageWithdrawService { @@ -84,7 +84,7 @@ public interface BrokerageWithdrawService {
84 * @return 用户提现汇总 Map 84 * @return 用户提现汇总 Map
85 */ 85 */
86 default Map<Long, BrokerageWithdrawSummaryRespBO> getWithdrawSummaryMapByUserId(Set<Long> userIds, 86 default Map<Long, BrokerageWithdrawSummaryRespBO> getWithdrawSummaryMapByUserId(Set<Long> userIds,
87 - BrokerageWithdrawStatusEnum status) { 87 + Collection<BrokerageWithdrawStatusEnum> status) {
88 return convertMap(getWithdrawSummaryListByUserId(userIds, status), BrokerageWithdrawSummaryRespBO::getUserId); 88 return convertMap(getWithdrawSummaryListByUserId(userIds, status), BrokerageWithdrawSummaryRespBO::getUserId);
89 } 89 }
90 90
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageWithdrawServiceImpl.java
@@ -42,6 +42,7 @@ import java.util.Collections; @@ -42,6 +42,7 @@ import java.util.Collections;
42 import java.util.List; 42 import java.util.List;
43 43
44 import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; 44 import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
  45 +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
45 import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP; 46 import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP;
46 import static cn.iocoder.yudao.module.trade.enums.ErrorCodeConstants.*; 47 import static cn.iocoder.yudao.module.trade.enums.ErrorCodeConstants.*;
47 48
@@ -98,7 +99,7 @@ public class BrokerageWithdrawServiceImpl implements BrokerageWithdrawService { @@ -98,7 +99,7 @@ public class BrokerageWithdrawServiceImpl implements BrokerageWithdrawService {
98 // 3.1 审批通过的后续处理 99 // 3.1 审批通过的后续处理
99 if (BrokerageWithdrawStatusEnum.AUDIT_SUCCESS.equals(status)) { 100 if (BrokerageWithdrawStatusEnum.AUDIT_SUCCESS.equals(status)) {
100 auditBrokerageWithdrawSuccess(withdraw); 101 auditBrokerageWithdrawSuccess(withdraw);
101 - // 3.2 审批不通过的后续处理 102 + // 3.2 审批不通过的后续处理
102 } else if (BrokerageWithdrawStatusEnum.AUDIT_FAIL.equals(status)) { 103 } else if (BrokerageWithdrawStatusEnum.AUDIT_FAIL.equals(status)) {
103 brokerageRecordService.addBrokerage(withdraw.getUserId(), BrokerageRecordBizTypeEnum.WITHDRAW_REJECT, 104 brokerageRecordService.addBrokerage(withdraw.getUserId(), BrokerageRecordBizTypeEnum.WITHDRAW_REJECT,
104 String.valueOf(withdraw.getId()), withdraw.getPrice(), BrokerageRecordBizTypeEnum.WITHDRAW_REJECT.getTitle()); 105 String.valueOf(withdraw.getId()), withdraw.getPrice(), BrokerageRecordBizTypeEnum.WITHDRAW_REJECT.getTitle());
@@ -114,11 +115,11 @@ public class BrokerageWithdrawServiceImpl implements BrokerageWithdrawService { @@ -114,11 +115,11 @@ public class BrokerageWithdrawServiceImpl implements BrokerageWithdrawService {
114 .setUserId(withdraw.getUserId()).setUserType(UserTypeEnum.MEMBER.getValue()) 115 .setUserId(withdraw.getUserId()).setUserType(UserTypeEnum.MEMBER.getValue())
115 .setBizType(PayWalletBizTypeEnum.BROKERAGE_WITHDRAW.getType()).setBizId(withdraw.getId().toString()) 116 .setBizType(PayWalletBizTypeEnum.BROKERAGE_WITHDRAW.getType()).setBizId(withdraw.getId().toString())
116 .setPrice(withdraw.getPrice())); 117 .setPrice(withdraw.getPrice()));
117 - // 1.2 微信 API 118 + // 1.2 微信 API
118 } else if (BrokerageWithdrawTypeEnum.WECHAT_API.getType().equals(withdraw.getType())) { 119 } else if (BrokerageWithdrawTypeEnum.WECHAT_API.getType().equals(withdraw.getType())) {
119 // TODO @luchi:这里,要加个转账单号的记录;另外,调用 API 转账,是立马成功,还是有延迟的哈? 120 // TODO @luchi:这里,要加个转账单号的记录;另外,调用 API 转账,是立马成功,还是有延迟的哈?
120 Long payTransferId = createPayTransfer(withdraw); 121 Long payTransferId = createPayTransfer(withdraw);
121 - // 1.3 剩余类型,都是手动打款,所以不处理 122 + // 1.3 剩余类型,都是手动打款,所以不处理
122 } else { 123 } else {
123 // TODO 可优化:未来可以考虑,接入支付宝、银联等 API 转账,实现自动打款 124 // TODO 可优化:未来可以考虑,接入支付宝、银联等 API 转账,实现自动打款
124 log.info("[auditBrokerageWithdrawSuccess][withdraw({}) 类型({}) 手动打款,无需处理]", withdraw.getId(), withdraw.getType()); 125 log.info("[auditBrokerageWithdrawSuccess][withdraw({}) 类型({}) 手动打款,无需处理]", withdraw.getId(), withdraw.getType());
@@ -239,11 +240,12 @@ public class BrokerageWithdrawServiceImpl implements BrokerageWithdrawService { @@ -239,11 +240,12 @@ public class BrokerageWithdrawServiceImpl implements BrokerageWithdrawService {
239 240
240 @Override 241 @Override
241 public List<BrokerageWithdrawSummaryRespBO> getWithdrawSummaryListByUserId(Collection<Long> userIds, 242 public List<BrokerageWithdrawSummaryRespBO> getWithdrawSummaryListByUserId(Collection<Long> userIds,
242 - BrokerageWithdrawStatusEnum status) {  
243 - if (CollUtil.isEmpty(userIds)) { 243 + Collection<BrokerageWithdrawStatusEnum> statuses) {
  244 + if (CollUtil.isEmpty(userIds) || CollUtil.isEmpty(statuses)) {
244 return Collections.emptyList(); 245 return Collections.emptyList();
245 } 246 }
246 - return brokerageWithdrawMapper.selectCountAndSumPriceByUserIdAndStatus(userIds, status.getStatus()); 247 + return brokerageWithdrawMapper.selectCountAndSumPriceByUserIdAndStatus(userIds,
  248 + convertSet(statuses, BrokerageWithdrawStatusEnum::getStatus));
247 } 249 }
248 250
249 } 251 }
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderQueryService.java
@@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.trade.controller.admin.order.vo.TradeOrderSummary @@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.trade.controller.admin.order.vo.TradeOrderSummary
6 import cn.iocoder.yudao.module.trade.controller.app.order.vo.AppTradeOrderPageReqVO; 6 import cn.iocoder.yudao.module.trade.controller.app.order.vo.AppTradeOrderPageReqVO;
7 import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderDO; 7 import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderDO;
8 import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderItemDO; 8 import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderItemDO;
  9 +import cn.iocoder.yudao.module.trade.enums.order.TradeOrderTypeEnum;
9 import cn.iocoder.yudao.module.trade.framework.delivery.core.client.dto.ExpressTrackRespDTO; 10 import cn.iocoder.yudao.module.trade.framework.delivery.core.client.dto.ExpressTrackRespDTO;
10 11
11 import java.util.Collection; 12 import java.util.Collection;
@@ -110,13 +111,14 @@ public interface TradeOrderQueryService { @@ -110,13 +111,14 @@ public interface TradeOrderQueryService {
110 List<ExpressTrackRespDTO> getExpressTrackList(Long id); 111 List<ExpressTrackRespDTO> getExpressTrackList(Long id);
111 112
112 /** 113 /**
113 - * 【会员】在指定秒杀活动下,用户购买的商品数量 114 + * 【会员】在指定活动下,用户购买的商品数量
114 * 115 *
115 * @param userId 用户编号 116 * @param userId 用户编号
116 * @param activityId 活动编号 117 * @param activityId 活动编号
117 - * @return 秒杀商品数量 118 + * @param type 订单类型
  119 + * @return 活动商品数量
118 */ 120 */
119 - int getSeckillProductCount(Long userId, Long activityId); 121 + int getActivityProductCount(Long userId, Long activityId, TradeOrderTypeEnum type);
120 122
121 // =================== Order Item =================== 123 // =================== Order Item ===================
122 124
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderQueryServiceImpl.java
@@ -19,6 +19,7 @@ import cn.iocoder.yudao.module.trade.dal.mysql.order.TradeOrderMapper; @@ -19,6 +19,7 @@ import cn.iocoder.yudao.module.trade.dal.mysql.order.TradeOrderMapper;
19 import cn.iocoder.yudao.module.trade.dal.redis.RedisKeyConstants; 19 import cn.iocoder.yudao.module.trade.dal.redis.RedisKeyConstants;
20 import cn.iocoder.yudao.module.trade.enums.order.TradeOrderRefundStatusEnum; 20 import cn.iocoder.yudao.module.trade.enums.order.TradeOrderRefundStatusEnum;
21 import cn.iocoder.yudao.module.trade.enums.order.TradeOrderStatusEnum; 21 import cn.iocoder.yudao.module.trade.enums.order.TradeOrderStatusEnum;
  22 +import cn.iocoder.yudao.module.trade.enums.order.TradeOrderTypeEnum;
22 import cn.iocoder.yudao.module.trade.framework.delivery.core.client.ExpressClientFactory; 23 import cn.iocoder.yudao.module.trade.framework.delivery.core.client.ExpressClientFactory;
23 import cn.iocoder.yudao.module.trade.framework.delivery.core.client.dto.ExpressTrackQueryReqDTO; 24 import cn.iocoder.yudao.module.trade.framework.delivery.core.client.dto.ExpressTrackQueryReqDTO;
24 import cn.iocoder.yudao.module.trade.framework.delivery.core.client.dto.ExpressTrackRespDTO; 25 import cn.iocoder.yudao.module.trade.framework.delivery.core.client.dto.ExpressTrackRespDTO;
@@ -174,9 +175,9 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService { @@ -174,9 +175,9 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService {
174 } 175 }
175 176
176 @Override 177 @Override
177 - public int getSeckillProductCount(Long userId, Long activityId) { 178 + public int getActivityProductCount(Long userId, Long activityId, TradeOrderTypeEnum type) {
178 // 获得订单列表 179 // 获得订单列表
179 - List<TradeOrderDO> orders = tradeOrderMapper.selectListByUserIdAndSeckillActivityId(userId, activityId); 180 + List<TradeOrderDO> orders = tradeOrderMapper.selectListByUserIdAndActivityId(userId, activityId, type);
180 orders.removeIf(order -> TradeOrderStatusEnum.isCanceled(order.getStatus())); // 过滤掉【已取消】的订单 181 orders.removeIf(order -> TradeOrderStatusEnum.isCanceled(order.getStatus())); // 过滤掉【已取消】的订单
181 if (CollUtil.isEmpty(orders)) { 182 if (CollUtil.isEmpty(orders)) {
182 return 0; 183 return 0;
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/handler/TradePointOrderHandler.java
@@ -2,6 +2,8 @@ package cn.iocoder.yudao.module.trade.service.order.handler; @@ -2,6 +2,8 @@ package cn.iocoder.yudao.module.trade.service.order.handler;
2 2
3 import cn.hutool.core.collection.CollUtil; 3 import cn.hutool.core.collection.CollUtil;
4 import cn.hutool.core.lang.Assert; 4 import cn.hutool.core.lang.Assert;
  5 +import cn.iocoder.yudao.module.member.api.user.MemberUserApi;
  6 +import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO;
5 import cn.iocoder.yudao.module.promotion.api.point.PointActivityApi; 7 import cn.iocoder.yudao.module.promotion.api.point.PointActivityApi;
6 import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderDO; 8 import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderDO;
7 import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderItemDO; 9 import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderItemDO;
@@ -13,6 +15,9 @@ import org.springframework.stereotype.Component; @@ -13,6 +15,9 @@ import org.springframework.stereotype.Component;
13 import java.util.List; 15 import java.util.List;
14 import java.util.Objects; 16 import java.util.Objects;
15 17
  18 +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
  19 +import static cn.iocoder.yudao.module.trade.enums.ErrorCodeConstants.ORDER_CREATE_FAIL_INSUFFICIENT_USER_POINTS;
  20 +
16 /** 21 /**
17 * 积分商城活动订单的 {@link TradeOrderHandler} 实现类 22 * 积分商城活动订单的 {@link TradeOrderHandler} 实现类
18 * 23 *
@@ -23,6 +28,8 @@ public class TradePointOrderHandler implements TradeOrderHandler { @@ -23,6 +28,8 @@ public class TradePointOrderHandler implements TradeOrderHandler {
23 28
24 @Resource 29 @Resource
25 private PointActivityApi pointActivityApi; 30 private PointActivityApi pointActivityApi;
  31 + @Resource
  32 + private MemberUserApi memberUserApi;
26 33
27 @Override 34 @Override
28 public void beforeOrderCreate(TradeOrderDO order, List<TradeOrderItemDO> orderItems) { 35 public void beforeOrderCreate(TradeOrderDO order, List<TradeOrderItemDO> orderItems) {
@@ -31,6 +38,11 @@ public class TradePointOrderHandler implements TradeOrderHandler { @@ -31,6 +38,11 @@ public class TradePointOrderHandler implements TradeOrderHandler {
31 } 38 }
32 // 明确校验一下 39 // 明确校验一下
33 Assert.isTrue(orderItems.size() == 1, "积分商城活动兑换商品兑换时,只允许选择一个商品"); 40 Assert.isTrue(orderItems.size() == 1, "积分商城活动兑换商品兑换时,只允许选择一个商品");
  41 + // 校验用户剩余积分是否足够兑换商品
  42 + MemberUserRespDTO user = memberUserApi.getUser(order.getUserId());
  43 + if (user.getPoint() < order.getUsePoint()) {
  44 + throw exception(ORDER_CREATE_FAIL_INSUFFICIENT_USER_POINTS);
  45 + }
34 46
35 // 扣减积分商城活动的库存 47 // 扣减积分商城活动的库存
36 pointActivityApi.updatePointStockDecr(order.getPointActivityId(), 48 pointActivityApi.updatePointStockDecr(order.getPointActivityId(),
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/price/calculator/TradePointActivityPriceCalculator.java
@@ -56,36 +56,36 @@ public class TradePointActivityPriceCalculator implements TradePriceCalculator { @@ -56,36 +56,36 @@ public class TradePointActivityPriceCalculator implements TradePriceCalculator {
56 Assert.isTrue(param.getItems().size() == 1, "积分商城兑换商品时,只允许选择一个商品"); 56 Assert.isTrue(param.getItems().size() == 1, "积分商城兑换商品时,只允许选择一个商品");
57 // 2. 校验是否可以参与积分商城活动 57 // 2. 校验是否可以参与积分商城活动
58 TradePriceCalculateRespBO.OrderItem orderItem = result.getItems().get(0); 58 TradePriceCalculateRespBO.OrderItem orderItem = result.getItems().get(0);
59 - PointValidateJoinRespDTO activity = validateJoinSeckill( 59 + PointValidateJoinRespDTO activity = validateJoinPointActivity(
60 param.getUserId(), param.getPointActivityId(), 60 param.getUserId(), param.getPointActivityId(),
61 orderItem.getSkuId(), orderItem.getCount()); 61 orderItem.getSkuId(), orderItem.getCount());
62 62
  63 + // 3.0 积分兑换前置校验
  64 + Assert.isTrue(activity.getPoint() >= 1, "积分商城商品兑换积分必须大于 1");
63 // 3.1 记录优惠明细 65 // 3.1 记录优惠明细
  66 + int usePoint = activity.getPoint() * orderItem.getCount();
  67 + result.setUsePoint(usePoint);
  68 + orderItem.setUsePoint(usePoint);
64 int discountPrice = orderItem.getPayPrice(); // 情况一:单使用积分兑换 69 int discountPrice = orderItem.getPayPrice(); // 情况一:单使用积分兑换
65 - Assert.isTrue(activity.getPoint() >= 1, "积分商城商品兑换积分必须大于 1");  
66 - result.setUsePoint(activity.getPoint() * orderItem.getCount());  
67 - orderItem.setUsePoint(activity.getPoint() * orderItem.getCount());  
68 if (activity.getPrice() != null && activity.getPrice() > 0) { // 情况二:积分 + 金额 70 if (activity.getPrice() != null && activity.getPrice() > 0) { // 情况二:积分 + 金额
69 discountPrice = orderItem.getPayPrice() - activity.getPrice() * orderItem.getCount(); 71 discountPrice = orderItem.getPayPrice() - activity.getPrice() * orderItem.getCount();
70 } 72 }
71 - // 3.2 记录优惠明细  
72 TradePriceCalculatorHelper.addPromotion(result, orderItem, 73 TradePriceCalculatorHelper.addPromotion(result, orderItem,
73 param.getPointActivityId(), "积分商城活动", PromotionTypeEnum.POINT.getType(), 74 param.getPointActivityId(), "积分商城活动", PromotionTypeEnum.POINT.getType(),
74 StrUtil.format("积分商城活动:省 {} 元", TradePriceCalculatorHelper.formatPrice(discountPrice)), 75 StrUtil.format("积分商城活动:省 {} 元", TradePriceCalculatorHelper.formatPrice(discountPrice)),
75 discountPrice); 76 discountPrice);
76 -  
77 - // 3.3 更新 SKU 优惠金额 77 + // 3.2 更新 SKU 优惠金额
78 orderItem.setDiscountPrice(orderItem.getDiscountPrice() + discountPrice); 78 orderItem.setDiscountPrice(orderItem.getDiscountPrice() + discountPrice);
79 TradePriceCalculatorHelper.recountPayPrice(orderItem); 79 TradePriceCalculatorHelper.recountPayPrice(orderItem);
80 TradePriceCalculatorHelper.recountAllPrice(result); 80 TradePriceCalculatorHelper.recountAllPrice(result);
81 } 81 }
82 82
83 - private PointValidateJoinRespDTO validateJoinSeckill(Long userId, Long activityId, Long skuId, Integer count) { 83 + private PointValidateJoinRespDTO validateJoinPointActivity(Long userId, Long activityId, Long skuId, Integer count) {
84 // 1. 校验是否可以参与积分商城活动 84 // 1. 校验是否可以参与积分商城活动
85 PointValidateJoinRespDTO pointValidateJoinRespDTO = pointActivityApi.validateJoinPointActivity(activityId, skuId, count); 85 PointValidateJoinRespDTO pointValidateJoinRespDTO = pointActivityApi.validateJoinPointActivity(activityId, skuId, count);
86 // 2. 校验总限购数量,目前只有 trade 有具体下单的数据,需要交给 trade 价格计算使用 86 // 2. 校验总限购数量,目前只有 trade 有具体下单的数据,需要交给 trade 价格计算使用
87 - int activityProductCount = tradeOrderQueryService.getSeckillProductCount(userId, activityId);  
88 - if (activityProductCount + count > pointValidateJoinRespDTO.getCount()) { 87 + int pointProductCount = tradeOrderQueryService.getActivityProductCount(userId, activityId, TradeOrderTypeEnum.POINT);
  88 + if (pointProductCount + count > pointValidateJoinRespDTO.getCount()) {
89 throw exception(PRICE_CALCULATE_POINT_TOTAL_LIMIT_COUNT); 89 throw exception(PRICE_CALCULATE_POINT_TOTAL_LIMIT_COUNT);
90 } 90 }
91 return pointValidateJoinRespDTO; 91 return pointValidateJoinRespDTO;
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/price/calculator/TradeSeckillActivityPriceCalculator.java
@@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil; @@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
5 import cn.iocoder.yudao.module.promotion.api.seckill.SeckillActivityApi; 5 import cn.iocoder.yudao.module.promotion.api.seckill.SeckillActivityApi;
6 import cn.iocoder.yudao.module.promotion.api.seckill.dto.SeckillValidateJoinRespDTO; 6 import cn.iocoder.yudao.module.promotion.api.seckill.dto.SeckillValidateJoinRespDTO;
7 import cn.iocoder.yudao.module.promotion.enums.common.PromotionTypeEnum; 7 import cn.iocoder.yudao.module.promotion.enums.common.PromotionTypeEnum;
  8 +import cn.iocoder.yudao.module.trade.enums.order.TradeOrderTypeEnum;
8 import cn.iocoder.yudao.module.trade.service.order.TradeOrderQueryService; 9 import cn.iocoder.yudao.module.trade.service.order.TradeOrderQueryService;
9 import cn.iocoder.yudao.module.trade.service.price.bo.TradePriceCalculateReqBO; 10 import cn.iocoder.yudao.module.trade.service.price.bo.TradePriceCalculateReqBO;
10 import cn.iocoder.yudao.module.trade.service.price.bo.TradePriceCalculateRespBO; 11 import cn.iocoder.yudao.module.trade.service.price.bo.TradePriceCalculateRespBO;
@@ -60,7 +61,7 @@ public class TradeSeckillActivityPriceCalculator implements TradePriceCalculator @@ -60,7 +61,7 @@ public class TradeSeckillActivityPriceCalculator implements TradePriceCalculator
60 // 1. 校验是否可以参与秒杀 61 // 1. 校验是否可以参与秒杀
61 SeckillValidateJoinRespDTO seckillActivity = seckillActivityApi.validateJoinSeckill(activityId, skuId, count); 62 SeckillValidateJoinRespDTO seckillActivity = seckillActivityApi.validateJoinSeckill(activityId, skuId, count);
62 // 2. 校验总限购数量,目前只有 trade 有具体下单的数据,需要交给 trade 价格计算使用 63 // 2. 校验总限购数量,目前只有 trade 有具体下单的数据,需要交给 trade 价格计算使用
63 - int seckillProductCount = tradeOrderQueryService.getSeckillProductCount(userId, activityId); 64 + int seckillProductCount = tradeOrderQueryService.getActivityProductCount(userId, activityId, TradeOrderTypeEnum.SECKILL);
64 if (seckillProductCount + count > seckillActivity.getTotalLimitCount()) { 65 if (seckillProductCount + count > seckillActivity.getTotalLimitCount()) {
65 throw exception(PRICE_CALCULATE_SECKILL_TOTAL_LIMIT_COUNT); 66 throw exception(PRICE_CALCULATE_SECKILL_TOTAL_LIMIT_COUNT);
66 } 67 }
yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/enums/point/MemberPointBizTypeEnum.java
1 package cn.iocoder.yudao.module.member.enums.point; 1 package cn.iocoder.yudao.module.member.enums.point;
2 2
3 import cn.hutool.core.util.EnumUtil; 3 import cn.hutool.core.util.EnumUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,7 +14,7 @@ import java.util.Objects; @@ -14,7 +14,7 @@ import java.util.Objects;
14 */ 14 */
15 @AllArgsConstructor 15 @AllArgsConstructor
16 @Getter 16 @Getter
17 -public enum MemberPointBizTypeEnum implements IntArrayValuable { 17 +public enum MemberPointBizTypeEnum implements ArrayValuable<Integer> {
18 18
19 SIGN(1, "签到", "签到获得 {} 积分", true), 19 SIGN(1, "签到", "签到获得 {} 积分", true),
20 ADMIN(2, "管理员修改", "管理员修改 {} 积分", true), 20 ADMIN(2, "管理员修改", "管理员修改 {} 积分", true),
@@ -46,8 +46,8 @@ public enum MemberPointBizTypeEnum implements IntArrayValuable { @@ -46,8 +46,8 @@ public enum MemberPointBizTypeEnum implements IntArrayValuable {
46 private final boolean add; 46 private final boolean add;
47 47
48 @Override 48 @Override
49 - public int[] array() {  
50 - return new int[0]; 49 + public Integer[] array() {
  50 + return new Integer[0];
51 } 51 }
52 52
53 public static MemberPointBizTypeEnum getByType(Integer type) { 53 public static MemberPointBizTypeEnum getByType(Integer type) {
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/order/PayOrderStatusEnum.java
1 package cn.iocoder.yudao.module.pay.enums.order; 1 package cn.iocoder.yudao.module.pay.enums.order;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; 4 import cn.iocoder.yudao.framework.common.util.object.ObjectUtils;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
@@ -14,7 +14,7 @@ import java.util.Objects; @@ -14,7 +14,7 @@ import java.util.Objects;
14 */ 14 */
15 @Getter 15 @Getter
16 @AllArgsConstructor 16 @AllArgsConstructor
17 -public enum PayOrderStatusEnum implements IntArrayValuable { 17 +public enum PayOrderStatusEnum implements ArrayValuable<Integer> {
18 18
19 WAITING(0, "未支付"), 19 WAITING(0, "未支付"),
20 SUCCESS(10, "支付成功"), 20 SUCCESS(10, "支付成功"),
@@ -26,8 +26,8 @@ public enum PayOrderStatusEnum implements IntArrayValuable { @@ -26,8 +26,8 @@ public enum PayOrderStatusEnum implements IntArrayValuable {
26 private final String name; 26 private final String name;
27 27
28 @Override 28 @Override
29 - public int[] array() {  
30 - return new int[0]; 29 + public Integer[] array() {
  30 + return new Integer[0];
31 } 31 }
32 32
33 /** 33 /**
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/transfer/PayTransferTypeEnum.java
1 package cn.iocoder.yudao.module.pay.enums.transfer; 1 package cn.iocoder.yudao.module.pay.enums.transfer;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,7 +14,7 @@ import java.util.Arrays; @@ -14,7 +14,7 @@ import java.util.Arrays;
14 */ 14 */
15 @AllArgsConstructor 15 @AllArgsConstructor
16 @Getter 16 @Getter
17 -public enum PayTransferTypeEnum implements IntArrayValuable { 17 +public enum PayTransferTypeEnum implements ArrayValuable<Integer> {
18 18
19 ALIPAY_BALANCE(1, "支付宝余额"), 19 ALIPAY_BALANCE(1, "支付宝余额"),
20 WX_BALANCE(2, "微信余额"), 20 WX_BALANCE(2, "微信余额"),
@@ -30,10 +30,10 @@ public enum PayTransferTypeEnum implements IntArrayValuable { @@ -30,10 +30,10 @@ public enum PayTransferTypeEnum implements IntArrayValuable {
30 private final Integer type; 30 private final Integer type;
31 private final String name; 31 private final String name;
32 32
33 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PayTransferTypeEnum::getType).toArray(); 33 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PayTransferTypeEnum::getType).toArray(Integer[]::new);
34 34
35 @Override 35 @Override
36 - public int[] array() { 36 + public Integer[] array() {
37 return ARRAYS; 37 return ARRAYS;
38 } 38 }
39 39
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/wallet/PayWalletBizTypeEnum.java
1 package cn.iocoder.yudao.module.pay.enums.wallet; 1 package cn.iocoder.yudao.module.pay.enums.wallet;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -13,7 +13,7 @@ import java.util.Arrays; @@ -13,7 +13,7 @@ import java.util.Arrays;
13 */ 13 */
14 @AllArgsConstructor 14 @AllArgsConstructor
15 @Getter 15 @Getter
16 -public enum PayWalletBizTypeEnum implements IntArrayValuable { 16 +public enum PayWalletBizTypeEnum implements ArrayValuable<Integer> {
17 17
18 RECHARGE(1, "充值"), 18 RECHARGE(1, "充值"),
19 RECHARGE_REFUND(2, "充值退款"), 19 RECHARGE_REFUND(2, "充值退款"),
@@ -31,10 +31,10 @@ public enum PayWalletBizTypeEnum implements IntArrayValuable { @@ -31,10 +31,10 @@ public enum PayWalletBizTypeEnum implements IntArrayValuable {
31 */ 31 */
32 private final String description; 32 private final String description;
33 33
34 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PayWalletBizTypeEnum::getType).toArray(); 34 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PayWalletBizTypeEnum::getType).toArray(Integer[]::new);
35 35
36 @Override 36 @Override
37 - public int[] array() { 37 + public Integer[] array() {
38 return ARRAYS; 38 return ARRAYS;
39 } 39 }
40 40
yudao-module-pay/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/enums/transfer/PayTransferTypeEnum.java
1 package cn.iocoder.yudao.framework.pay.core.enums.transfer; 1 package cn.iocoder.yudao.framework.pay.core.enums.transfer;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,7 +14,7 @@ import java.util.Arrays; @@ -14,7 +14,7 @@ import java.util.Arrays;
14 */ 14 */
15 @AllArgsConstructor 15 @AllArgsConstructor
16 @Getter 16 @Getter
17 -public enum PayTransferTypeEnum implements IntArrayValuable { 17 +public enum PayTransferTypeEnum implements ArrayValuable<Integer> {
18 18
19 ALIPAY_BALANCE(1, "支付宝余额"), 19 ALIPAY_BALANCE(1, "支付宝余额"),
20 WX_BALANCE(2, "微信余额"), 20 WX_BALANCE(2, "微信余额"),
@@ -30,10 +30,10 @@ public enum PayTransferTypeEnum implements IntArrayValuable { @@ -30,10 +30,10 @@ public enum PayTransferTypeEnum implements IntArrayValuable {
30 private final Integer type; 30 private final Integer type;
31 private final String name; 31 private final String name;
32 32
33 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PayTransferTypeEnum::getType).toArray(); 33 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(PayTransferTypeEnum::getType).toArray(Integer[]::new);
34 34
35 @Override 35 @Override
36 - public int[] array() { 36 + public Integer[] array() {
37 return ARRAYS; 37 return ARRAYS;
38 } 38 }
39 39
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/permission/DataScopeEnum.java
1 package cn.iocoder.yudao.module.system.enums.permission; 1 package cn.iocoder.yudao.module.system.enums.permission;
2 2
3 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 3 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
5 import lombok.Getter; 5 import lombok.Getter;
6 6
@@ -15,7 +15,7 @@ import java.util.Arrays; @@ -15,7 +15,7 @@ import java.util.Arrays;
15 */ 15 */
16 @Getter 16 @Getter
17 @AllArgsConstructor 17 @AllArgsConstructor
18 -public enum DataScopeEnum implements IntArrayValuable { 18 +public enum DataScopeEnum implements ArrayValuable<Integer> {
19 19
20 ALL(1), // 全部数据权限 20 ALL(1), // 全部数据权限
21 21
@@ -30,10 +30,10 @@ public enum DataScopeEnum implements IntArrayValuable { @@ -30,10 +30,10 @@ public enum DataScopeEnum implements IntArrayValuable {
30 */ 30 */
31 private final Integer scope; 31 private final Integer scope;
32 32
33 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DataScopeEnum::getScope).toArray(); 33 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(DataScopeEnum::getScope).toArray(Integer[]::new);
34 34
35 @Override 35 @Override
36 - public int[] array() { 36 + public Integer[] array() {
37 return ARRAYS; 37 return ARRAYS;
38 } 38 }
39 39
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/sms/SmsSceneEnum.java
1 package cn.iocoder.yudao.module.system.enums.sms; 1 package cn.iocoder.yudao.module.system.enums.sms;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,7 +14,7 @@ import java.util.Arrays; @@ -14,7 +14,7 @@ import java.util.Arrays;
14 */ 14 */
15 @Getter 15 @Getter
16 @AllArgsConstructor 16 @AllArgsConstructor
17 -public enum SmsSceneEnum implements IntArrayValuable { 17 +public enum SmsSceneEnum implements ArrayValuable<Integer> {
18 18
19 MEMBER_LOGIN(1, "user-sms-login", "会员用户 - 手机号登陆"), 19 MEMBER_LOGIN(1, "user-sms-login", "会员用户 - 手机号登陆"),
20 MEMBER_UPDATE_MOBILE(2, "user-update-mobile", "会员用户 - 修改手机"), 20 MEMBER_UPDATE_MOBILE(2, "user-update-mobile", "会员用户 - 修改手机"),
@@ -25,7 +25,7 @@ public enum SmsSceneEnum implements IntArrayValuable { @@ -25,7 +25,7 @@ public enum SmsSceneEnum implements IntArrayValuable {
25 ADMIN_MEMBER_REGISTER(22, "admin-sms-register", "后台用户 - 手机号注册"), 25 ADMIN_MEMBER_REGISTER(22, "admin-sms-register", "后台用户 - 手机号注册"),
26 ADMIN_MEMBER_RESET_PASSWORD(23, "admin-reset-password", "后台用户 - 忘记密码"); 26 ADMIN_MEMBER_RESET_PASSWORD(23, "admin-reset-password", "后台用户 - 忘记密码");
27 27
28 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(SmsSceneEnum::getScene).toArray(); 28 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(SmsSceneEnum::getScene).toArray(Integer[]::new);
29 29
30 /** 30 /**
31 * 验证场景的编号 31 * 验证场景的编号
@@ -41,7 +41,7 @@ public enum SmsSceneEnum implements IntArrayValuable { @@ -41,7 +41,7 @@ public enum SmsSceneEnum implements IntArrayValuable {
41 private final String description; 41 private final String description;
42 42
43 @Override 43 @Override
44 - public int[] array() { 44 + public Integer[] array() {
45 return ARRAYS; 45 return ARRAYS;
46 } 46 }
47 47
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/social/SocialTypeEnum.java
1 package cn.iocoder.yudao.module.system.enums.social; 1 package cn.iocoder.yudao.module.system.enums.social;
2 2
3 import cn.hutool.core.util.ArrayUtil; 3 import cn.hutool.core.util.ArrayUtil;
4 -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; 4 +import cn.iocoder.yudao.framework.common.core.ArrayValuable;
5 import lombok.AllArgsConstructor; 5 import lombok.AllArgsConstructor;
6 import lombok.Getter; 6 import lombok.Getter;
7 7
@@ -14,7 +14,7 @@ import java.util.Arrays; @@ -14,7 +14,7 @@ import java.util.Arrays;
14 */ 14 */
15 @Getter 15 @Getter
16 @AllArgsConstructor 16 @AllArgsConstructor
17 -public enum SocialTypeEnum implements IntArrayValuable { 17 +public enum SocialTypeEnum implements ArrayValuable<Integer> {
18 18
19 /** 19 /**
20 * Gitee 20 * Gitee
@@ -55,7 +55,7 @@ public enum SocialTypeEnum implements IntArrayValuable { @@ -55,7 +55,7 @@ public enum SocialTypeEnum implements IntArrayValuable {
55 WECHAT_MINI_APP(34, "WECHAT_MINI_APP"), 55 WECHAT_MINI_APP(34, "WECHAT_MINI_APP"),
56 ; 56 ;
57 57
58 - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(SocialTypeEnum::getType).toArray(); 58 + public static final Integer[] ARRAYS = Arrays.stream(values()).map(SocialTypeEnum::getType).toArray(Integer[]::new);
59 59
60 /** 60 /**
61 * 类型 61 * 类型
@@ -67,7 +67,7 @@ public enum SocialTypeEnum implements IntArrayValuable { @@ -67,7 +67,7 @@ public enum SocialTypeEnum implements IntArrayValuable {
67 private final String source; 67 private final String source;
68 68
69 @Override 69 @Override
70 - public int[] array() { 70 + public Integer[] array() {
71 return ARRAYS; 71 return ARRAYS;
72 } 72 }
73 73