diff --git a/continew-admin-common/src/main/java/top/charles7c/cnadmin/common/util/validate/CheckUtils.java b/continew-admin-common/src/main/java/top/charles7c/cnadmin/common/util/validate/CheckUtils.java index 0c3a6468..75585a20 100644 --- a/continew-admin-common/src/main/java/top/charles7c/cnadmin/common/util/validate/CheckUtils.java +++ b/continew-admin-common/src/main/java/top/charles7c/cnadmin/common/util/validate/CheckUtils.java @@ -16,6 +16,8 @@ package top.charles7c.cnadmin.common.util.validate; +import java.util.function.BooleanSupplier; + import lombok.AccessLevel; import lombok.NoArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -208,7 +210,7 @@ public class CheckUtils extends Validator { * @param message * 错误信息 */ - public static void throwIf(java.util.function.BooleanSupplier conditionSupplier, String message) { + public static void throwIf(BooleanSupplier conditionSupplier, String message) { throwIf(conditionSupplier, message, EXCEPTION_TYPE); } } diff --git a/continew-admin-common/src/main/java/top/charles7c/cnadmin/common/util/validate/ValidationUtils.java b/continew-admin-common/src/main/java/top/charles7c/cnadmin/common/util/validate/ValidationUtils.java index e2d7af91..ee7e6685 100644 --- a/continew-admin-common/src/main/java/top/charles7c/cnadmin/common/util/validate/ValidationUtils.java +++ b/continew-admin-common/src/main/java/top/charles7c/cnadmin/common/util/validate/ValidationUtils.java @@ -16,6 +16,8 @@ package top.charles7c.cnadmin.common.util.validate; +import java.util.function.BooleanSupplier; + import lombok.AccessLevel; import lombok.NoArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -171,7 +173,7 @@ public class ValidationUtils extends Validator { * @param message * 错误信息 */ - public static void throwIf(java.util.function.BooleanSupplier conditionSupplier, String message) { + public static void throwIf(BooleanSupplier conditionSupplier, String message) { throwIf(conditionSupplier, message, EXCEPTION_TYPE); } } diff --git a/continew-admin-common/src/main/java/top/charles7c/cnadmin/common/util/validate/Validator.java b/continew-admin-common/src/main/java/top/charles7c/cnadmin/common/util/validate/Validator.java index a34d77f1..279c3552 100644 --- a/continew-admin-common/src/main/java/top/charles7c/cnadmin/common/util/validate/Validator.java +++ b/continew-admin-common/src/main/java/top/charles7c/cnadmin/common/util/validate/Validator.java @@ -16,6 +16,8 @@ package top.charles7c.cnadmin.common.util.validate; +import java.util.function.BooleanSupplier; + import lombok.AccessLevel; import lombok.NoArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -198,7 +200,7 @@ public class Validator { * @param exceptionType * 异常类型 */ - protected static void throwIf(java.util.function.BooleanSupplier conditionSupplier, String message, + protected static void throwIf(BooleanSupplier conditionSupplier, String message, Class exceptionType) { if (conditionSupplier != null && conditionSupplier.getAsBoolean()) { log.error(message);