beansOfType = context.getBeansOfType(GeneratorMapper.class);
-
- // 根据数据类型选择mapper
- for (String key : beansOfType.keySet()) {
- if (StrUtil.containsIgnoreCase(key, dbConfType)) {
- return beansOfType.get(key);
- }
- }
-
- throw new IllegalArgumentException("dsName 不合法: " + dsName);
- }
-
}
diff --git a/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/GeneratorStyleEnum.java b/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/GeneratorStyleEnum.java
new file mode 100644
index 00000000..e05fc50e
--- /dev/null
+++ b/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/GeneratorStyleEnum.java
@@ -0,0 +1,29 @@
+package com.pig4cloud.pig.codegen.util;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * 代码生成主题
+ *
+ * @author 冷冷
+ */
+@Getter
+@AllArgsConstructor
+public enum GeneratorStyleEnum {
+
+ VFORM_JSON(1L, "element-plus 风格"),
+
+ VFORM_FORM(2L, "uview 风格");
+
+ /**
+ * 对应模板ID
+ */
+ private Long templateId;
+
+ /**
+ * 描述
+ */
+ private String desc;
+
+}
diff --git a/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/GeneratorTypeEnum.java b/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/GeneratorTypeEnum.java
deleted file mode 100644
index e991e883..00000000
--- a/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/GeneratorTypeEnum.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.pig4cloud.pig.codegen.util;
-
-import lombok.Getter;
-import lombok.RequiredArgsConstructor;
-
-@Getter
-@RequiredArgsConstructor
-public enum GeneratorTypeEnum {
-
- /**
- * zip压缩包 0
- */
- ZIP_DOWNLOAD("0"),
- /**
- * 自定义目录 1
- */
- CUSTOM_DIRECTORY("1");
-
- private final String value;
-
-}
diff --git a/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/VFormConfigConsts.java b/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/VFormConfigConsts.java
new file mode 100644
index 00000000..e6c6daee
--- /dev/null
+++ b/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/VFormConfigConsts.java
@@ -0,0 +1,25 @@
+package com.pig4cloud.pig.codegen.util;
+
+/**
+ * vform 的通用变量
+ *
+ * @author lengleng
+ * @date 2023/6/5
+ */
+public interface VFormConfigConsts {
+
+ String widgetList = "widgetList";
+
+ String groupKey = "groupKey";
+
+ String type = "type";
+
+ String options = "options";
+
+ String span = "span";
+
+ String cols = "cols";
+
+ String key = "key";
+
+}
diff --git a/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/VFormTypeEnum.java b/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/VFormTypeEnum.java
new file mode 100644
index 00000000..840fea18
--- /dev/null
+++ b/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/VFormTypeEnum.java
@@ -0,0 +1,22 @@
+package com.pig4cloud.pig.codegen.util;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * vfrom 字段类型
+ *
+ * @author lengleng
+ * @date 2023/6/5
+ */
+@Getter
+@AllArgsConstructor
+public enum VFormTypeEnum {
+
+ GRID("grid"),
+
+ GRID_COL("grid-col");
+
+ private final String type;
+
+}
diff --git a/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/vo/GenCreateTableVO.java b/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/vo/GenCreateTableVO.java
new file mode 100755
index 00000000..fac44fd2
--- /dev/null
+++ b/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/vo/GenCreateTableVO.java
@@ -0,0 +1,95 @@
+package com.pig4cloud.pig.codegen.util.vo;
+/*
+ * Copyright (c) 2018-2025, luolin All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: luolin (766488893@qq.com)
+ */
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+/**
+ * 自动创建表管理
+ *
+ * @author luolin
+ * @date 2022-09-23 21:56:11
+ */
+@Data
+@Schema(description = "自动创建表管理")
+public class GenCreateTableVO {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键ID
+ */
+ @Schema(description = "主键ID")
+ private Long id;
+
+ /**
+ * 表名称
+ */
+ @NotBlank(message = "表名称不能为空")
+ @Schema(description = "表名称")
+ private String tableName;
+
+ /**
+ * 表注释
+ */
+ @NotBlank(message = "表注释不能为空")
+ @Schema(description = "表注释")
+ private String comments;
+
+ /**
+ * 数据源名称
+ */
+ @NotBlank(message = "数据源名称不能为空")
+ @Schema(description = "数据源名称")
+ private String dsName;
+
+ /**
+ * 主键策略
+ */
+ @NotBlank(message = "主键策略不能为空")
+ @Schema(description = "主键策略")
+ private String pkPolicy;
+
+ /**
+ * 创建人
+ */
+ @Schema(description = "创建人")
+ private Long createUser;
+
+ /**
+ * 创建时间
+ */
+ @Schema(description = "创建时间")
+ private LocalDateTime createTime;
+
+ /**
+ * 表字段信息
+ */
+ @Schema(description = "表字段信息")
+ private String columnsInfo;
+
+ /**
+ * 字段信息
+ */
+ @Schema(description = "字段信息")
+ private String columnInfo;
+
+}
diff --git a/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/vo/GenTemplateFileVO.java b/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/vo/GenTemplateFileVO.java
new file mode 100644
index 00000000..5eb4413c
--- /dev/null
+++ b/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/vo/GenTemplateFileVO.java
@@ -0,0 +1,37 @@
+package com.pig4cloud.pig.codegen.util.vo;
+
+import lombok.Data;
+
+/**
+ * @author lengleng
+ * @date 2024/7/13
+ *
+ * CGTM 文件路径
+ *
+ * {
+ * "templateName": "Controller",
+ * "generatorPath": "${backendPath}/src/main/java/${packagePath}/${moduleName}/controller/${ClassName}Controller.java",
+ * "templateDesc": "后台Controller",
+ * "templateFile": "temps/Controller"
+ * },
+ */
+@Data
+public class GenTemplateFileVO {
+ /**
+ * 模板名称
+ */
+ private String templateName;
+ /**
+ * 路径
+ */
+ private String generatorPath;
+ /**
+ * 模板 desc
+ */
+ private String templateDesc;
+ /**
+ * 模板文件
+ */
+ private String templateFile;
+
+}
diff --git a/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/vo/GroupVo.java b/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/vo/GroupVO.java
similarity index 97%
rename from pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/vo/GroupVo.java
rename to pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/vo/GroupVO.java
index 23f6abb5..e46feda9 100644
--- a/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/vo/GroupVo.java
+++ b/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/util/vo/GroupVO.java
@@ -9,7 +9,7 @@ import lombok.Data;
import java.util.List;
@Data
-public class GroupVo {
+public class GroupVO {
/**
* id
diff --git a/pig-visual/pig-codegen/src/main/resources/mapper/GenGroupMapper.xml b/pig-visual/pig-codegen/src/main/resources/mapper/GenGroupMapper.xml
index 83d36147..efc2ef0d 100644
--- a/pig-visual/pig-codegen/src/main/resources/mapper/GenGroupMapper.xml
+++ b/pig-visual/pig-codegen/src/main/resources/mapper/GenGroupMapper.xml
@@ -3,12 +3,12 @@
-
+
+ select="com.pig4cloud.pig.codegen.mapper.GenTemplateMapper.listTemplateById" column="group_id">
diff --git a/pig-visual/pig-codegen/src/main/resources/mapper/GenTableMapper.xml b/pig-visual/pig-codegen/src/main/resources/mapper/GenTableMapper.xml
index e9a64953..633c857f 100644
--- a/pig-visual/pig-codegen/src/main/resources/mapper/GenTableMapper.xml
+++ b/pig-visual/pig-codegen/src/main/resources/mapper/GenTableMapper.xml
@@ -23,7 +23,7 @@
-
+
@@ -38,8 +38,7 @@
-
-
+
diff --git a/pig-visual/pig-codegen/src/main/resources/mapper/GeneratorMySqlMapper.xml b/pig-visual/pig-codegen/src/main/resources/mapper/GeneratorMySqlMapper.xml
deleted file mode 100755
index ca5b9eb9..00000000
--- a/pig-visual/pig-codegen/src/main/resources/mapper/GeneratorMySqlMapper.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
-
-
-
-
- SELECT
- column_name columnName,
- data_type dataType,
- column_comment comments,
- column_key columnKey,
- extra,
- is_nullable AS isNullable,
- column_type AS columnType
- FROM
- information_schema.COLUMNS
- WHERE
- table_name = #{tableName} and table_schema = (select database()) order by ordinal_position
-
-
-
-
-
-
-
diff --git a/pig-visual/pig-codegen/src/main/resources/template/config.json b/pig-visual/pig-codegen/src/main/resources/template/config.json
deleted file mode 100644
index 4f33f5d0..00000000
--- a/pig-visual/pig-codegen/src/main/resources/template/config.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "project": {
- "packageName": "com.pig4cloud.pig",
- "version": "1.0.0",
- "backendPath": "pig",
- "frontendPath": "pig-ui"
- },
- "developer": {
- "author": "pig",
- "email": "pig4cloud@qq.com"
- }
-}