|
|
@ -434,12 +434,12 @@ public class GenBasicServiceImpl extends ServiceImpl<GenBasicMapper, GenBasic> i
|
|
|
|
GEN_SQL_FILE_LIST.forEach(fileJsonObject -> {
|
|
|
|
GEN_SQL_FILE_LIST.forEach(fileJsonObject -> {
|
|
|
|
String fileTemplateName = fileJsonObject.getStr("name");
|
|
|
|
String fileTemplateName = fileJsonObject.getStr("name");
|
|
|
|
GenBasicPreviewResult.GenBasicCodeResult genBasicCodeSqlResult = new GenBasicPreviewResult.GenBasicCodeResult();
|
|
|
|
GenBasicPreviewResult.GenBasicCodeResult genBasicCodeSqlResult = new GenBasicPreviewResult.GenBasicCodeResult();
|
|
|
|
Template templateFront = groupTemplateSql.getTemplate(fileTemplateName);
|
|
|
|
Template templateSql = groupTemplateSql.getTemplate(fileTemplateName);
|
|
|
|
templateFront.binding(bindingJsonObject);
|
|
|
|
templateSql.binding(bindingJsonObject);
|
|
|
|
String resultName = StrUtil.removeSuffix(fileTemplateName, ".btl");
|
|
|
|
String resultName = StrUtil.removeSuffix(fileTemplateName, ".btl");
|
|
|
|
genBasicCodeSqlResult.setCodeFileName(resultName);
|
|
|
|
genBasicCodeSqlResult.setCodeFileName(resultName);
|
|
|
|
genBasicCodeSqlResult.setCodeFileWithPathName(genSqlBasicPath + File.separator + resultName);
|
|
|
|
genBasicCodeSqlResult.setCodeFileWithPathName(genSqlBasicPath + File.separator + resultName);
|
|
|
|
genBasicCodeSqlResult.setCodeFileContent(templateFront.render());
|
|
|
|
genBasicCodeSqlResult.setCodeFileContent(templateSql.render());
|
|
|
|
genBasicCodeSqlResultList.add(genBasicCodeSqlResult);
|
|
|
|
genBasicCodeSqlResultList.add(genBasicCodeSqlResult);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
genBasicPreviewResult.setGenBasicCodeSqlResultList(genBasicCodeSqlResultList);
|
|
|
|
genBasicPreviewResult.setGenBasicCodeSqlResultList(genBasicCodeSqlResultList);
|
|
|
|