feat: 测试代码生成

This commit is contained in:
xlsea
2024-09-09 15:40:38 +08:00
parent 74529144aa
commit 07e30bd591
26 changed files with 673 additions and 143 deletions

View File

@ -71,10 +71,10 @@ public class VelocityUtils {
velocityContext.put("pkColumn", genTable.getPkColumn());
velocityContext.put("importList", getImportList(genTable));
velocityContext.put("permissionPrefix", getPermissionPrefix(moduleName, businessName));
velocityContext.put("columns", getColumns(genTable));
velocityContext.put("table", genTable);
velocityContext.put("dicts", getDicts(genTable));
velocityContext.put("dictList", getDictList(genTable));
velocityContext.put("columns", getColumns(genTable));
velocityContext.put("table", genTable);
setMenuVelocityContext(velocityContext, genTable);
if (GenConstants.TPL_TREE.equals(tplCategory)) {
setTreeVelocityContext(velocityContext, genTable);
@ -178,7 +178,7 @@ public class VelocityUtils {
if (template.contains("soy.index.vue.vm")) {
fileName = StringUtils.format("soybean/views/{}/{}/index.vue", moduleName, businessName);
} else if (template.contains("soy.api.d.ts.vm")) {
fileName = StringUtils.format("soybean/typings/api/{}.d.ts", moduleName);
fileName = StringUtils.format("soybean/typings/api/{}.api.d.ts", moduleName);
} else if (template.contains("soy.api.ts.vm")) {
fileName = StringUtils.format("soybean/api/{}/{}.ts", moduleName, businessName);
} else if (template.contains("soy.search.vue.vm")) {