From 23eed50dd6b9a5d4faf143a24c4dc1f11792bb38 Mon Sep 17 00:00:00 2001 From: caiyuchao Date: Mon, 23 Dec 2024 18:36:03 +0800 Subject: [PATCH] fix: update code gen --- .../wfc-gen/src/main/java/org/wfc/gen/util/GenPlusUtils.java | 2 +- .../wfc-gen/src/main/resources/templates/controller.java.vm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wfc-modules/wfc-gen/src/main/java/org/wfc/gen/util/GenPlusUtils.java b/wfc-modules/wfc-gen/src/main/java/org/wfc/gen/util/GenPlusUtils.java index 0895363..1f93fd1 100644 --- a/wfc-modules/wfc-gen/src/main/java/org/wfc/gen/util/GenPlusUtils.java +++ b/wfc-modules/wfc-gen/src/main/java/org/wfc/gen/util/GenPlusUtils.java @@ -39,7 +39,7 @@ public class GenPlusUtils { .dataSourceConfig(builder -> builder.typeConvertHandler((globalConfig, typeRegistry, metaInfo) -> { int typeCode = metaInfo.getJdbcType().TYPE_CODE; - if (typeCode == Types.SMALLINT) { + if (typeCode == Types.SMALLINT || typeCode == Types.TINYINT) { // 自定义类型转换 return DbColumnType.INTEGER; } diff --git a/wfc-modules/wfc-gen/src/main/resources/templates/controller.java.vm b/wfc-modules/wfc-gen/src/main/resources/templates/controller.java.vm index d99da0a..9459beb 100644 --- a/wfc-modules/wfc-gen/src/main/resources/templates/controller.java.vm +++ b/wfc-modules/wfc-gen/src/main/resources/templates/controller.java.vm @@ -48,7 +48,7 @@ public class ${table.controllerName} extends BaseController { #end @Autowired - public ${table.serviceName} ${serviceName}; + private ${table.serviceName} ${serviceName}; @GetMapping("/page") public TableDataInfo page(${entity} $entityName) {