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.baomidou.mybatisplus.generator.AutoGenerator;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
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) {
|
||||
MysqlGenerator mysqlGenerator = new MysqlGenerator();
|
||||
Arrays.asList(
|
||||
//表名,去除前缀,模块名
|
||||
new String[]{"fms_ac_aircraft_device", "fms_ac_", "aircraft"},
|
||||
new String[]{"fms_ac_aircraft_insurance", "fms_ac_", "aircraft"},
|
||||
new String[]{"fms_ac_aircraft_maintenance", "fms_ac_", "aircraft"}
|
||||
).forEach(pair -> {
|
||||
mysqlGenerator.generator(pair[0], pair[1], pair[2]);
|
||||
new tableInfo("fms_ac_aircraft_device","fms_ac_","aircraft"),
|
||||
new tableInfo("fms_ac_aircraft_device","fms_ac_","aircraft")
|
||||
).forEach(tableInfo -> {
|
||||
mysqlGenerator.generator(tableInfo.tableName, tableInfo.tablePrefix, tableInfo.moduleName);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user