Commit f411eff0 by s_guodong

update

parent 32582570
......@@ -72,7 +72,17 @@ public class ValidatorUtil {
if (bigDecimal.length() > max) {
return "参数校验错误[" + message + "]";
}
} else if (type.isAssignableFrom(Integer.TYPE) || type.isAssignableFrom(Integer.class)) {
int min = length.min();
String stringValue = String.valueOf(o);
if (stringValue.length() > max || stringValue.length() < min) {
return "参数校验错误[" + message + "]";
}
}
}
}
if (f.isAnnotationPresent(DecimalLength.class)) {
String bigDecimal = ((BigDecimal) o).toPlainString();
DecimalLength annotation = f.getAnnotation(DecimalLength.class);
int i = bigDecimal.indexOf(".");
if (i > -1) {
......@@ -90,17 +100,6 @@ public class ValidatorUtil {
}
}
}
} else if (type.isAssignableFrom(Integer.TYPE) || type.isAssignableFrom(Integer.class)) {
int min = length.min();
String stringValue = String.valueOf(o);
if (stringValue.length() > max || stringValue.length() < min) {
return "参数校验错误[" + message + "]";
}
}
}
}
if (f.isAnnotationPresent(NotEmpty.class) && type.isAssignableFrom(String.class)) {
NotEmpty annotation = f.getAnnotation(NotEmpty.class);
if (o == null || StringUtils.isBlank((String) o)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment