From b0ff5a01a132d7badf935f60b6aa14fa00dce5b0 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Thu, 12 Mar 2026 14:13:11 +0800
Subject: [PATCH] TypeScript前端代码生成模板同步到最新
---
ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/service/GenTableServiceImpl.java | 27 ++++++++++++++-------------
1 files changed, 14 insertions(+), 13 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 e24da1b..f6be881 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
@@ -129,9 +129,9 @@
int row = genTableMapper.updateGenTable(genTable);
if (row > 0)
{
- for (GenTableColumn cenTableColumn : genTable.getColumns())
+ for (GenTableColumn genTableColumn : genTable.getColumns())
{
- genTableColumnMapper.updateGenTableColumn(cenTableColumn);
+ genTableColumnMapper.updateGenTableColumn(genTableColumn);
}
}
}
@@ -157,7 +157,7 @@
*/
@Override
@Transactional(rollbackFor = Exception.class)
- public void importGenTable(List<GenTable> tableList)
+ public void importGenTable(List<GenTable> tableList, String tplWebType)
{
String operName = SecurityUtils.getUsername();
try
@@ -165,6 +165,7 @@
for (GenTable table : tableList)
{
String tableName = table.getTableName();
+ table.setTplWebType(tplWebType);
GenUtils.initTable(table, operName);
int row = genTableMapper.insertGenTable(table);
if (row > 0)
@@ -414,16 +415,16 @@
{
throw new ServiceException("树名称字段不能为空");
}
- else if (GenConstants.TPL_SUB.equals(genTable.getTplCategory()))
+ }
+ else if (GenConstants.TPL_SUB.equals(genTable.getTplCategory()))
+ {
+ if (StringUtils.isEmpty(genTable.getSubTableName()))
{
- if (StringUtils.isEmpty(genTable.getSubTableName()))
- {
- throw new ServiceException("关联子表的表名不能为空");
- }
- else if (StringUtils.isEmpty(genTable.getSubTableFkName()))
- {
- throw new ServiceException("子表关联的外键名不能为空");
- }
+ throw new ServiceException("关联子表的表名不能为空");
+ }
+ else if (StringUtils.isEmpty(genTable.getSubTableFkName()))
+ {
+ throw new ServiceException("子表关联的外键名不能为空");
}
}
}
@@ -491,7 +492,7 @@
String treeCode = paramsObj.getString(GenConstants.TREE_CODE);
String treeParentCode = paramsObj.getString(GenConstants.TREE_PARENT_CODE);
String treeName = paramsObj.getString(GenConstants.TREE_NAME);
- String parentMenuId = paramsObj.getString(GenConstants.PARENT_MENU_ID);
+ Long parentMenuId = paramsObj.getLongValue(GenConstants.PARENT_MENU_ID);
String parentMenuName = paramsObj.getString(GenConstants.PARENT_MENU_NAME);
genTable.setTreeCode(treeCode);
--
Gitblit v1.9.3