mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-08 09:38:26 +08:00
TableConfig添加private Boolean mapperGenerateEnable = Boolean.TRUE,
当值为false,在生成代码时自动给@Table注解添加mapperGenerateEnable = false属性。
This commit is contained in:
parent
0293bb4c09
commit
6afc590d16
@ -48,6 +48,8 @@ public class TableConfig {
|
||||
|
||||
private Map<String, ColumnConfig> columnConfigMap;
|
||||
|
||||
private Boolean mapperGenerateEnable = Boolean.TRUE;
|
||||
|
||||
|
||||
public String getTableName() {
|
||||
return tableName;
|
||||
@ -105,6 +107,14 @@ public class TableConfig {
|
||||
this.columnConfigMap = columnConfigMap;
|
||||
}
|
||||
|
||||
public Boolean getMapperGenerateEnable() {
|
||||
return mapperGenerateEnable;
|
||||
}
|
||||
|
||||
public void setMapperGenerateEnable(Boolean mapperGenerateEnable) {
|
||||
this.mapperGenerateEnable = mapperGenerateEnable;
|
||||
}
|
||||
|
||||
public void addColumnConfig(ColumnConfig columnConfig) {
|
||||
if (columnConfigMap == null) {
|
||||
columnConfigMap = new HashMap<>();
|
||||
|
||||
@ -249,6 +249,9 @@ public class Table {
|
||||
if (tableConfig.getSetListenerClass() != null) {
|
||||
tableAnnotation.append(", onSet = " + tableConfig.getUpdateListenerClass().getSimpleName() + ".class");
|
||||
}
|
||||
if (Boolean.FALSE.equals(tableConfig.getMapperGenerateEnable())) {
|
||||
tableAnnotation.append(", mapperGenerateEnable = false");
|
||||
}
|
||||
}
|
||||
return tableAnnotation.append(")").toString();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user