mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-23 07:41:53 +08:00
fix: 修复代码生成器遇到无符号类型数据库类型时无法匹配到 javaType
This commit is contained in:
parent
e3ddb29c18
commit
f2b30625f1
@ -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()));
|
||||
|
Loading…
Reference in New Issue
Block a user