diff --git a/ebts/ebts-generator/pom.xml b/ebts/ebts-generator/pom.xml
deleted file mode 100644
index dd3560c..0000000
--- a/ebts/ebts-generator/pom.xml
+++ /dev/null
@@ -1,243 +0,0 @@
-
-
-
- ebts
- com.ebts
- 1.0.0
-
- 4.0.0
-
- ebts-generator
-
-
- generator代码生成
-
-
-
-
-
- org.apache.velocity
- velocity
-
-
-
- commons-net
- commons-net
- 3.7
-
-
-
-
- org.springframework
- spring-context-support
-
-
-
-
- org.springframework
- spring-web
-
-
-
-
- org.springframework.boot
- spring-boot-starter-security
-
-
-
-
- com.github.pagehelper
- pagehelper-spring-boot-starter
-
-
-
-
- javax.validation
- validation-api
-
-
-
-
- org.apache.commons
- commons-lang3
-
-
-
-
- com.fasterxml.jackson.core
- jackson-databind
-
-
-
-
- com.alibaba
- fastjson
-
-
-
-
- commons-io
- commons-io
-
-
-
-
- commons-fileupload
- commons-fileupload
-
-
-
-
- org.apache.poi
- poi-ooxml
-
-
-
-
- org.yaml
- snakeyaml
-
-
-
-
- io.jsonwebtoken
- jjwt
-
-
-
-
- org.springframework.boot
- spring-boot-starter-data-redis
-
-
-
-
- org.apache.commons
- commons-pool2
-
-
-
-
- eu.bitwalker
- UserAgentUtils
-
-
-
-
- javax.servlet
- javax.servlet-api
-
-
-
- io.springfox
- springfox-swagger2
-
-
-
-
- io.swagger
- swagger-annotations
- 1.5.21
-
-
-
- io.swagger
- swagger-models
- 1.5.21
-
-
-
-
- io.springfox
- springfox-swagger-ui
-
-
-
- com.ebts
- ebts-common
-
-
- com.github.wvengen
- proguard-maven-plugin
- 2.0.14
-
-
-
-
-
-
-
- com.github.wvengen
- proguard-maven-plugin
- 2.0.14
-
-
- package
-
- proguard
-
-
-
-
-
- true
- pg
-
-
- log4j-api
- org.apache.logging.log4j
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- D:/Java/jdk1.8/lib/rt.jar
- D:/Java/jdk1.8/lib/jce.jar
-
-
-
- ebts-generator-1.0.0.jar
- ebts-generator.jar
-
-
-
-
-
\ No newline at end of file
diff --git a/ebts/ebts-generator/src/main/java/com/ebts/generator/config/Config.java b/ebts/ebts-generator/src/main/java/com/ebts/generator/config/Config.java
deleted file mode 100644
index 7d28c77..0000000
--- a/ebts/ebts-generator/src/main/java/com/ebts/generator/config/Config.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.ebts.generator.config;
-
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.stereotype.Component;
-
-/**
- * @Author 18209
- * @Date 2021/2/23 15:48
- * @Version 1.0
- */
-
-@Component
-@ConfigurationProperties(prefix = "ebts")
-public class Config {
-
-
-
- /**
- * 上传路径
- */
- private static String profile;
-
-
- public static String getProfile() {
- return profile;
- }
-
- /**
- * 获取下载路径
- */
- public static String getDownloadPath() {
- return getProfile() + "/download/";
- }
-}
diff --git a/ebts/ebts-generator/src/main/java/com/ebts/generator/config/GenConfig.java b/ebts/ebts-generator/src/main/java/com/ebts/generator/config/GenConfig.java
deleted file mode 100644
index eb8dc3c..0000000
--- a/ebts/ebts-generator/src/main/java/com/ebts/generator/config/GenConfig.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package com.ebts.generator.config;
-
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.context.annotation.PropertySource;
-import org.springframework.stereotype.Component;
-
-/**
- * 读取代码生成相关配置
- *
- * @author binlin
- */
-@Component
-@ConfigurationProperties(prefix = "gen")
-@PropertySource(value = {"classpath:generator.yml"})
-public class GenConfig {
- /**
- * 作者
- */
- public static String author;
-
- /**
- * 生成包路径
- */
- public static String packageName;
-
- /**
- * 自动去除表前缀,默认是false
- */
- public static boolean autoRemovePre;
-
- /**
- * 表前缀(类名不会包含表前缀)
- */
- public static String tablePrefix;
-
- public static String getAuthor() {
- return author;
- }
-
- @Value("${author}")
- public void setAuthor(String author) {
- GenConfig.author = author;
- }
-
- public static String getPackageName() {
- return packageName;
- }
-
- @Value("${packageName}")
- public void setPackageName(String packageName) {
- GenConfig.packageName = packageName;
- }
-
- public static boolean getAutoRemovePre() {
- return autoRemovePre;
- }
-
- @Value("${autoRemovePre}")
- public void setAutoRemovePre(boolean autoRemovePre) {
- GenConfig.autoRemovePre = autoRemovePre;
- }
-
- public static String getTablePrefix() {
- return tablePrefix;
- }
-
- @Value("${tablePrefix}")
- public void setTablePrefix(String tablePrefix) {
- GenConfig.tablePrefix = tablePrefix;
- }
-}
diff --git a/ebts/ebts-generator/src/main/java/com/ebts/generator/controller/ApiClassController.java b/ebts/ebts-generator/src/main/java/com/ebts/generator/controller/ApiClassController.java
deleted file mode 100644
index ce5d4b7..0000000
--- a/ebts/ebts-generator/src/main/java/com/ebts/generator/controller/ApiClassController.java
+++ /dev/null
@@ -1,168 +0,0 @@
-package com.ebts.generator.controller;
-
-import java.io.Serializable;
-import java.util.List;
-
-import com.ebts.common.annotation.Log;
-import com.ebts.common.core.controller.BaseController;
-import com.ebts.common.core.entity.AjaxResult;
-import com.ebts.common.enums.BusinessType;
-import com.ebts.common.utils.ServerResult;
-import com.ebts.common.utils.poi.ExcelUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ebts.generator.entity.ApiClass;
-import com.ebts.generator.service.ApiClassService;
-
-/**
- * 接口类名Controller
- *
- * @author binlin
- * @date 2021-01-24
- */
-@RestController
-@RequestMapping("/tool/apiclass")
-public class ApiClassController extends BaseController {
- protected final Logger logger = LoggerFactory.getLogger(ApiClassController.class);
-
- @Autowired
- private ApiClassService apiClassService;
-
-
- /**
- * 获取到api类的select选项
- *
- * @return
- */
- @PreAuthorize("@ebts.hasAnyPermi('tool:apiclass:querylist')")
- @GetMapping("querylist")
- public AjaxResult queryList() {
- ServerResult> ServerResult = apiClassService.selectApiclassList(new ApiClass());
- if (ServerResult.isStart()) {
- return AjaxResult.success(ServerResult.getData());
- } else {
- return AjaxResult.error(ServerResult.getMsg());
- }
- }
-
- /**
- * 查询接口类名列表
- */
- @PreAuthorize("@ebts.hasPermi('tool:apiclass:list')")
- @GetMapping("/list")
- public Serializable list(ApiClass apiclass) {
- startPage();
- ServerResult> ServerResult = apiClassService.selectApiclassList(apiclass);
- if (ServerResult.isStart()) {
- return getDataTable(ServerResult.getData());
- } else {
- return AjaxResult.info(ServerResult.getMsg());
- }
- }
-
- /**
- * 导出接口类名列表
- */
- @PreAuthorize("@ebts.hasPermi('tool:apiclass:export')")
- @Log(title = "接口类名", businessType = BusinessType.EXPORT)
- @GetMapping("/export")
- public AjaxResult export(ApiClass apiclass) {
- ServerResult> ServerResult = apiClassService.selectApiclassList(apiclass);
- ExcelUtil util = new ExcelUtil<>(ApiClass.class);
- if (ServerResult.isStart()) {
- return util.exportExcel(ServerResult.getData(), "apiclass");
- } else {
- return AjaxResult.error(ServerResult.getMsg());
- }
- }
-
- /**
- * 获取接口类名详细信息
- */
- @PreAuthorize("@ebts.hasPermi('tool:apiclass:query')")
- @GetMapping(value = "/{id}")
- public AjaxResult getInfo(@PathVariable("id") Long id) {
- ServerResult ServerResult = apiClassService.selectApiclassById(id);
- if (ServerResult.isStart()) {
- return AjaxResult.success(ServerResult.getData());
- } else {
- return AjaxResult.info(ServerResult.getMsg());
- }
- }
-
- /**
- * 新增接口类名
- */
- @PreAuthorize("@ebts.hasPermi('tool:apiclass:add')")
- @Log(title = "接口类名", businessType = BusinessType.INSERT)
- @PostMapping
- public AjaxResult add(@RequestBody ApiClass apiclass) {
- if (apiclass.getmId() == null || apiclass.getmId() < 0) {
- return AjaxResult.error("模块id不能为空!");
- }
- if (apiclass.getcName() == null || apiclass.getcName().equals("")) {
- return AjaxResult.error("类名不能为空!");
- }
- if (apiclass.getcDescribe() == null || apiclass.getcDescribe().equals("")) {
- return AjaxResult.error("类描述不能为空!");
- }
- ServerResult ServerResult = apiClassService.insertApiclass(apiclass);
- if (ServerResult.isStart()) {
- return AjaxResult.success();
- } else {
- return AjaxResult.error(ServerResult.getMsg());
- }
- }
-
- /**
- * 修改接口类名
- */
- @PreAuthorize("@ebts.hasPermi('tool:apiclass:edit')")
- @Log(title = "接口类名", businessType = BusinessType.UPDATE)
- @PutMapping
- public AjaxResult edit(@RequestBody ApiClass apiclass) {
- if (apiclass.getmId() == null || apiclass.getmId() < 0) {
- return AjaxResult.error("模块id不能为空!");
- }
- if (apiclass.getcName() == null || apiclass.getcName().equals("")) {
- return AjaxResult.error("类名不能为空!");
- }
- if (apiclass.getcDescribe() == null || apiclass.getcDescribe().equals("")) {
- return AjaxResult.error("类描述不能为空!");
- }
- ServerResult ServerResult = apiClassService.updateApiclass(apiclass);
- if (ServerResult.isStart()) {
- return AjaxResult.success();
- } else {
- return AjaxResult.error(ServerResult.getMsg());
- }
- }
-
- /**
- * 删除接口类名
- */
- @PreAuthorize("@ebts.hasPermi('tool:apiclass:remove')")
- @Log(title = "接口类名", businessType = BusinessType.DELETE)
- @DeleteMapping("/{ids}")
- public AjaxResult remove(@PathVariable Long[] ids) {
- if (ids.length < 0) {
- return AjaxResult.error("id不能为空!");
- }
- ServerResult ServerResult = apiClassService.deleteApiclassByIds(ids);
- if (ServerResult.isStart()) {
- return AjaxResult.success();
- } else {
- return AjaxResult.error(ServerResult.getMsg());
- }
- }
-}
diff --git a/ebts/ebts-generator/src/main/java/com/ebts/generator/controller/GenController.java b/ebts/ebts-generator/src/main/java/com/ebts/generator/controller/GenController.java
deleted file mode 100644
index d9960df..0000000
--- a/ebts/ebts-generator/src/main/java/com/ebts/generator/controller/GenController.java
+++ /dev/null
@@ -1,226 +0,0 @@
-package com.ebts.generator.controller;
-
-import java.io.*;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.servlet.http.HttpServletResponse;
-
-import com.ebts.common.annotation.Log;
-import com.ebts.common.constant.ReturnConstants;
-import com.ebts.common.core.controller.BaseController;
-import com.ebts.common.core.entity.AjaxResult;
-import com.ebts.common.core.page.TableDataInfo;
-import com.ebts.common.core.text.Convert;
-import com.ebts.common.enums.BusinessType;
-import com.ebts.common.utils.ServerResult;
-import org.apache.commons.io.IOUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ebts.generator.entity.GenTable;
-import com.ebts.generator.entity.GenTableColumn;
-import com.ebts.generator.service.GenTableColumnService;
-import com.ebts.generator.service.GenTableService;
-
-/**
- * 代码生成 操作处理
- *
- * @author binlin
- */
-@RestController
-@RequestMapping("/tool/gen")
-public class GenController extends BaseController {
- private Logger logger = LoggerFactory.getLogger(GenController.class);
-
- @Autowired
- private GenTableService genTableService;
-
- @Autowired
- private GenTableColumnService genTableColumnService;
-
- /**
- * 查询代码生成列表
- */
- @PreAuthorize("@ebts.hasPermi('tool:gen:list')")
- @GetMapping("/list")
- public Serializable genList(GenTable genTable) {
- startPage();
- List list = genTableService.selectGenTableList(genTable);
- return getDataTable(list);
- }
-
- /**
- * 修改代码生成业务
- */
- @PreAuthorize("@ebts.hasPermi('tool:gen:query')")
- @GetMapping(value = "/{talbleId}")
- public AjaxResult getInfo(@PathVariable Long talbleId) {
- GenTable table = genTableService.selectGenTableById(talbleId);
- List tables = genTableService.selectGenTableAll();
- List list = genTableColumnService.selectGenTableColumnListByTableId(talbleId);
- Map map = new HashMap();
- map.put("info", table);
- map.put("rows", list);
- map.put("tables", tables);
- return AjaxResult.success(map);
- }
-
- /**
- * 查询数据库列表
- */
- @PreAuthorize("@ebts.hasPermi('tool:gen:list')")
- @GetMapping("/db/list")
- public Serializable dataList(GenTable genTable) {
- startPage();
- List list = genTableService.selectDbTableList(genTable);
- return getDataTable(list);
- }
-
- /**
- * 查询数据表字段列表
- */
- @PreAuthorize("@ebts.hasPermi('tool:gen:list')")
- @GetMapping(value = "/column/{talbleId}")
- public Serializable columnList(Long tableId) {
- TableDataInfo dataInfo = new TableDataInfo();
- List list = genTableColumnService.selectGenTableColumnListByTableId(tableId);
- dataInfo.setRows(list);
- dataInfo.setTotal(list.size());
- return dataInfo;
- }
-
- /**
- * 导入表结构(保存)
- */
- @PreAuthorize("@ebts.hasPermi('tool:gen:list')")
- @Log(title = "代码生成", businessType = BusinessType.IMPORT)
- @PostMapping("/importTable")
- public AjaxResult importTableSave(String tables) {
- String[] tableNames = Convert.toStrArray(tables);
- // 查询表信息
- List tableList = genTableService.selectDbTableListByNames(tableNames);
- genTableService.importGenTable(tableList);
- return AjaxResult.success();
- }
-
- /**
- * todo
- * 修改保存代码生成业务
- */
- @PreAuthorize("@ebts.hasPermi('tool:gen:edit')")
- @Log(title = "代码生成", businessType = BusinessType.UPDATE)
- @PutMapping
- public AjaxResult editSave(@Validated @RequestBody GenTable genTable) {
- genTableService.validateEdit(genTable);
- genTableService.updateGenTable(genTable);
- return AjaxResult.success();
- }
-
- /**
- * 删除代码生成
- */
- @PreAuthorize("@ebts.hasPermi('tool:gen:remove')")
- @Log(title = "代码生成", businessType = BusinessType.DELETE)
- @DeleteMapping("/{tableIds}")
- public AjaxResult remove(@PathVariable Long[] tableIds) {
- try {
- ServerResult ServerResult = genTableService.deleteGenTableByIds(tableIds);
- if (ServerResult.isStart()) {
- return AjaxResult.success();
- } else {
- return AjaxResult.error(ServerResult.getMsg());
- }
- } catch (RuntimeException e) {
- logger.error(e.getMessage());
- return AjaxResult.error(ReturnConstants.SYS_ERROR);
- }
- }
-
- /**
- * 预览代码
- */
- @PreAuthorize("@ebts.hasPermi('tool:gen:preview')")
- @GetMapping("/preview/{tableId}")
- public AjaxResult preview(@PathVariable("tableId") Long tableId) throws IOException {
- Map dataMap = genTableService.previewCode(tableId);
- return AjaxResult.success(dataMap);
- }
-
- /**
- * 生成代码(下载方式)
- */
- @PreAuthorize("@ebts.hasPermi('tool:gen:code')")
- @Log(title = "代码生成", businessType = BusinessType.GENCODE)
- @GetMapping("/download/{tableName}")
- public void download(HttpServletResponse response, @PathVariable("tableName") String tableName) throws IOException {
- byte[] data = genTableService.downloadCode(tableName);
- genCode(response, data);
- }
-
- /**
- * 生成代码(自定义路径)
- */
- @PreAuthorize("@ebts.hasPermi('tool:gen:code')")
- @Log(title = "代码生成", businessType = BusinessType.GENCODE)
- @GetMapping("/genCode/{tableName}")
- public AjaxResult genCode(@PathVariable("tableName") String tableName) {
- boolean start = genTableService.generatorCode(tableName);
- if (start) {
- return AjaxResult.success();
- } else {
- return AjaxResult.error("模板渲染失败!");
- }
- }
-
- /**
- * 同步数据库
- */
- @PreAuthorize("@ebts.hasPermi('tool:gen:edit')")
- @Log(title = "代码生成", businessType = BusinessType.UPDATE)
- @GetMapping("/synchDb/{tableName}")
- public AjaxResult synchDb(@PathVariable("tableName") String tableName) {
- genTableService.synchDb(tableName);
- return AjaxResult.success();
- }
-
- /**
- * 批量生成代码
- */
- @PreAuthorize("@ebts.hasPermi('tool:gen:code')")
- @Log(title = "代码生成", businessType = BusinessType.GENCODE)
- @GetMapping("/batchGenCode")
- public void batchGenCode(HttpServletResponse response, String tables) throws IOException {
- String[] tableNames = Convert.toStrArray(tables);
- byte[] data = genTableService.downloadCode(tableNames);
- genCode(response, data);
-// if (compress(data)){
-// return AjaxResult.success("ebts.zip");
-// }else {
-// return AjaxResult.error();
-// }
- }
-
- /**
- * 生成zip文件
- */
- private void genCode(HttpServletResponse response, byte[] data) throws IOException {
- response.reset();
- response.addHeader("Access-Control-Allow-Origin", "*");
- response.addHeader("Access-Control-Expose-Headers", "Content-Disposition");
- response.setHeader("Content-Disposition", "attachment; filename=\"ebts.zip\"");
- response.addHeader("Content-Length", "" + data.length);
- response.setContentType("application/octet-stream; charset=UTF-8");
- IOUtils.write(data, response.getOutputStream());
- }
-}
\ No newline at end of file
diff --git a/ebts/ebts-generator/src/main/java/com/ebts/generator/controller/InterTableController.java b/ebts/ebts-generator/src/main/java/com/ebts/generator/controller/InterTableController.java
deleted file mode 100644
index 9b09804..0000000
--- a/ebts/ebts-generator/src/main/java/com/ebts/generator/controller/InterTableController.java
+++ /dev/null
@@ -1,254 +0,0 @@
-package com.ebts.generator.controller;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.Map;
-
-
-import com.ebts.common.annotation.Log;
-import com.ebts.common.constant.ReturnConstants;
-import com.ebts.common.core.controller.BaseController;
-import com.ebts.common.core.entity.AjaxResult;
-import com.ebts.common.enums.BusinessType;
-import com.ebts.common.utils.ServerResult;
-import com.ebts.generator.dto.InterTableDto;
-import org.apache.commons.io.IOUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ebts.generator.entity.InterTable;
-import com.ebts.generator.service.InterTableService;
-
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * 接口信息Controller
- *
- * @author binlin
- * @date 2021-01-25
- */
-
-@RestController
-@RequestMapping("/generator/intertable")
-public class InterTableController extends BaseController {
- protected final Logger logger = LoggerFactory.getLogger(InterTableController.class);
-
- @Autowired
- private InterTableService interTableService;
-
- /**
- * 查询接口信息列表
- */
- @PreAuthorize("@ebts.hasPermi('generator:intertable:list')")
- @GetMapping("/list")
- public Serializable list(InterTable interTable) {
- ServerResult