修复表前缀去除BUG

This commit is contained in:
makejava 2020-07-28 09:33:17 +08:00
parent 2f845a5558
commit 95517aff34
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ public class CodeGenerateServiceImpl implements CodeGenerateService {
for (TableInfo tableInfo : tableInfoList) {
// 表名去除前缀
if (!StringUtils.isEmpty(tableInfo.getPreName()) && tableInfo.getObj().getName().startsWith(tableInfo.getPreName())) {
String newName = tableInfo.getObj().getName().replace(tableInfo.getPreName(), "");
String newName = tableInfo.getObj().getName().substring(tableInfo.getPreName().length());
tableInfo.setName(NameUtils.getInstance().getClassName(newName));
}
// 构建参数