|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 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的名称insert(@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()); | 
|---|
|  |  |  | 
|---|
|  |  |  | pathName = pathName.substring(1); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | map.put("importPath", tableName.replaceAll("_", "-"));// url请求的 | 
|---|
|  |  |  | map.put("pathName", pathName);// url请求的 | 
|---|
|  |  |  | map.put("permName", pathName.replace("/", ":"));// 权限的 | 
|---|
|  |  |  | map.put("columns", columsList); | 
|---|
|  |  |  | 
|---|
|  |  |  | 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"; | 
|---|