refactor(util): 移除多余BeanUtil导入并添加参数验证工具类

This commit is contained in:
2026-01-07 18:09:04 +08:00
parent 54cae0855b
commit e88d535153
23 changed files with 134 additions and 148 deletions
@@ -49,4 +49,16 @@ public final class KitValidUtil {
violations.stream().map(ConstraintViolation::getMessage).collect(Collectors.joining(",")));
}
}
public static void notNull(Object value) {
if (value == null) {
throw new BadRequestException("参数必填");
}
}
public static void isNull(Object value) {
if (value != null) {
throw new BadRequestException("参数非必填");
}
}
}