调整生成mapper的文件名

This commit is contained in:
wenc000 2020-03-14 22:41:24 +08:00
parent 710471c4cb
commit 08fe7a22fb

View File

@ -401,7 +401,7 @@ public class DynamicConfigTableServiceImpl extends AbstractService implements ID
String codePath = String.format("%s/mapper/%s", baseCodeFolder, params.get("lowerTableName").toString()); String codePath = String.format("%s/mapper/%s", baseCodeFolder, params.get("lowerTableName").toString());
FolderUtil.createFolder(codePath); FolderUtil.createFolder(codePath);
Template template = freeMarkerConfigurer.getConfiguration().getTemplate(String.format("%s/mapper/mapper.ftl", templatePath)); Template template = freeMarkerConfigurer.getConfiguration().getTemplate(String.format("%s/mapper/mapper.ftl", templatePath));
Writer writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(String.format("%s/mapper-%s.xml", codePath, params.get("lowerTableName").toString())), ISystemConstant.CHARSET_UTF8)); Writer writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(String.format("%s/%s-mapper.xml", codePath, params.get("lowerTableName").toString())), ISystemConstant.CHARSET_UTF8));
generatorCode(params, writer, template); generatorCode(params, writer, template);
} }