mirror of https://gitee.com/makejava/EasyCode.git
利用删除表配置代替重置表配置,解决表配置不正确等问题。
This commit is contained in:
parent
8f93ef44a3
commit
8c6b4438e4
|
@ -119,7 +119,7 @@ public class MainActionGroup extends ActionGroup {
|
||||||
if (dbTable == null) {
|
if (dbTable == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
TableInfoSettingsService.getInstance().resetTableInfo(dbTable);
|
TableInfoSettingsService.getInstance().removeTableInfo(dbTable);
|
||||||
Messages.showInfoMessage(dbTable.getName() + "表配置信息已重置成功", GlobalDict.TITLE_INFO);
|
Messages.showInfoMessage(dbTable.getName() + "表配置信息已重置成功", GlobalDict.TITLE_INFO);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -124,4 +124,14 @@ public class TableInfoSettingsDTO {
|
||||||
String key = generateKey(dbTable);
|
String key = generateKey(dbTable);
|
||||||
this.tableInfoMap.put(key, new TableInfoDTO(null, dbTable));
|
this.tableInfoMap.put(key, new TableInfoDTO(null, dbTable));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除表信息
|
||||||
|
*
|
||||||
|
* @param dbTable 数据库表
|
||||||
|
*/
|
||||||
|
public void removeTableInfo(DbTable dbTable) {
|
||||||
|
String key = generateKey(dbTable);
|
||||||
|
this.tableInfoMap.remove(key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,4 +53,11 @@ public interface TableInfoSettingsService extends PersistentStateComponent<Table
|
||||||
* @param dbTable 数据库表
|
* @param dbTable 数据库表
|
||||||
*/
|
*/
|
||||||
void resetTableInfo(DbTable dbTable);
|
void resetTableInfo(DbTable dbTable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除表信息
|
||||||
|
*
|
||||||
|
* @param dbTable 数据库表
|
||||||
|
*/
|
||||||
|
void removeTableInfo(DbTable dbTable);
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,4 +74,14 @@ public class TableInfoSettingsServiceImpl implements TableInfoSettingsService {
|
||||||
public void resetTableInfo(DbTable dbTable) {
|
public void resetTableInfo(DbTable dbTable) {
|
||||||
Objects.requireNonNull(getState()).resetTableInfo(dbTable);
|
Objects.requireNonNull(getState()).resetTableInfo(dbTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除表信息
|
||||||
|
*
|
||||||
|
* @param dbTable 数据库表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void removeTableInfo(DbTable dbTable) {
|
||||||
|
Objects.requireNonNull(getState()).removeTableInfo(dbTable);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue