优化代码,修复统一配置时去除前缀不生效问题。

This commit is contained in:
makejava 2021-07-15 18:21:40 +08:00
parent 2dff5d4b18
commit 54cf144638
3 changed files with 4 additions and 2 deletions

View File

@ -110,6 +110,7 @@ public class CodeGenerateServiceImpl implements CodeGenerateService {
tableInfo.setSaveModelName(finalSelectedTableInfo.getSaveModelName());
tableInfo.setSavePackageName(finalSelectedTableInfo.getSavePackageName());
tableInfo.setSavePath(finalSelectedTableInfo.getSavePath());
tableInfo.setPreName(finalSelectedTableInfo.getPreName());
});
}

View File

@ -382,6 +382,7 @@ public class TableInfoServiceImpl implements TableInfoService {
new SaveFile(project, dir.getPath(), getConfigFileName(oldTableInfo), content, true, false).write();
}
@Override
public TableInfo getTableInfoByPsiClass(PsiClass psiClass) {
TableInfo tableInfo = new TableInfo();
tableInfo.setPsiClassObj(psiClass);
@ -430,7 +431,7 @@ public class TableInfoServiceImpl implements TableInfoService {
@Override
public List<TableInfo> getTableInfoAndConfigByPsiClass(List<PsiClass> psiClassList) {
if (CollectionUtil.isEmpty(psiClassList)) {
return Collections.EMPTY_LIST;
return Collections.emptyList();
}
List<TableInfo> tableInfoList = new ArrayList<>(psiClassList.size());
psiClassList.forEach(psiClass -> tableInfoList.add(this.getTableInfoAndConfigByPsiClass(psiClass)));

View File

@ -230,7 +230,7 @@ public class SelectSavePath extends JDialog {
}
}
// 保存配置
TableInfo tableInfo = null;
TableInfo tableInfo;
if(!entityMode) {
tableInfo = tableInfoService.getTableInfoAndConfig(cacheDataUtils.getSelectDbTable());
} else {