|
@@ -1,7 +1,6 @@
|
|
|
package tofly.revenue.code_gen;
|
|
|
|
|
|
import com.baomidou.mybatisplus.generator.FastAutoGenerator;
|
|
|
-import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
|
|
|
import com.baomidou.mybatisplus.generator.config.OutputFile;
|
|
|
import com.baomidou.mybatisplus.generator.config.rules.DbColumnType;
|
|
|
import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine;
|
|
@@ -27,33 +26,33 @@ public class Main {
|
|
|
})
|
|
|
.dataSourceConfig(builder ->
|
|
|
builder.schema("TFMISDATA").typeConvertHandler((globalConfig, typeRegistry, metaInfo) -> {
|
|
|
- int typeCode = metaInfo.getJdbcType().TYPE_CODE;
|
|
|
- int length = metaInfo.getLength();
|
|
|
- int scale = metaInfo.getScale();
|
|
|
- boolean nullable = metaInfo.isNullable();
|
|
|
- if (typeCode == Types.DECIMAL) {
|
|
|
- if (length == 0) {
|
|
|
- return nullable ? DbColumnType.LONG : DbColumnType.BASE_LONG;
|
|
|
- }
|
|
|
- if (scale > 0) {
|
|
|
- return nullable ? DbColumnType.DOUBLE : DbColumnType.BASE_DOUBLE;
|
|
|
- }
|
|
|
-
|
|
|
- return nullable ? DbColumnType.INTEGER : DbColumnType.BASE_INT;
|
|
|
- }
|
|
|
- if (typeCode == Types.TIMESTAMP) {
|
|
|
-
|
|
|
- return DbColumnType.DATE;
|
|
|
- }
|
|
|
- return typeRegistry.getColumnType(metaInfo);
|
|
|
+ int typeCode = metaInfo.getJdbcType().TYPE_CODE;
|
|
|
+ int length = metaInfo.getLength();
|
|
|
+ int scale = metaInfo.getScale();
|
|
|
+ boolean nullable = metaInfo.isNullable();
|
|
|
+ if (typeCode == Types.DECIMAL) {
|
|
|
+ if (length == 0) {
|
|
|
+ return nullable ? DbColumnType.LONG : DbColumnType.BASE_LONG;
|
|
|
+ }
|
|
|
+ if (scale > 0) {
|
|
|
+ return nullable ? DbColumnType.DOUBLE : DbColumnType.BASE_DOUBLE;
|
|
|
+ }
|
|
|
+
|
|
|
+ return nullable ? DbColumnType.INTEGER : DbColumnType.BASE_INT;
|
|
|
+ }
|
|
|
+ if (typeCode == Types.TIMESTAMP) {
|
|
|
+
|
|
|
+ return DbColumnType.DATE;
|
|
|
+ }
|
|
|
+ return typeRegistry.getColumnType(metaInfo);
|
|
|
|
|
|
- }))
|
|
|
+ }))
|
|
|
.packageConfig(builder -> {
|
|
|
builder.parent("com.tofly.feesapi")
|
|
|
- .moduleName("bmgl")
|
|
|
+ .moduleName("xtgl")
|
|
|
|
|
|
|
|
|
- .pathInfo(Collections.singletonMap(OutputFile.xml, "resources/bmgl"));
|
|
|
+ .pathInfo(Collections.singletonMap(OutputFile.xml, "resources/xtgl"));
|
|
|
})
|
|
|
.strategyConfig(builder -> {
|
|
|
builder.controllerBuilder()
|
|
@@ -71,7 +70,7 @@ public class Main {
|
|
|
builder.serviceBuilder().enableFileOverride();
|
|
|
|
|
|
|
|
|
- builder.addInclude("BM_FFFS");
|
|
|
+ builder.addInclude("SYSCOMMLOG");
|
|
|
|
|
|
})
|
|
|
.templateEngine(new FreemarkerTemplateEngine())
|