From 790736c98d8a7d6d1194d1e642946bc8219edcfb Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Sun, 12 Apr 2026 10:40:37 +0800
Subject: [PATCH] 新增代码生成详情页功能
---
ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/service/GenTableServiceImpl.java | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/service/GenTableServiceImpl.java b/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/service/GenTableServiceImpl.java
index 30af466..4498e13 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/service/GenTableServiceImpl.java
+++ b/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/service/GenTableServiceImpl.java
@@ -209,7 +209,7 @@
VelocityContext context = VelocityUtils.prepareContext(table);
// 获取模板列表
- List<String> templates = VelocityUtils.getTemplateList(table.getTplCategory(), table.getTplWebType());
+ List<String> templates = VelocityUtils.getTemplateList(table);
for (String template : templates)
{
// 渲染模板
@@ -253,10 +253,10 @@
VelocityContext context = VelocityUtils.prepareContext(table);
// 获取模板列表
- List<String> templates = VelocityUtils.getTemplateList(table.getTplCategory(), table.getTplWebType());
+ List<String> templates = VelocityUtils.getTemplateList(table);
for (String template : templates)
{
- if (!StringUtils.containsAny(template, "sql.vm", "api.js.vm", "index.vue.vm", "index-tree.vue.vm"))
+ if (!StringUtils.containsAny(template, "sql.vm", "api.js.vm", "api.ts.vm", "type.ts.vm", "index.ts.vm", "index.vue.vm", "index-tree.vue.vm", "view.vue.vm"))
{
// 渲染模板
StringWriter sw = new StringWriter();
@@ -371,7 +371,7 @@
VelocityContext context = VelocityUtils.prepareContext(table);
// 获取模板列表
- List<String> templates = VelocityUtils.getTemplateList(table.getTplCategory(), table.getTplWebType());
+ List<String> templates = VelocityUtils.getTemplateList(table);
for (String template : templates)
{
// 渲染模板
@@ -524,12 +524,14 @@
String treeName = paramsObj.getString(GenConstants.TREE_NAME);
Long parentMenuId = paramsObj.getLongValue(GenConstants.PARENT_MENU_ID);
String parentMenuName = paramsObj.getString(GenConstants.PARENT_MENU_NAME);
+ boolean isView = paramsObj.getBooleanValue(GenConstants.GEN_VIEW);
genTable.setTreeCode(treeCode);
genTable.setTreeParentCode(treeParentCode);
genTable.setTreeName(treeName);
genTable.setParentMenuId(parentMenuId);
genTable.setParentMenuName(parentMenuName);
+ genTable.setView(isView);
}
}
--
Gitblit v1.9.3