Skip to content

Commit

Permalink
修复kotlin复合索引字段可传递null.
Browse files Browse the repository at this point in the history
  • Loading branch information
nieqiurong committed Feb 10, 2025
1 parent 77ccb93 commit c4091c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ public List<MapperMethod> getMethodList(TableInfo tableInfo) {
baseWrapperBuilder.append(tableField.getPropertyName()).append(",").append(" ").append(tableField.getPropertyName()).append(")");
argsBuilder.append(tableField.getPropertyName()).append(":").append(" ")
.append(KotlinTypeUtils.getStringType(tableField.getColumnType()));
if (i > 0) {
argsBuilder.append("?");
}
} else {
if ("boolean".equals(tableField.getPropertyType())) {
baseWrapperBuilder.append("is").append(tableField.getCapitalName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ public List<MapperMethod> getMethodList(TableInfo tableInfo) {
if (globalConfig.isKotlin()) {
argsBuilder.append(tableField.getPropertyName()).append(":").append(" ")
.append(KotlinTypeUtils.getStringType(tableField.getColumnType()));
if (i > 0) {
argsBuilder.append("?");
}
} else {
argsBuilder.append(tableField.getColumnType().getType()).append(" ").append(tableField.getPropertyName());
}
Expand Down

0 comments on commit c4091c9

Please sign in to comment.