diff --git a/yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenBuilder.java b/yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenBuilder.java index 2a4281e50..fe07df7a7 100644 --- a/yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenBuilder.java +++ b/yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenBuilder.java @@ -160,8 +160,9 @@ public class CodegenBuilder { // 处理 javaField 字段 column.setJavaField(toCamelCase(column.getColumnName())); // 处理 dictType 字段,暂无 - // 处理 javaType 字段 - String dbType = subBefore(column.getColumnType(), '(', false); + // 处理 javaType 字段(兼容无符号类型) + String dbType = replaceIgnoreCase(subBefore(column.getColumnType(), '(', false), + " UNSIGNED", ""); javaTypeMappings.entrySet().stream() .filter(entry -> entry.getValue().contains(dbType)) .findFirst().ifPresent(entry -> column.setJavaType(entry.getKey()));