Skip to content

Commit 22c8a24

Browse files
author
zhangrongfan
committed
Try to fix
1 parent ac40f59 commit 22c8a24

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

mybatis-boost-core/src/main/java/cn/mybatisboost/json/JsonResultSetsHandler.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ public class JsonResultSetsHandler implements Interceptor {
2323
@Override
2424
public Object intercept(Invocation invocation) throws Throwable {
2525
List<?> proceed = (List<?>) invocation.proceed();
26-
System.out.println("4790174127041207412701401:" + proceed);
2726
if (proceed.isEmpty()) return proceed;
2827

2928
Class<?> type = proceed.get(0).getClass();

mybatis-boost-core/src/main/java/cn/mybatisboost/json/JsonTypeHandler.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@ public class JsonTypeHandler extends BaseTypeHandler<Property<?>> {
2121
public void setNonNullParameter(PreparedStatement ps, int i, Property<?> parameter, JdbcType jdbcType)
2222
throws SQLException {
2323
try {
24-
if (parameter.isPresent()) {
25-
ps.setString(i, objectMapper.writeValueAsString(parameter.get()));
26-
} else {
27-
ps.setObject(i, null);
28-
}
24+
ps.setString(i, objectMapper.writeValueAsString(parameter.get()));
2925
} catch (JsonProcessingException e) {
3026
throw new RuntimeException(e);
3127
}

mybatis-boost-test/src/main/java/cn/mybatisboost/test/Project.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class Project {
1010
private String license;
1111
private String scm;
1212
private String developer;
13-
private Property<Website> website = Property.empty();
13+
private Property<Website> website;
1414

1515
public Project() {
1616
}

0 commit comments

Comments
 (0)