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