fix:代码生成
This commit is contained in:
parent
89808b2d76
commit
a2294fc717
@ -21,6 +21,7 @@ package com.aircraft.generate;
|
|||||||
|
|
||||||
import com.aircraft.utils.StringUtils;
|
import com.aircraft.utils.StringUtils;
|
||||||
import com.baomidou.mybatisplus.generator.AutoGenerator;
|
import com.baomidou.mybatisplus.generator.AutoGenerator;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
@ -53,15 +54,21 @@ public class MysqlGenerator extends SuperGenerator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@AllArgsConstructor
|
||||||
|
public static class tableInfo {
|
||||||
|
private String tableName;
|
||||||
|
private String tablePrefix;
|
||||||
|
private String moduleName;
|
||||||
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
MysqlGenerator mysqlGenerator = new MysqlGenerator();
|
MysqlGenerator mysqlGenerator = new MysqlGenerator();
|
||||||
Arrays.asList(
|
Arrays.asList(
|
||||||
//表名,去除前缀,模块名
|
//表名,去除前缀,模块名
|
||||||
new String[]{"fms_ac_aircraft_device", "fms_ac_", "aircraft"},
|
new tableInfo("fms_ac_aircraft_device","fms_ac_","aircraft"),
|
||||||
new String[]{"fms_ac_aircraft_insurance", "fms_ac_", "aircraft"},
|
new tableInfo("fms_ac_aircraft_device","fms_ac_","aircraft")
|
||||||
new String[]{"fms_ac_aircraft_maintenance", "fms_ac_", "aircraft"}
|
).forEach(tableInfo -> {
|
||||||
).forEach(pair -> {
|
mysqlGenerator.generator(tableInfo.tableName, tableInfo.tablePrefix, tableInfo.moduleName);
|
||||||
mysqlGenerator.generator(pair[0], pair[1], pair[2]);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user