修改变量名。

feature/net-util
ZhouXY108 2023-06-27 01:11:00 +08:00
parent d5ee8700d2
commit 3a46e2e60c
1 changed files with 13 additions and 13 deletions

View File

@ -51,23 +51,23 @@ public class SimpleJdbcTemplate {
public static Object[] buildParams(final Object... params) {
return Arrays.stream(params)
.map(p -> {
if (p instanceof Optional) {
return OptionalUtil.orElseNull((Optional<?>) p);
.map(param -> {
if (param instanceof Optional) {
return OptionalUtil.orElseNull((Optional<?>) param);
}
if (p instanceof OptionalInt) {
OptionalInt _p = ((OptionalInt) p);
return _p.isPresent() ? _p.getAsInt() : null;
if (param instanceof OptionalInt) {
OptionalInt p = ((OptionalInt) param);
return p.isPresent() ? p.getAsInt() : null;
}
if (p instanceof OptionalLong) {
OptionalLong _p = ((OptionalLong) p);
return _p.isPresent() ? _p.getAsLong() : null;
if (param instanceof OptionalLong) {
OptionalLong p = ((OptionalLong) param);
return p.isPresent() ? p.getAsLong() : null;
}
if (p instanceof OptionalDouble) {
OptionalDouble _p = ((OptionalDouble) p);
return _p.isPresent() ? _p.getAsDouble() : null;
if (param instanceof OptionalDouble) {
OptionalDouble p = ((OptionalDouble) param);
return p.isPresent() ? p.getAsDouble() : null;
}
return p;
return param;
})
.toArray();
}