From 1772fc5e211f9e9e0ab4cdc6c29b436aac178c2a Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期五, 23 二月 2024 12:19:55 +0800
Subject: [PATCH] 修改

---
 zt/core/src/main/java/com/zt/generator/utils/GenUtils.java |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/zt/core/src/main/java/com/zt/generator/utils/GenUtils.java b/zt/core/src/main/java/com/zt/generator/utils/GenUtils.java
index bdfc5af..73f782c 100644
--- a/zt/core/src/main/java/com/zt/generator/utils/GenUtils.java
+++ b/zt/core/src/main/java/com/zt/generator/utils/GenUtils.java
@@ -140,14 +140,15 @@
         }
         map.put("pk", pkColumn);
         map.put("package", packageName);
-        map.put("className", className);
+        map.put("className", className);  //瀹炰綋绫诲悕瀛�
         // private ${className}Service ${classBean}Service;
-        map.put("classBean", StringUtils.uncapitalize(className));
+        map.put("classBean", StringUtils.uncapitalize(className));  //瀹炰綋瀹炰緥鍚嶅瓧
         // model bean鐨勫悕绉癷nsert(@RequestBody ${className} ${modelName})
-        map.put("modelName", StringUtils.uncapitalize(className));
+        map.put("modelName", StringUtils.uncapitalize(className)); //妯″瀷鍚嶅瓧
         // @RequestMapping("/${moduleName}/${pathName}")
         String moduleName = packageName.substring(packageName.lastIndexOf(".") + 1, packageName.length());
-        map.put("moduleName", moduleName);
+        map.put("moduleName", moduleName); //妯″潡鍚嶅瓧  鍖呭悕锛堢浉瀵硅矾寰勶級
+
         String pathName = StrUtil.toSymbolCase(className, '/');// 椹煎嘲杞笅鍒掔嚎
         if (pathName.indexOf(moduleName) == 0) {
             pathName = pathName.substring(moduleName.length());
@@ -155,6 +156,8 @@
                 pathName = pathName.substring(1);
             }
         }
+
+        map.put("importPath", tableName.replaceAll("_", "-"));// url璇锋眰鐨�
         map.put("pathName", pathName);// url璇锋眰鐨�
         map.put("permName", pathName.replace("/", ":"));// 鏉冮檺鐨�
         map.put("columns", columsList);
@@ -197,10 +200,10 @@
             String fileName = "";
             String filePath = "";
             if (template.contains("index.vue")) {
-                fileName = tableName.substring(tableName.indexOf("_") + 1).replaceAll("_", "-") + ".vue";
+                fileName = className + ".vue";
                 filePath = getFilePath(template, vueFilePath, packageName, moduleName);
             } else if (template.contains("add-or-update.vue")) {
-                fileName = tableName.substring(tableName.indexOf("_") + 1).replaceAll("_", "-") + "-add-or-update.vue";
+                fileName = className + "-AddOrUpdate.vue";
                 filePath = getFilePath(template, vueFilePath, packageName, moduleName);
             } else if (template.contains("Entity.java.vm")) {
                 fileName = className + ".java";

--
Gitblit v1.9.1