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) {