代码生成
This commit is contained in:
parent
d03c911ebc
commit
2b252d0b16
|
|
@ -117,17 +117,17 @@ public class VelocityUtil {
|
||||||
public static List<String> getTemplateList(String genTpl, List<GenTableColumn> columns) {
|
public static List<String> getTemplateList(String genTpl, List<GenTableColumn> columns) {
|
||||||
List<String> templates = new LinkedList<>();
|
List<String> templates = new LinkedList<>();
|
||||||
templates.add("java/controller.java.vm");
|
templates.add("java/controller.java.vm");
|
||||||
// templates.add("java/entity.java.vm");
|
templates.add("java/entity.java.vm");
|
||||||
// templates.add("java/mapper.java.vm");
|
templates.add("java/mapper.java.vm");
|
||||||
// templates.add("java/service.java.vm");
|
templates.add("java/service.java.vm");
|
||||||
// templates.add("java/serviceImpl.java.vm");
|
templates.add("java/serviceImpl.java.vm");
|
||||||
// templates.add("java/validate.java.vm");
|
templates.add("java/validate.java.vm");
|
||||||
// if (VelocityUtil.getIsEqually(columns)) {
|
if (VelocityUtil.getIsEqually(columns)) {
|
||||||
// templates.add("java/vo.java.vm");
|
templates.add("java/vo.java.vm");
|
||||||
// } else {
|
} else {
|
||||||
// templates.add("java/voList.java.vm");
|
templates.add("java/voList.java.vm");
|
||||||
// templates.add("java/voDetail.java.vm");
|
templates.add("java/voDetail.java.vm");
|
||||||
// }
|
}
|
||||||
// if (GenConstants.TPL_CRUD.equals(genTpl)) {
|
// if (GenConstants.TPL_CRUD.equals(genTpl)) {
|
||||||
// templates.add("vue/index.vue.vm");
|
// templates.add("vue/index.vue.vm");
|
||||||
// }
|
// }
|
||||||
|
|
@ -173,6 +173,14 @@ public class VelocityUtil {
|
||||||
fileName = StringUtil.format("{}/vo/{}/{}Vo.java", GenConfig.adminPackage, moduleName, entityName);
|
fileName = StringUtil.format("{}/vo/{}/{}Vo.java", GenConfig.adminPackage, moduleName, entityName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (template.contains("voList.java.vm")) {
|
||||||
|
fileName = StringUtil.format("{}/vo/{}/{}ListVo.java", GenConfig.adminPackage, moduleName, entityName);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (template.contains("voDetail.java.vm")) {
|
||||||
|
fileName = StringUtil.format("{}/vo/{}/{}DetailVo.java", GenConfig.adminPackage, moduleName, entityName);
|
||||||
|
}
|
||||||
|
|
||||||
return fileName;
|
return fileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue