优化代码生成逻辑

This commit is contained in:
smallchill 2019-01-25 17:26:53 +08:00
parent 5da0335b61
commit 7a36e59bca

View File

@ -193,6 +193,7 @@ public class BladeGenerator {
return getOutputDir() + "/" + packageName.replace(".", "/") + "/" + "wrapper" + "/" + tableInfo.getEntityName() + "Wrapper" + StringPool.DOT_JAVA; return getOutputDir() + "/" + packageName.replace(".", "/") + "/" + "wrapper" + "/" + tableInfo.getEntityName() + "Wrapper" + StringPool.DOT_JAVA;
} }
}); });
if (Func.isNotBlank(packageWebDir)) {
focList.add(new FileOutConfig("/templates/sword/action.js.vm") { focList.add(new FileOutConfig("/templates/sword/action.js.vm") {
@Override @Override
public String outputFile(TableInfo tableInfo) { public String outputFile(TableInfo tableInfo) {
@ -235,6 +236,7 @@ public class BladeGenerator {
return getOutputWebDir() + "/pages" + "/" + StringUtil.upperFirst(servicePackage) + "/" + tableInfo.getEntityName() + "/" + tableInfo.getEntityName() + "View.js"; return getOutputWebDir() + "/pages" + "/" + StringUtil.upperFirst(servicePackage) + "/" + tableInfo.getEntityName() + "/" + tableInfo.getEntityName() + "View.js";
} }
}); });
}
cfg.setFileOutConfigList(focList); cfg.setFileOutConfigList(focList);
return cfg; return cfg;
} }