# Conflicts:
#	yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnum.java
#	yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnumCollectionValidator.java
#	yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/validation/InEnumValidator.java
#	yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/brokerage/BrokerageUserController.java
#	yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java
This commit is contained in:
YunaiV
2025-01-24 20:56:26 +08:00
117 changed files with 612 additions and 482 deletions

View File

@@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.promotion.enums.banner;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
@@ -13,7 +13,7 @@ import java.util.Arrays;
*/
@AllArgsConstructor
@Getter
public enum BannerPositionEnum implements IntArrayValuable {
public enum BannerPositionEnum implements ArrayValuable<Integer> {
HOME_POSITION(1, "首页"),
SECKILL_POSITION(2, "秒杀活动页"),
@@ -21,7 +21,7 @@ public enum BannerPositionEnum implements IntArrayValuable {
DISCOUNT_POSITION(4, "限时折扣页"),
REWARD_POSITION(5, "满减送页");
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BannerPositionEnum::getPosition).toArray();
public static final Integer[] ARRAYS = Arrays.stream(values()).map(BannerPositionEnum::getPosition).toArray(Integer[]::new);
/**
* 值
@@ -33,7 +33,7 @@ public enum BannerPositionEnum implements IntArrayValuable {
private final String name;
@Override
public int[] array() {
public Integer[] array() {
return ARRAYS;
}

View File

@@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.promotion.enums.bargain;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
@@ -13,14 +13,14 @@ import java.util.Arrays;
*/
@AllArgsConstructor
@Getter
public enum BargainRecordStatusEnum implements IntArrayValuable {
public enum BargainRecordStatusEnum implements ArrayValuable<Integer> {
IN_PROGRESS(1, "砍价中"),
SUCCESS(2, "砍价成功"),
FAILED(3, "砍价失败"), // 活动到期时,会自动将到期的砍价全部设置为过期
;
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BargainRecordStatusEnum::getStatus).toArray();
public static final Integer[] ARRAYS = Arrays.stream(values()).map(BargainRecordStatusEnum::getStatus).toArray(Integer[]::new);
/**
* 值
@@ -32,7 +32,7 @@ public enum BargainRecordStatusEnum implements IntArrayValuable {
private final String name;
@Override
public int[] array() {
public Integer[] array() {
return ARRAYS;
}

View File

@@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.promotion.enums.combination;
import cn.hutool.core.util.ObjectUtil;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
@@ -14,13 +14,13 @@ import java.util.Arrays;
*/
@AllArgsConstructor
@Getter
public enum CombinationRecordStatusEnum implements IntArrayValuable {
public enum CombinationRecordStatusEnum implements ArrayValuable<Integer> {
IN_PROGRESS(0, "进行中"),
SUCCESS(1, "拼团成功"),
FAILED(2, "拼团失败");
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CombinationRecordStatusEnum::getStatus).toArray();
public static final Integer[] ARRAYS = Arrays.stream(values()).map(CombinationRecordStatusEnum::getStatus).toArray(Integer[]::new);
/**
* 状态值
@@ -32,7 +32,7 @@ public enum CombinationRecordStatusEnum implements IntArrayValuable {
private final String name;
@Override
public int[] array() {
public Integer[] array() {
return ARRAYS;
}

View File

@@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.promotion.enums.common;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
@@ -14,14 +14,14 @@ import java.util.Arrays;
*/
@AllArgsConstructor
@Getter
public enum PromotionActivityStatusEnum implements IntArrayValuable {
public enum PromotionActivityStatusEnum implements ArrayValuable<Integer> {
WAIT(10, "未开始"),
RUN(20, "进行中"),
END(30, "已结束"),
CLOSE(40, "已关闭");
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PromotionActivityStatusEnum::getStatus).toArray();
public static final Integer[] ARRAYS = Arrays.stream(values()).map(PromotionActivityStatusEnum::getStatus).toArray(Integer[]::new);
/**
* 状态值
@@ -33,7 +33,7 @@ public enum PromotionActivityStatusEnum implements IntArrayValuable {
private final String name;
@Override
public int[] array() {
public Integer[] array() {
return ARRAYS;
}

View File

@@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.promotion.enums.common;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
@@ -13,12 +13,12 @@ import java.util.Arrays;
*/
@AllArgsConstructor
@Getter
public enum PromotionConditionTypeEnum implements IntArrayValuable {
public enum PromotionConditionTypeEnum implements ArrayValuable<Integer> {
PRICE(10, "满 N 元"),
COUNT(20, "满 N 件");
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PromotionConditionTypeEnum::getType).toArray();
public static final Integer[] ARRAYS = Arrays.stream(values()).map(PromotionConditionTypeEnum::getType).toArray(Integer[]::new);
/**
* 类型值
@@ -30,7 +30,7 @@ public enum PromotionConditionTypeEnum implements IntArrayValuable {
private final String name;
@Override
public int[] array() {
public Integer[] array() {
return ARRAYS;
}

View File

@@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.promotion.enums.common;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
@@ -13,13 +13,13 @@ import java.util.Arrays;
*/
@Getter
@AllArgsConstructor
public enum PromotionDiscountTypeEnum implements IntArrayValuable {
public enum PromotionDiscountTypeEnum implements ArrayValuable<Integer> {
PRICE(1, "满减"), // 具体金额
PERCENT(2, "折扣"), // 百分比
;
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PromotionDiscountTypeEnum::getType).toArray();
public static final Integer[] ARRAYS = Arrays.stream(values()).map(PromotionDiscountTypeEnum::getType).toArray(Integer[]::new);
/**
* 优惠类型
@@ -31,7 +31,7 @@ public enum PromotionDiscountTypeEnum implements IntArrayValuable {
private final String name;
@Override
public int[] array() {
public Integer[] array() {
return ARRAYS;
}

View File

@@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.promotion.enums.common;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
@@ -14,13 +14,13 @@ import java.util.Objects;
*/
@Getter
@AllArgsConstructor
public enum PromotionProductScopeEnum implements IntArrayValuable {
public enum PromotionProductScopeEnum implements ArrayValuable<Integer> {
ALL(1, "全部商品"),
SPU(2, "指定商品"),
CATEGORY(3, "指定品类");
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PromotionProductScopeEnum::getScope).toArray();
public static final Integer[] ARRAYS = Arrays.stream(values()).map(PromotionProductScopeEnum::getScope).toArray(Integer[]::new);
/**
* 范围值
@@ -32,7 +32,7 @@ public enum PromotionProductScopeEnum implements IntArrayValuable {
private final String name;
@Override
public int[] array() {
public Integer[] array() {
return ARRAYS;
}

View File

@@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.promotion.enums.common;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
@@ -13,7 +13,7 @@ import java.util.Arrays;
*/
@Getter
@AllArgsConstructor
public enum PromotionTypeEnum implements IntArrayValuable {
public enum PromotionTypeEnum implements ArrayValuable<Integer> {
SECKILL_ACTIVITY(1, "秒杀活动"),
BARGAIN_ACTIVITY(2, "砍价活动"),
@@ -27,7 +27,7 @@ public enum PromotionTypeEnum implements IntArrayValuable {
POINT(8, "积分")
;
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PromotionTypeEnum::getType).toArray();
public static final Integer[] ARRAYS = Arrays.stream(values()).map(PromotionTypeEnum::getType).toArray(Integer[]::new);
/**
* 类型值
@@ -39,7 +39,7 @@ public enum PromotionTypeEnum implements IntArrayValuable {
private final String name;
@Override
public int[] array() {
public Integer[] array() {
return ARRAYS;
}

View File

@@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.promotion.enums.coupon;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
@@ -13,13 +13,13 @@ import java.util.Arrays;
*/
@AllArgsConstructor
@Getter
public enum CouponStatusEnum implements IntArrayValuable {
public enum CouponStatusEnum implements ArrayValuable<Integer> {
UNUSED(1, "未使用"),
USED(2, "已使用"),
EXPIRE(3, "已过期");
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CouponStatusEnum::getStatus).toArray();
public static final Integer[] ARRAYS = Arrays.stream(values()).map(CouponStatusEnum::getStatus).toArray(Integer[]::new);
/**
* 值
@@ -31,7 +31,7 @@ public enum CouponStatusEnum implements IntArrayValuable {
private final String name;
@Override
public int[] array() {
public Integer[] array() {
return ARRAYS;
}

View File

@@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.promotion.enums.coupon;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
@@ -14,14 +14,14 @@ import java.util.Objects;
*/
@AllArgsConstructor
@Getter
public enum CouponTakeTypeEnum implements IntArrayValuable {
public enum CouponTakeTypeEnum implements ArrayValuable<Integer> {
USER(1, "直接领取"), // 用户可在首页、每日领劵直接领取
ADMIN(2, "指定发放"), // 后台指定会员赠送优惠劵
REGISTER(3, "新人券"), // 注册时自动领取
;
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CouponTakeTypeEnum::getType).toArray();
public static final Integer[] ARRAYS = Arrays.stream(values()).map(CouponTakeTypeEnum::getType).toArray(Integer[]::new);
/**
* 值
@@ -33,7 +33,7 @@ public enum CouponTakeTypeEnum implements IntArrayValuable {
private final String name;
@Override
public int[] array() {
public Integer[] array() {
return ARRAYS;
}

View File

@@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.promotion.enums.coupon;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
@@ -13,13 +13,13 @@ import java.util.Arrays;
*/
@AllArgsConstructor
@Getter
public enum CouponTemplateValidityTypeEnum implements IntArrayValuable {
public enum CouponTemplateValidityTypeEnum implements ArrayValuable<Integer> {
DATE(1, "固定日期"),
TERM(2, "领取之后"),
;
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CouponTemplateValidityTypeEnum::getType).toArray();
public static final Integer[] ARRAYS = Arrays.stream(values()).map(CouponTemplateValidityTypeEnum::getType).toArray(Integer[]::new);
/**
* 值
@@ -31,7 +31,7 @@ public enum CouponTemplateValidityTypeEnum implements IntArrayValuable {
private final String name;
@Override
public int[] array() {
public Integer[] array() {
return ARRAYS;
}

View File

@@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.promotion.enums.diy;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
@@ -13,13 +13,13 @@ import java.util.Arrays;
*/
@AllArgsConstructor
@Getter
public enum DiyPageEnum implements IntArrayValuable {
public enum DiyPageEnum implements ArrayValuable<Integer> {
INDEX(1, "首页"),
MY(2, "我的"),
;
private static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DiyPageEnum::getPage).toArray();
private static final Integer[] ARRAYS = Arrays.stream(values()).map(DiyPageEnum::getPage).toArray(Integer[]::new);
/**
* 页面编号
@@ -32,7 +32,7 @@ public enum DiyPageEnum implements IntArrayValuable {
private final String name;
@Override
public int[] array() {
public Integer[] array() {
return ARRAYS;
}

View File

@@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.promotion.enums.kefu;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
@@ -13,7 +13,7 @@ import java.util.Arrays;
*/
@AllArgsConstructor
@Getter
public enum KeFuMessageContentTypeEnum implements IntArrayValuable {
public enum KeFuMessageContentTypeEnum implements ArrayValuable<Integer> {
TEXT(1, "文本消息"),
IMAGE(2, "图片消息"),
@@ -25,7 +25,7 @@ public enum KeFuMessageContentTypeEnum implements IntArrayValuable {
PRODUCT(10, "商品消息"),
ORDER(11, "订单消息");
private static final int[] ARRAYS = Arrays.stream(values()).mapToInt(KeFuMessageContentTypeEnum::getType).toArray();
private static final Integer[] ARRAYS = Arrays.stream(values()).map(KeFuMessageContentTypeEnum::getType).toArray(Integer[]::new);
/**
* 类型
@@ -38,7 +38,7 @@ public enum KeFuMessageContentTypeEnum implements IntArrayValuable {
private final String name;
@Override
public int[] array() {
public Integer[] array() {
return ARRAYS;
}