From f2b30625f113d1f03434e2633fb7c947122c9344 Mon Sep 17 00:00:00 2001 From: "913752709@qq.com" <913752709@qq.com> Date: Sun, 27 Mar 2022 22:59:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90=E5=99=A8=E9=81=87=E5=88=B0=E6=97=A0=E7=AC=A6?= =?UTF-8?q?=E5=8F=B7=E7=B1=BB=E5=9E=8B=E6=95=B0=E6=8D=AE=E5=BA=93=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E6=97=B6=E6=97=A0=E6=B3=95=E5=8C=B9=E9=85=8D=E5=88=B0?= =?UTF-8?q?=20javaType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/infra/service/codegen/inner/CodegenBuilder.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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()));