From 2f66829a41696a7e176e837cc1ffeb0a93f46fc4 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 13 Feb 2021 13:40:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=BB=A3=E7=A0=81=E7=94=9F?= =?UTF-8?q?=E6=88=90=E5=99=A8~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/generator/config/GenConfig.java | 30 - .../com/ruoyi/generator/domain/GenTable.java | 45 -- .../ruoyi/generator/util/VelocityUtils.java | 265 -------- ruoyi-common/src/main/resources/generator.yml | 10 - ruoyi-ui/src/api/tool/codegen.js | 32 +- ruoyi-ui/src/router/index.js | 4 +- .../tool/{gen => codegen}/basicInfoForm.vue | 122 ++-- .../views/tool/{gen => codegen}/editTable.vue | 465 +++++++------ .../tool/{gen => codegen}/genInfoForm.vue | 638 +++++++++--------- .../tool/{gen => codegen}/importTable.vue | 212 +++--- .../src/views/tool/{gen => codegen}/index.vue | 544 ++++++++------- sql/ruoyi-vue-pro.sql | 94 ++- .../codegen/impl/ToolCodegenServiceImpl.java | 11 +- .../resources/codegen/vue/views/index.vue.vm | 4 +- 14 files changed, 1147 insertions(+), 1329 deletions(-) delete mode 100644 ruoyi-common/src/main/java/com/ruoyi/generator/config/GenConfig.java delete mode 100644 ruoyi-common/src/main/java/com/ruoyi/generator/domain/GenTable.java delete mode 100644 ruoyi-common/src/main/java/com/ruoyi/generator/util/VelocityUtils.java delete mode 100644 ruoyi-common/src/main/resources/generator.yml rename ruoyi-ui/src/views/tool/{gen => codegen}/basicInfoForm.vue (96%) rename ruoyi-ui/src/views/tool/{gen => codegen}/editTable.vue (96%) rename ruoyi-ui/src/views/tool/{gen => codegen}/genInfoForm.vue (97%) rename ruoyi-ui/src/views/tool/{gen => codegen}/importTable.vue (92%) rename ruoyi-ui/src/views/tool/{gen => codegen}/index.vue (69%) diff --git a/ruoyi-common/src/main/java/com/ruoyi/generator/config/GenConfig.java b/ruoyi-common/src/main/java/com/ruoyi/generator/config/GenConfig.java deleted file mode 100644 index 805a0b01c..000000000 --- a/ruoyi-common/src/main/java/com/ruoyi/generator/config/GenConfig.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.ruoyi.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 ruoyi - */ -@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; - -} diff --git a/ruoyi-common/src/main/java/com/ruoyi/generator/domain/GenTable.java b/ruoyi-common/src/main/java/com/ruoyi/generator/domain/GenTable.java deleted file mode 100644 index 5cd47dcac..000000000 --- a/ruoyi-common/src/main/java/com/ruoyi/generator/domain/GenTable.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.ruoyi.generator.domain; - -import java.util.List; -import javax.validation.Valid; -import javax.validation.constraints.NotBlank; - -import org.apache.commons.lang3.ArrayUtils; -import com.ruoyi.common.constant.GenConstants; -import com.ruoyi.common.core.domain.BaseEntity; -import com.ruoyi.common.utils.StringUtils; - -/** - * 业务表 gen_table - * - * @author ruoyi - */ -public class GenTable extends BaseEntity { - - /** - * 生成包路径 - */ - @NotBlank(message = "生成包路径不能为空") - private String packageName; - - /** - * 其它生成选项 - */ - private String options; - - /** - * 树编码字段 - */ - private String treeCode; - - /** - * 树父编码字段 - */ - private String treeParentCode; - - /** - * 树名称字段 - */ - private String treeName; - -} diff --git a/ruoyi-common/src/main/java/com/ruoyi/generator/util/VelocityUtils.java b/ruoyi-common/src/main/java/com/ruoyi/generator/util/VelocityUtils.java deleted file mode 100644 index 5505303c9..000000000 --- a/ruoyi-common/src/main/java/com/ruoyi/generator/util/VelocityUtils.java +++ /dev/null @@ -1,265 +0,0 @@ -package com.ruoyi.generator.util; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; - -import org.apache.velocity.VelocityContext; -import com.alibaba.fastjson.JSONObject; -import com.ruoyi.common.constant.GenConstants; -import com.ruoyi.common.utils.DateUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.generator.domain.GenTable; -import com.ruoyi.generator.domain.GenTableColumn; - -/** - * 模板处理工具类 - * - * @author ruoyi - */ -public class VelocityUtils { - - /** - * 默认上级菜单,系统工具 - */ - private static final String DEFAULT_PARENT_MENU_ID = "3"; - - /** - * 设置模板变量信息 - * - * @return 模板列表 - */ - public static VelocityContext prepareContext(GenTable genTable) { - String moduleName = genTable.getModuleName(); - String businessName = genTable.getBusinessName(); - String packageName = genTable.getPackageName(); - String tplCategory = genTable.getTplCategory(); - String functionName = genTable.getFunctionName(); - - VelocityContext velocityContext = new VelocityContext(); - velocityContext.put("tplCategory", genTable.getTplCategory()); - velocityContext.put("tableName", genTable.getTableName()); - velocityContext.put("functionName", StringUtils.isNotEmpty(functionName) ? functionName : "【请填写功能名称】"); - velocityContext.put("ClassName", genTable.getClassName()); - velocityContext.put("className", StringUtils.uncapitalize(genTable.getClassName())); - velocityContext.put("moduleName", genTable.getModuleName()); - velocityContext.put("BusinessName", StringUtils.capitalize(genTable.getBusinessName())); - velocityContext.put("businessName", genTable.getBusinessName()); - velocityContext.put("basePackage", getPackagePrefix(packageName)); - velocityContext.put("packageName", packageName); - velocityContext.put("author", genTable.getFunctionAuthor()); - velocityContext.put("datetime", DateUtils.getDate()); - velocityContext.put("pkColumn", genTable.getPkColumn()); - velocityContext.put("importList", getImportList(genTable.getColumns())); - velocityContext.put("permissionPrefix", getPermissionPrefix(moduleName, businessName)); - velocityContext.put("columns", genTable.getColumns()); - velocityContext.put("table", genTable); - setMenuVelocityContext(velocityContext, genTable); - if (GenConstants.TPL_TREE.equals(tplCategory)) { - setTreeVelocityContext(velocityContext, genTable); - } - return velocityContext; - } - - public static void setTreeVelocityContext(VelocityContext context, GenTable genTable) { - String options = genTable.getOptions(); - JSONObject paramsObj = JSONObject.parseObject(options); - String treeCode = getTreecode(paramsObj); - String treeParentCode = getTreeParentCode(paramsObj); - String treeName = getTreeName(paramsObj); - - context.put("treeCode", treeCode); - context.put("treeParentCode", treeParentCode); - context.put("treeName", treeName); - context.put("expandColumn", getExpandColumn(genTable)); - if (paramsObj.containsKey(GenConstants.TREE_PARENT_CODE)) { - context.put("tree_parent_code", paramsObj.getString(GenConstants.TREE_PARENT_CODE)); - } - if (paramsObj.containsKey(GenConstants.TREE_NAME)) { - context.put("tree_name", paramsObj.getString(GenConstants.TREE_NAME)); - } - } - - /** - * 获取模板信息 - * - * @return 模板列表 - */ - public static List getTemplateList(String tplCategory) { - List templates = new ArrayList(); - templates.add("vm/java/domain.java.vm"); - templates.add("vm/java/mapper.java.vm"); - templates.add("vm/java/service.java.vm"); - templates.add("vm/java/serviceImpl.java.vm"); - templates.add("vm/java/controller.java.vm"); - templates.add("vm/xml/mapper.xml.vm"); - templates.add("vm/sql/sql.vm"); - templates.add("vm/js/api.js.vm"); - if (GenConstants.TPL_CRUD.equals(tplCategory)) { - templates.add("vm/vue/index.vue.vm"); - } else if (GenConstants.TPL_TREE.equals(tplCategory)) { - templates.add("vm/vue/index-tree.vue.vm"); - } - return templates; - } - - /** - * 获取文件名 - */ - public static String getFileName(String template, GenTable genTable) { - // 文件名称 - String fileName = ""; - // 包路径 - String packageName = genTable.getPackageName(); - // 模块名 - String moduleName = genTable.getModuleName(); - // 大写类名 - String className = genTable.getClassName(); - // 业务名称 - String businessName = genTable.getBusinessName(); - - String javaPath = PROJECT_PATH + "/" + StringUtils.replace(packageName, ".", "/"); - String mybatisPath = MYBATIS_PATH + "/" + moduleName; - String vuePath = "vue"; - - if (template.contains("domain.java.vm")) { - fileName = StringUtils.format("{}/domain/{}.java", javaPath, className); - } else if (template.contains("mapper.java.vm")) { - fileName = StringUtils.format("{}/mapper/{}Mapper.java", javaPath, className); - } else if (template.contains("service.java.vm")) { - fileName = StringUtils.format("{}/service/I{}Service.java", javaPath, className); - } else if (template.contains("serviceImpl.java.vm")) { - fileName = StringUtils.format("{}/service/impl/{}ServiceImpl.java", javaPath, className); - } else if (template.contains("controller.java.vm")) { - fileName = StringUtils.format("{}/controller/{}Controller.java", javaPath, className); - } else if (template.contains("mapper.xml.vm")) { - fileName = StringUtils.format("{}/{}Mapper.xml", mybatisPath, className); - } else if (template.contains("sql.vm")) { - fileName = businessName + "Menu.sql"; - } else if (template.contains("api.js.vm")) { - fileName = StringUtils.format("{}/api/{}/{}.js", vuePath, moduleName, businessName); - } else if (template.contains("index.vue.vm")) { - fileName = StringUtils.format("{}/views/{}/{}/index.vue", vuePath, moduleName, businessName); - } else if (template.contains("index-tree.vue.vm")) { - fileName = StringUtils.format("{}/views/{}/{}/index.vue", vuePath, moduleName, businessName); - } - return fileName; - } - - /** - * 获取包前缀 - * - * @param packageName 包名称 - * @return 包前缀名称 - */ - public static String getPackagePrefix(String packageName) { - int lastIndex = packageName.lastIndexOf("."); - String basePackage = StringUtils.substring(packageName, 0, lastIndex); - return basePackage; - } - - /** - * 根据列类型获取导入包 - * - * @param columns 列集合 - * @return 返回需要导入的包列表 - */ - public static HashSet getImportList(List columns) { - HashSet importList = new HashSet(); - for (GenTableColumn column : columns) { - if (!column.isSuperColumn() && GenConstants.TYPE_DATE.equals(column.getJavaType())) { - importList.add("java.util.Date"); - importList.add("com.fasterxml.jackson.annotation.JsonFormat"); - } else if (!column.isSuperColumn() && GenConstants.TYPE_BIGDECIMAL.equals(column.getJavaType())) { - importList.add("java.math.BigDecimal"); - } - } - return importList; - } - - /** - * 获取权限前缀 - * - * @param moduleName 模块名称 - * @param businessName 业务名称 - * @return 返回权限前缀 - */ - public static String getPermissionPrefix(String moduleName, String businessName) { - return StringUtils.format("{}:{}", moduleName, businessName); - } - - /** - * 获取上级菜单ID字段 - * - * @param paramsObj 生成其他选项 - * @return 上级菜单ID字段 - */ - public static String getParentMenuId(JSONObject paramsObj) { - if (StringUtils.isNotEmpty(paramsObj) && paramsObj.containsKey(GenConstants.PARENT_MENU_ID)) { - return paramsObj.getString(GenConstants.PARENT_MENU_ID); - } - return DEFAULT_PARENT_MENU_ID; - } - - /** - * 获取树编码 - * - * @param paramsObj 生成其他选项 - * @return 树编码 - */ - public static String getTreecode(JSONObject paramsObj) { - if (paramsObj.containsKey(GenConstants.TREE_CODE)) { - return StringUtils.toCamelCase(paramsObj.getString(GenConstants.TREE_CODE)); - } - return StringUtils.EMPTY; - } - - /** - * 获取树父编码 - * - * @param paramsObj 生成其他选项 - * @return 树父编码 - */ - public static String getTreeParentCode(JSONObject paramsObj) { - if (paramsObj.containsKey(GenConstants.TREE_PARENT_CODE)) { - return StringUtils.toCamelCase(paramsObj.getString(GenConstants.TREE_PARENT_CODE)); - } - return StringUtils.EMPTY; - } - - /** - * 获取树名称 - * - * @param paramsObj 生成其他选项 - * @return 树名称 - */ - public static String getTreeName(JSONObject paramsObj) { - if (paramsObj.containsKey(GenConstants.TREE_NAME)) { - return StringUtils.toCamelCase(paramsObj.getString(GenConstants.TREE_NAME)); - } - return StringUtils.EMPTY; - } - - /** - * 获取需要在哪一列上面显示展开按钮 - * - * @param genTable 业务表对象 - * @return 展开按钮列序号 - */ - public static int getExpandColumn(GenTable genTable) { - String options = genTable.getOptions(); - JSONObject paramsObj = JSONObject.parseObject(options); - String treeName = paramsObj.getString(GenConstants.TREE_NAME); - int num = 0; - for (GenTableColumn column : genTable.getColumns()) { - if (column.isList()) { - num++; - String columnName = column.getColumnName(); - if (columnName.equals(treeName)) { - break; - } - } - } - return num; - } -} diff --git a/ruoyi-common/src/main/resources/generator.yml b/ruoyi-common/src/main/resources/generator.yml deleted file mode 100644 index 5bd3dd67b..000000000 --- a/ruoyi-common/src/main/resources/generator.yml +++ /dev/null @@ -1,10 +0,0 @@ -# 代码生成 -gen: - # 作者 - author: ruoyi - # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool - packageName: com.ruoyi.system - # 自动去除表前缀,默认是false - autoRemovePre: false - # 表前缀(生成类名不会包含表前缀,多个用逗号分隔) - tablePrefix: sys_ \ No newline at end of file diff --git a/ruoyi-ui/src/api/tool/codegen.js b/ruoyi-ui/src/api/tool/codegen.js index 486664ecc..31aad1e22 100644 --- a/ruoyi-ui/src/api/tool/codegen.js +++ b/ruoyi-ui/src/api/tool/codegen.js @@ -27,13 +27,25 @@ export function updateCodegen(data) { } // 基于数据库的表结构,同步数据库的表和字段定义 -export function syncCodegen(tableId) { +export function syncCodegenFromDB(tableId) { return request({ - url: '/tool/codegen/sync?tableId=' + tableId, + url: '/tool/codegen/sync-from-db?tableId=' + tableId, method: 'put' }) } +// 基于 SQL 建表语句,同步数据库的表和字段定义 +export function syncCodegenFromSQL(tableId, sql) { + return request({ + url: '/tool/codegen/sync-from-sql?tableId=' + tableId, + method: 'put', + headers:{ + 'Content-type': 'application/x-www-form-urlencoded' + }, + data: 'tableId=' + tableId + "&sql=" + sql, + }) +} + // 预览生成代码 export function previewCodegen(tableId) { return request({ @@ -61,9 +73,9 @@ export function getSchemaTableList(query) { } // 基于数据库的表结构,创建代码生成器的表定义 -export function createCodegenList(tableNames) { +export function createCodegenListFromDB(tableNames) { return request({ - url: '/tool/codegen/create-list', + url: '/tool/codegen/create-list-from-db', method: 'post', headers:{ 'Content-type': 'application/x-www-form-urlencoded' @@ -72,6 +84,18 @@ export function createCodegenList(tableNames) { }) } +// 基于 SQL 建表语句,创建代码生成器的表定义 +export function createCodegenListFromSQL(data) { + return request({ + url: '/tool/codegen/create-list-from-sql', + method: 'post', + headers:{ + 'Content-type': 'application/x-www-form-urlencoded' + }, + data: 'sql=' + data.sql, + }) +} + // 删除数据库的表和字段定义 export function deleteCodegen(tableId) { return request({ diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index 3f14fd3a3..25d9251fa 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -107,13 +107,13 @@ export const constantRoutes = [ ] }, { - path: '/gen', + path: '/codegen', component: Layout, hidden: true, children: [ { path: 'edit/:tableId(\\d+)', - component: (resolve) => require(['@/views/tool/gen/editTable'], resolve), + component: (resolve) => require(['@/views/tool/codegen/editTable'], resolve), name: 'GenEdit', meta: { title: '修改生成配置' } } diff --git a/ruoyi-ui/src/views/tool/gen/basicInfoForm.vue b/ruoyi-ui/src/views/tool/codegen/basicInfoForm.vue similarity index 96% rename from ruoyi-ui/src/views/tool/gen/basicInfoForm.vue rename to ruoyi-ui/src/views/tool/codegen/basicInfoForm.vue index 8f78fe176..184141b28 100644 --- a/ruoyi-ui/src/views/tool/gen/basicInfoForm.vue +++ b/ruoyi-ui/src/views/tool/codegen/basicInfoForm.vue @@ -1,61 +1,61 @@ - - + + diff --git a/ruoyi-ui/src/views/tool/gen/editTable.vue b/ruoyi-ui/src/views/tool/codegen/editTable.vue similarity index 96% rename from ruoyi-ui/src/views/tool/gen/editTable.vue rename to ruoyi-ui/src/views/tool/codegen/editTable.vue index 23e646e54..b0e06a71c 100644 --- a/ruoyi-ui/src/views/tool/gen/editTable.vue +++ b/ruoyi-ui/src/views/tool/codegen/editTable.vue @@ -1,233 +1,232 @@ - - + + diff --git a/ruoyi-ui/src/views/tool/gen/genInfoForm.vue b/ruoyi-ui/src/views/tool/codegen/genInfoForm.vue similarity index 97% rename from ruoyi-ui/src/views/tool/gen/genInfoForm.vue rename to ruoyi-ui/src/views/tool/codegen/genInfoForm.vue index 912cea478..187baf0d6 100644 --- a/ruoyi-ui/src/views/tool/gen/genInfoForm.vue +++ b/ruoyi-ui/src/views/tool/codegen/genInfoForm.vue @@ -1,319 +1,319 @@ - - + + diff --git a/ruoyi-ui/src/views/tool/gen/importTable.vue b/ruoyi-ui/src/views/tool/codegen/importTable.vue similarity index 92% rename from ruoyi-ui/src/views/tool/gen/importTable.vue rename to ruoyi-ui/src/views/tool/codegen/importTable.vue index 04c2b1730..3c05685b3 100644 --- a/ruoyi-ui/src/views/tool/gen/importTable.vue +++ b/ruoyi-ui/src/views/tool/codegen/importTable.vue @@ -1,106 +1,106 @@ - - - + + + diff --git a/ruoyi-ui/src/views/tool/gen/index.vue b/ruoyi-ui/src/views/tool/codegen/index.vue similarity index 69% rename from ruoyi-ui/src/views/tool/gen/index.vue rename to ruoyi-ui/src/views/tool/codegen/index.vue index 3b4fbe933..154c8afbd 100644 --- a/ruoyi-ui/src/views/tool/gen/index.vue +++ b/ruoyi-ui/src/views/tool/codegen/index.vue @@ -1,228 +1,316 @@ - - - + + + diff --git a/sql/ruoyi-vue-pro.sql b/sql/ruoyi-vue-pro.sql index f612f99ed..bc64e75e8 100644 --- a/sql/ruoyi-vue-pro.sql +++ b/sql/ruoyi-vue-pro.sql @@ -11,7 +11,7 @@ Target Server Version : 50718 File Encoding : 65001 - Date: 13/02/2021 10:09:02 + Date: 13/02/2021 13:39:00 */ SET NAMES utf8mb4; @@ -151,7 +151,7 @@ INSERT INTO `sys_dict_data` VALUES (48, 1, '动态超时', '2', 'inf_redis_timeo INSERT INTO `sys_dict_data` VALUES (49, 3, '固定超时', '3', 'inf_redis_timeout_type', 0, 'Redis 设置了过期时间', '', '2021-01-26 00:55:26', '', '2021-01-26 00:55:26', b'0'); INSERT INTO `sys_dict_data` VALUES (50, 1, '单表(增删改查)', '1', 'tool_codegen_template_type', 0, NULL, '', '2021-02-05 07:09:06', '', '2021-02-05 07:21:52', b'0'); INSERT INTO `sys_dict_data` VALUES (51, 2, '树表(增删改查)', '2', 'tool_codegen_template_type', 0, NULL, '', '2021-02-05 07:14:46', '', '2021-02-05 07:21:49', b'0'); -INSERT INTO `sys_dict_data` VALUES (52, 3, '主子表(增删改查)', '3', 'tool_codegen_template_type', 0, NULL, '', '2021-02-05 07:21:45', '', '2021-02-05 07:21:45', b'0'); +INSERT INTO `sys_dict_data` VALUES (52, 3, '主子表(增删改查)', '3', 'tool_codegen_template_type', 0, NULL, '', '2021-02-05 07:21:45', '', '2021-02-06 18:54:26', b'1'); COMMIT; -- ---------------------------- @@ -284,7 +284,7 @@ CREATE TABLE `sys_login_log` ( `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=68 DEFAULT CHARSET=utf8mb4 COMMENT='系统访问记录'; +) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=utf8mb4 COMMENT='系统访问记录'; -- ---------------------------- -- Records of sys_login_log @@ -357,6 +357,11 @@ INSERT INTO `sys_login_log` VALUES (64, 100, 'f9fcc29d-bba2-4451-a0d3-1edd9a0edf INSERT INTO `sys_login_log` VALUES (65, 100, 'ddd1ca42-ddc2-4608-9ef4-96837b1d97e3', 'admin', 0, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-06 11:48:57', '', '2021-02-06 11:48:57', b'0'); INSERT INTO `sys_login_log` VALUES (66, 100, '69136db1-16bb-49f9-a272-d0e0ec1d61f9', 'admin', 0, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-06 13:47:15', '', '2021-02-06 13:47:15', b'0'); INSERT INTO `sys_login_log` VALUES (67, 100, '88541a1b-6ce4-4223-8188-bfb4d7ca07ee', 'admin', 0, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-06 15:00:55', '', '2021-02-06 15:00:55', b'0'); +INSERT INTO `sys_login_log` VALUES (68, 100, '1348b631-676c-4029-9e07-9829874fe40c', 'admin', 31, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-06 19:46:29', '', '2021-02-06 19:46:29', b'0'); +INSERT INTO `sys_login_log` VALUES (69, 100, 'a02dac13-0f1c-4f39-9497-759cace4fc52', 'admin', 31, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-06 19:46:38', '', '2021-02-06 19:46:38', b'0'); +INSERT INTO `sys_login_log` VALUES (70, 100, 'd79982bf-79df-4547-ab7e-74bb9fe0c8ef', 'admin', 31, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-06 19:46:41', '', '2021-02-06 19:46:41', b'0'); +INSERT INTO `sys_login_log` VALUES (71, 100, '5cc80a7e-f4ec-4e02-9d0c-1d26062e2be6', 'admin', 0, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-06 19:46:45', '', '2021-02-06 19:46:45', b'0'); +INSERT INTO `sys_login_log` VALUES (72, 100, '6ea05744-e7b2-4e6a-a1f6-d53032d4cc1d', 'admin', 0, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-06 21:22:31', '', '2021-02-06 21:22:31', b'0'); COMMIT; -- ---------------------------- @@ -405,7 +410,7 @@ INSERT INTO `sys_menu` VALUES (111, '数据监控', 'monitor:druid:list', 2, 3, INSERT INTO `sys_menu` VALUES (112, '服务监控', 'monitor:server:list', 2, 4, 2, 'http://127.0.0.1:8080/admin', 'server', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-21 04:58:59', b'0'); INSERT INTO `sys_menu` VALUES (113, 'Redis 监控', '', 2, 5, 2, 'redis', 'redis', 'infra/redis/index', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-26 00:56:30', b'0'); INSERT INTO `sys_menu` VALUES (114, '表单构建', 'tool:build:list', 2, 1, 3, 'build', 'build', 'tool/build/index', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-05 22:36:45', b'0'); -INSERT INTO `sys_menu` VALUES (115, '代码生成', 'tool:gen:list', 2, 2, 3, 'gen', 'code', 'tool/gen/index', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-05 22:36:45', b'0'); +INSERT INTO `sys_menu` VALUES (115, '代码生成', 'tool:codegen:query', 2, 2, 3, 'gen', 'code', 'tool/codegen/index', 0, 'admin', '2021-01-05 17:03:48', '', '2021-02-06 21:23:03', b'0'); INSERT INTO `sys_menu` VALUES (116, '系统接口', 'tool:swagger:list', 2, 3, 3, 'swagger', 'swagger', 'tool/swagger/index', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-05 22:36:45', b'0'); INSERT INTO `sys_menu` VALUES (500, '操作日志', 'system:operate-log:list', 2, 1, 108, 'operate-log', 'form', 'system/operatelog/index', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-16 18:25:45', b'0'); INSERT INTO `sys_menu` VALUES (501, '登录日志', 'system:login-log:list', 2, 2, 108, 'login-log', 'logininfor', 'system/loginlog/index', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-18 05:29:58', b'0'); @@ -461,12 +466,12 @@ INSERT INTO `sys_menu` VALUES (1051, '任务修改', 'monitor:job:edit', 3, 3, 1 INSERT INTO `sys_menu` VALUES (1052, '任务删除', 'monitor:job:remove', 3, 4, 110, '#', '#', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-05 22:36:55', b'0'); INSERT INTO `sys_menu` VALUES (1053, '状态修改', 'monitor:job:changeStatus', 3, 5, 110, '#', '#', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-05 22:36:55', b'0'); INSERT INTO `sys_menu` VALUES (1054, '任务导出', 'monitor:job:export', 3, 7, 110, '#', '#', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-05 22:36:55', b'0'); -INSERT INTO `sys_menu` VALUES (1055, '生成查询', 'tool:gen:query', 3, 1, 115, '#', '#', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-05 22:36:55', b'0'); -INSERT INTO `sys_menu` VALUES (1056, '生成修改', 'tool:gen:edit', 3, 2, 115, '#', '#', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-05 22:36:55', b'0'); -INSERT INTO `sys_menu` VALUES (1057, '生成删除', 'tool:gen:remove', 3, 3, 115, '#', '#', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-05 22:36:55', b'0'); -INSERT INTO `sys_menu` VALUES (1058, '导入代码', 'tool:gen:import', 3, 2, 115, '', '#', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-20 16:55:13', b'0'); -INSERT INTO `sys_menu` VALUES (1059, '预览代码', 'tool:gen:preview', 3, 4, 115, '#', '#', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-05 22:36:55', b'0'); -INSERT INTO `sys_menu` VALUES (1060, '生成代码', 'tool:gen:code', 3, 5, 115, '', '#', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-20 16:54:18', b'0'); +INSERT INTO `sys_menu` VALUES (1055, '生成查询', 'tool:gen:query', 3, 1, 115, '#', '#', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-02-06 21:23:25', b'1'); +INSERT INTO `sys_menu` VALUES (1056, '生成修改', 'tool:codegen:update', 3, 2, 115, '', '', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-02-06 21:23:41', b'0'); +INSERT INTO `sys_menu` VALUES (1057, '生成删除', 'tool:codegen:delete', 3, 3, 115, '', '', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-02-06 21:24:02', b'0'); +INSERT INTO `sys_menu` VALUES (1058, '导入代码', 'tool:codegen:create', 3, 2, 115, '', '', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-02-06 21:23:50', b'0'); +INSERT INTO `sys_menu` VALUES (1059, '预览代码', 'tool:codegen:preview', 3, 4, 115, '', '', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-02-06 21:24:10', b'0'); +INSERT INTO `sys_menu` VALUES (1060, '生成代码', 'tool:codegen:download', 3, 5, 115, '', '', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-02-06 21:24:20', b'0'); INSERT INTO `sys_menu` VALUES (1063, '设置角色菜单权限', 'system:permission:assign-role-menu', 3, 6, 101, '', '', '', 0, '', '2021-01-06 17:53:44', '', '2021-01-06 17:55:23', b'0'); INSERT INTO `sys_menu` VALUES (1064, '设置角色数据权限', 'system:permission:assign-role-data-scope', 3, 7, 101, '', '', '', 0, '', '2021-01-06 17:56:31', '', '2021-01-06 17:56:31', b'0'); INSERT INTO `sys_menu` VALUES (1065, '设置用户角色', 'system:permission:assign-user-role', 3, 8, 101, '', '', '', 0, '', '2021-01-07 10:23:28', '', '2021-01-07 10:23:28', b'0'); @@ -536,12 +541,37 @@ CREATE TABLE `sys_operate_log` ( `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=166 DEFAULT CHARSET=utf8mb4 COMMENT='操作日志记录'; +) ENGINE=InnoDB AUTO_INCREMENT=191 DEFAULT CHARSET=utf8mb4 COMMENT='操作日志记录'; -- ---------------------------- -- Records of sys_operate_log -- ---------------------------- BEGIN; +INSERT INTO `sys_operate_log` VALUES (166, '59babf3d-6cf0-4f9b-8b92-99121091f372', 1, '代码生成器 API', '基于 SQL 建表语句,创建代码生成器的表和字段定义', 2, '', '', 'POST', '/api/tool/codegen/create-list-from-sql', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.tool.controller.codegen.ToolCodegenController.createCodegenListFromSQL(String)', '{\"sql\":\"undefined\"}', '2021-02-13 11:41:04', 98, 500, 'ServiceException: 解析 SQL 失败,请检查', 'null', '', '2021-02-06 20:25:48', '', '2021-02-06 20:25:48', b'0'); +INSERT INTO `sys_operate_log` VALUES (167, '42aa3fb0-bf28-4705-a0ac-d792c4dc911f', 1, '代码生成器 API', '基于 SQL 建表语句,创建代码生成器的表和字段定义', 2, '', '', 'POST', '/api/tool/codegen/create-list-from-sql', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.tool.controller.codegen.ToolCodegenController.createCodegenListFromSQL(String)', '{\"sql\":\"undefined\"}', '2021-02-13 11:41:34', 107, 500, 'ServiceException: 解析 SQL 失败,请检查', 'null', '', '2021-02-06 20:26:18', '', '2021-02-06 20:26:18', b'0'); +INSERT INTO `sys_operate_log` VALUES (168, '45bc29c4-304e-4bba-83ce-82c7931f58ed', 1, '代码生成器 API', '基于 SQL 建表语句,创建代码生成器的表和字段定义', 2, '', '', 'POST', '/api/tool/codegen/create-list-from-sql', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.tool.controller.codegen.ToolCodegenController.createCodegenListFromSQL(String)', '{\"sql\":\"undefined\"}', '2021-02-13 11:42:18', 0, 500, 'ServiceException: 解析 SQL 失败,请检查', 'null', '', '2021-02-06 20:27:02', '', '2021-02-06 20:27:02', b'0'); +INSERT INTO `sys_operate_log` VALUES (169, 'a1c0ba70-a99a-4fd1-8cdb-beca51ca4b4c', 1, '代码生成器 API', '基于 SQL 建表语句,创建代码生成器的表和字段定义', 2, '', '', 'POST', '/api/tool/codegen/create-list-from-sql', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.tool.controller.codegen.ToolCodegenController.createCodegenListFromSQL(String)', '{\"sql\":\"CREATE TABLE `sys_file` (\\n `id` varchar(255) NOT NULL COMMENT \'文件路径\',\\n `content` blob NOT NULL COMMENT \'文件内容\',\\n `create_by` varchar(64) DEFAULT \'\' COMMENT \'创建者\',\\n `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT \'创建时间\',\\n `update_by` varchar(64) DEFAULT \'\' COMMENT \'更新者\',\\n `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT \'更新时间\',\\n `deleted` bit(1) NOT NULL DEFAULT b\'0\' COMMENT \'是否删除\',\\n PRIMARY KEY (`id`) USING BTREE\\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT=\'文件表\\\\n\';\"}', '2021-02-13 11:43:49', 127, 500, 'IllegalStateException: column(content) 的数据库类型(blob) 找不到匹配的 Java 类型', 'null', '', '2021-02-06 20:28:34', '', '2021-02-06 20:28:34', b'0'); +INSERT INTO `sys_operate_log` VALUES (170, '526cf7ed-0c80-4d2e-89e4-0e72a6fe2597', 1, '代码生成器 API', '基于 SQL 建表语句,创建代码生成器的表和字段定义', 2, '', '', 'POST', '/api/tool/codegen/create-list-from-sql', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.tool.controller.codegen.ToolCodegenController.createCodegenListFromSQL(String)', '{\"sql\":\"CREATE TABLE `sys_job` (\\n `job_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT \'任务ID\',\\n `job_name` varchar(64) NOT NULL DEFAULT \'\' COMMENT \'任务名称\',\\n `job_group` varchar(64) NOT NULL DEFAULT \'DEFAULT\' COMMENT \'任务组名\',\\n `invoke_target` varchar(500) NOT NULL COMMENT \'调用目标字符串\',\\n `cron_expression` varchar(255) DEFAULT \'\' COMMENT \'cron执行表达式\',\\n `misfire_policy` varchar(20) DEFAULT \'3\' COMMENT \'计划执行错误策略(1立即执行 2执行一次 3放弃执行)\',\\n `concurrent` char(1) DEFAULT \'1\' COMMENT \'是否并发执行(0允许 1禁止)\',\\n `status` char(1) DEFAULT \'0\' COMMENT \'状态(0正常 1暂停)\',\\n `create_by` varchar(64) DEFAULT \'\' COMMENT \'创建者\',\\n `create_time` datetime DEFAULT NULL COMMENT \'创建时间\',\\n `update_by` varchar(64) DEFAULT \'\' COMMENT \'更新者\',\\n `update_time` datetime DEFAULT NULL COMMENT \'更新时间\',\\n `remark` varchar(500) DEFAULT \'\' COMMENT \'备注信息\',\\n PRIMARY KEY (`job_id`,`job_name`,`job_group`)\\n) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT=\'定时任务调度表\';\"}', '2021-02-13 11:44:41', 85, 0, '', '23', '', '2021-02-06 20:29:26', '', '2021-02-06 20:29:26', b'0'); +INSERT INTO `sys_operate_log` VALUES (171, '6417a255-8ac0-40a8-9040-c517f39cd151', 1, '代码生成器 API', '更新数据库的表和字段定义', 3, '', '', 'PUT', '/api/tool/codegen/update', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.tool.controller.codegen.ToolCodegenController.updateCodegen(ToolCodegenUpdateReqVO)', '{\"updateReqVO\":{\"table\":{\"importType\":2,\"tableName\":\"sys_job\",\"tableComment\":\"定时任务调度表\",\"remark\":null,\"moduleName\":\"system\",\"businessName\":\"job\",\"className\":\"SysJob\",\"classComment\":\"定时任务调度\",\"author\":\"芋艿\",\"templateType\":1,\"parentMenuId\":null,\"id\":23},\"columns\":[{\"tableId\":23,\"columnName\":\"job_id\",\"columnType\":\"bigint(20)\",\"columnComment\":\"任务ID\",\"nullable\":false,\"primaryKey\":true,\"autoIncrement\":\"true\",\"ordinalPosition\":1,\"javaType\":\"Long\",\"javaField\":\"jobId\",\"dictType\":\"\",\"example\":null,\"createOperation\":false,\"updateOperation\":true,\"listOperation\":false,\"listOperationCondition\":\"=\",\"listOperationResult\":true,\"htmlType\":\"input\",\"id\":256},{\"tableId\":23,\"columnName\":\"job_name\",\"columnType\":\"varchar(64)\",\"columnComment\":\"任务名称\",\"nullable\":false,\"primaryKey\":false,\"autoIncrement\":\"false\",\"ordinalPosition\":2,\"javaType\":\"String\",\"javaField\":\"jobName\",\"dictType\":\"\",\"example\":null,\"createOperation\":true,\"updateOperation\":true,\"listOperation\":true,\"listOperationCondition\":\"LIKE\",\"listOperationResult\":true,\"htmlType\":\"input\",\"id\":257},{\"tableId\":23,\"columnName\":\"job_group\",\"columnType\":\"varchar(64)\",\"columnComment\":\"任务组名\",\"nullable\":false,\"primaryKey\":false,\"autoIncrement\":\"false\",\"ordinalPosition\":3,\"javaType\":\"String\",\"javaField\":\"jobGroup\",\"dictType\":\"\",\"example\":null,\"createOperation\":true,\"updateOperation\":true,\"listOperation\":true,\"listOperationCondition\":\"=\",\"listOperationResult\":true,\"htmlType\":\"input\",\"id\":258},{\"tableId\":23,\"columnName\":\"invoke_target\",\"columnType\":\"varchar(500)\",\"columnComment\":\"调用目标字符串\",\"nullable\":false,\"primaryKey\":false,\"autoIncrement\":\"false\",\"ordinalPosition\":4,\"javaType\":\"String\",\"javaField\":\"invokeTarget\",\"dictType\":\"\",\"example\":null,\"createOperation\":true,\"updateOperation\":true,\"listOperation\":true,\"listOperationCondition\":\"=\",\"listOperationResult\":true,\"htmlType\":\"input\",\"id\":259},{\"tableId\":23,\"columnName\":\"cron_expression\",\"columnType\":\"varchar(255)\",\"columnComment\":\"cron执行表达式\",\"nullable\":true,\"primaryKey\":false,\"autoIncrement\":\"false\",\"ordinalPosition\":5,\"javaType\":\"String\",\"javaField\":\"cronExpression\",\"dictType\":\"\",\"example\":null,\"createOperation\":true,\"updateOperation\":true,\"listOperation\":true,\"listOperationCondition\":\"=\",\"listOperationResult\":true,\"htmlType\":\"input\",\"id\":260},{\"tableId\":23,\"columnName\":\"misfire_policy\",\"columnType\":\"varchar(20)\",\"columnComment\":\"计划执行错误策略(1立即执行 2执行一次 3放弃执行)\",\"nullable\":true,\"primaryKey\":false,\"autoIncrement\":\"false\",\"ordinalPosition\":6,\"javaType\":\"String\",\"javaField\":\"misfirePolicy\",\"dictType\":\"\",\"example\":null,\"createOperation\":true,\"updateOperation\":true,\"listOperation\":true,\"listOperationCondition\":\"=\",\"listOperationResult\":true,\"htmlType\":\"input\",\"id\":261},{\"tableId\":23,\"columnName\":\"concurrent\",\"columnType\":\"char(1)\",\"columnComment\":\"是否并发执行(0允许 1禁止)\",\"nullable\":true,\"primaryKey\":false,\"autoIncrement\":\"false\",\"ordinalPosition\":7,\"javaType\":\"String\",\"javaField\":\"concurrent\",\"dictType\":\"\",\"example\":null,\"createOperation\":true,\"updateOperation\":true,\"listOperation\":true,\"listOperationCondition\":\"=\",\"listOperationResult\":true,\"htmlType\":\"input\",\"id\":262},{\"tableId\":23,\"columnName\":\"status\",\"columnType\":\"char(1)\",\"columnComment\":\"状态(0正常 1暂停)\",\"nullable\":true,\"primaryKey\":false,\"autoIncrement\":\"false\",\"ordinalPosition\":8,\"javaType\":\"String\",\"javaField\":\"status\",\"dictType\":\"\",\"example\":null,\"createOperation\":true,\"updateOperation\":true,\"listOperation\":true,\"listOperationCondition\":\"=\",\"listOperationResult\":true,\"htmlType\":\"radio\",\"id\":263},{\"tableId\":23,\"columnName\":\"create_by\",\"columnType\":\"varchar(64)\",\"columnComment\":\"创建者\",\"nullable\":true,\"primaryKey\":false,\"autoIncrement\":\"false\",\"ordinalPosition\":9,\"javaType\":\"String\",\"javaField\":\"createBy\",\"dictType\":\"\",\"example\":null,\"createOperation\":false,\"updateOperation\":false,\"listOperation\":false,\"listOperationCondition\":\"=\",\"listOperationResult\":false,\"htmlType\":\"input\",\"id\":264},{\"tableId\":23,\"columnName\":\"create_time\",\"columnType\":\"datetime\",\"columnComment\":\"创建时间\",\"nullable\":false,\"primaryKey\":false,\"autoIncrement\":\"false\",\"ordinalPosition\":10,\"javaType\":\"Date\",\"javaField\":\"createTime\",\"dictType\":\"\",\"example\":null,\"createOperation\":false,\"updateOperation\":false,\"listOperation\":true,\"listOperationCondition\":\"BETWEEN\",\"listOperationResult\":true,\"htmlType\":\"datetime\",\"id\":265},{\"tableId\":23,\"columnName\":\"update_by\",\"columnType\":\"varchar(64)\",\"columnComment\":\"更新者\",\"nullable\":true,\"primaryKey\":false,\"autoIncrement\":\"false\",\"ordinalPosition\":11,\"javaType\":\"String\",\"javaField\":\"updateBy\",\"dictType\":\"\",\"example\":null,\"createOperation\":false,\"updateOperation\":false,\"listOperation\":false,\"listOperationCondition\":\"=\",\"listOperationResult\":false,\"htmlType\":\"input\",\"id\":266},{\"tableId\":23,\"columnName\":\"update_time\",\"columnType\":\"datetime\",\"columnComment\":\"更新时间\",\"nullable\":true,\"primaryKey\":false,\"autoIncrement\":\"false\",\"ordinalPosition\":12,\"javaType\":\"Date\",\"javaField\":\"updateTime\",\"dictType\":\"\",\"example\":null,\"createOperation\":false,\"updateOperation\":false,\"listOperation\":false,\"listOperationCondition\":\"BETWEEN\",\"listOperationResult\":false,\"htmlType\":\"datetime\",\"id\":267},{\"tableId\":23,\"columnName\":\"remark\",\"columnType\":\"varchar(500)\",\"columnComment\":\"备注信息\",\"nullable\":true,\"primaryKey\":false,\"autoIncrement\":\"false\",\"ordinalPosition\":13,\"javaType\":\"String\",\"javaField\":\"remark\",\"dictType\":\"\",\"example\":null,\"createOperation\":true,\"updateOperation\":true,\"listOperation\":true,\"listOperationCondition\":\"=\",\"listOperationResult\":true,\"htmlType\":\"input\",\"id\":268}]}}', '2021-02-13 11:47:03', 52, 0, '', 'true', '', '2021-02-06 20:31:48', '', '2021-02-06 20:31:48', b'0'); +INSERT INTO `sys_operate_log` VALUES (172, 'b77e76ab-68ba-49e3-b50e-bea7676aa816', 1, '代码生成器 API', '基于数据库的表结构,同步数据库的表和字段定义', 3, '', '', 'PUT', '/api/tool/codegen/sync-from-db', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.tool.controller.codegen.ToolCodegenController.syncCodegenFromDB(Long)', '{\"tableId\":23}', '2021-02-13 11:58:15', 97, 500, 'ServiceException: 同步失败,不存在改变', 'null', '', '2021-02-06 20:43:00', '', '2021-02-06 20:43:00', b'0'); +INSERT INTO `sys_operate_log` VALUES (173, 'ce55bd60-24b9-4169-af30-12217135cdc0', 1, '代码生成器 API', '基于数据库的表结构,同步数据库的表和字段定义', 3, '', '', 'PUT', '/api/tool/codegen/sync-from-db', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.tool.controller.codegen.ToolCodegenController.syncCodegenFromDB(Long)', '{\"tableId\":23}', '2021-02-13 11:58:20', 60, 500, 'ServiceException: 同步失败,不存在改变', 'null', '', '2021-02-06 20:43:05', '', '2021-02-06 20:43:05', b'0'); +INSERT INTO `sys_operate_log` VALUES (174, '17ea4013-9c17-4bc0-b7dd-2472f4e7c266', 1, '代码生成器 API', '基于数据库的表结构,同步数据库的表和字段定义', 3, '', '', 'PUT', '/api/tool/codegen/sync-from-db', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.tool.controller.codegen.ToolCodegenController.syncCodegenFromDB(Long)', '{\"tableId\":23}', '2021-02-13 11:58:24', 53, 500, 'ServiceException: 同步失败,不存在改变', 'null', '', '2021-02-06 20:43:09', '', '2021-02-06 20:43:09', b'0'); +INSERT INTO `sys_operate_log` VALUES (175, '15dbf972-e47f-46ba-9260-eddd030100de', 1, '代码生成器 API', '基于数据库的表结构,同步数据库的表和字段定义', 3, '', '', 'PUT', '/api/tool/codegen/sync-from-db', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.tool.controller.codegen.ToolCodegenController.syncCodegenFromDB(Long)', '{\"tableId\":23}', '2021-02-13 11:58:31', 50, 500, 'ServiceException: 同步失败,不存在改变', 'null', '', '2021-02-06 20:43:16', '', '2021-02-06 20:43:16', b'0'); +INSERT INTO `sys_operate_log` VALUES (176, '6cc70339-361c-442c-8cb3-a1028e02f3f7', 1, '代码生成器 API', '基于数据库的表结构,同步数据库的表和字段定义', 3, '', '', 'PUT', '/api/tool/codegen/sync-from-db', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.tool.controller.codegen.ToolCodegenController.syncCodegenFromDB(Long)', '{\"tableId\":23}', '2021-02-13 11:59:39', 47, 500, 'ServiceException: 同步失败,不存在改变', 'null', '', '2021-02-06 20:44:24', '', '2021-02-06 20:44:24', b'0'); +INSERT INTO `sys_operate_log` VALUES (177, '689d136f-5e0b-4241-8328-de2d19e0398d', 1, '代码生成器 API', '基于数据库的表结构,同步数据库的表和字段定义', 3, '', '', 'PUT', '/api/tool/codegen/sync-from-db', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.tool.controller.codegen.ToolCodegenController.syncCodegenFromDB(Long)', '{\"tableId\":23}', '2021-02-13 11:59:52', 42, 500, 'ServiceException: 同步失败,不存在改变', 'null', '', '2021-02-06 20:44:37', '', '2021-02-06 20:44:37', b'0'); +INSERT INTO `sys_operate_log` VALUES (178, '3be6a4d2-260f-438c-b242-6cde76d592a2', 1, '代码生成器 API', '基于数据库的表结构,同步数据库的表和字段定义', 3, '', '', 'PUT', '/api/tool/codegen/sync-from-db', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.tool.controller.codegen.ToolCodegenController.syncCodegenFromDB(Long)', '{\"tableId\":23}', '2021-02-13 12:00:04', 44, 500, 'ServiceException: 同步失败,不存在改变', 'null', '', '2021-02-06 20:44:50', '', '2021-02-06 20:44:50', b'0'); +INSERT INTO `sys_operate_log` VALUES (179, '26b5ad49-87df-4701-8264-4417f969e90e', 1, '代码生成器 API', '基于数据库的表结构,同步数据库的表和字段定义', 3, '', '', 'PUT', '/api/tool/codegen/sync-from-db', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.tool.controller.codegen.ToolCodegenController.syncCodegenFromDB(Long)', '{\"tableId\":23}', '2021-02-13 12:00:23', 45, 500, 'ServiceException: 同步失败,不存在改变', 'null', '', '2021-02-06 20:45:08', '', '2021-02-06 20:45:08', b'0'); +INSERT INTO `sys_operate_log` VALUES (180, 'd4728532-a693-40b9-8f9c-a7484543a968', 1, '代码生成器 API', '基于数据库的表结构,同步数据库的表和字段定义', 3, '', '', 'PUT', '/api/tool/codegen/sync-from-db', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.tool.controller.codegen.ToolCodegenController.syncCodegenFromDB(Long)', '{\"tableId\":23}', '2021-02-13 12:00:30', 43, 500, 'ServiceException: 同步失败,不存在改变', 'null', '', '2021-02-06 20:45:15', '', '2021-02-06 20:45:15', b'0'); +INSERT INTO `sys_operate_log` VALUES (181, 'c0279634-a236-4b89-9b1c-48279e2fc605', 1, '代码生成器 API', '基于 SQL 建表语句,同步数据库的表和字段定义', 3, '', '', 'PUT', '/api/tool/codegen/sync-from-sql', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.tool.controller.codegen.ToolCodegenController.syncCodegenFromSQL(Long,String)', '{\"tableId\":23,\"sql\":\"CREATE TABLE `sys_job` (\\n `job_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT \'任务ID\',\\n `job_name` varchar(64) NOT NULL DEFAULT \'\' COMMENT \'任务名称\',\\n `job_group` varchar(64) NOT NULL DEFAULT \'DEFAULT\' COMMENT \'任务组名\',\\n `invoke_target` varchar(500) NOT NULL COMMENT \'调用目标字符串\',\\n `cron_expression` varchar(255) DEFAULT \'\' COMMENT \'cron执行表达式\',\\n `misfire_policy` varchar(20) DEFAULT \'3\' COMMENT \'计划执行错误策略(1立即执行 2执行一次 3放弃执行)\',\\n `concurrent` char(1) DEFAULT \'1\' COMMENT \'是否并发执行(0允许 1禁止)\',\\n `update_time` datetime DEFAULT NULL COMMENT \'更新时间\',\\n `remark` varchar(500) DEFAULT \'\' COMMENT \'备注信息\',\\n PRIMARY KEY (`job_id`,`job_name`,`job_group`)\\n) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT=\'定时任务调度表\';\"}', '2021-02-13 12:02:01', 2916, 0, '', 'true', '', '2021-02-06 20:46:49', '', '2021-02-06 20:46:49', b'0'); +INSERT INTO `sys_operate_log` VALUES (182, '256d3741-a234-4405-8e8f-26f00a689388', 1, '代码生成器 API', '基于 SQL 建表语句,同步数据库的表和字段定义', 3, '', '', 'PUT', '/api/tool/codegen/sync-from-sql', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.tool.controller.codegen.ToolCodegenController.syncCodegenFromSQL(Long,String)', '{\"tableId\":23,\"sql\":\"CREATE TABLE `sys_job` (\\n `job_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT \'任务ID\',\\n PRIMARY KEY (`job_id`,`job_name`,`job_group`)\\n) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT=\'定时任务调度表\';\"}', '2021-02-13 12:02:26', 3405, 0, '', 'true', '', '2021-02-06 20:47:14', '', '2021-02-06 20:47:14', b'0'); +INSERT INTO `sys_operate_log` VALUES (183, '6be484c0-ff33-4e8e-92a8-e5d644a05e0a', 1, '菜单 API', '修改菜单', 2, '', '', 'POST', '/api/system/menu/update', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.system.controller.permission.SysMenuController.updateMenu(SysMenuUpdateReqVO)', '{\"reqVO\":{\"name\":\"代码生成\",\"permission\":\"tool:codegen:query\",\"type\":2,\"sort\":\"2\",\"parentId\":3,\"path\":\"gen\",\"icon\":\"code\",\"component\":\"tool/codegen/index\",\"status\":0,\"id\":115}}', '2021-02-13 13:33:35', 26, 0, '', 'true', '', '2021-02-06 21:23:03', '', '2021-02-06 21:23:03', b'0'); +INSERT INTO `sys_operate_log` VALUES (184, 'd2b38b91-a7b9-4911-9423-11a991340dcc', 1, '菜单 API', '删除菜单', 2, '', '', 'POST', '/api/system/menu/delete', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.system.controller.permission.SysMenuController.deleteMenu(Long)', '{\"id\":1055}', '2021-02-13 13:33:56', 19, 0, '', 'true', '', '2021-02-06 21:23:25', '', '2021-02-06 21:23:25', b'0'); +INSERT INTO `sys_operate_log` VALUES (185, 'ed81f2b4-2a48-4c6b-89d3-7f2c85b70bfb', 1, '菜单 API', '修改菜单', 2, '', '', 'POST', '/api/system/menu/update', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.system.controller.permission.SysMenuController.updateMenu(SysMenuUpdateReqVO)', '{\"reqVO\":{\"name\":\"生成修改\",\"permission\":\"tool:codegen:update\",\"type\":3,\"sort\":\"2\",\"parentId\":115,\"path\":\"#\",\"icon\":\"#\",\"component\":\"\",\"status\":0,\"id\":1056}}', '2021-02-13 13:34:13', 9, 0, '', 'true', '', '2021-02-06 21:23:41', '', '2021-02-06 21:23:41', b'0'); +INSERT INTO `sys_operate_log` VALUES (186, '59b939ae-a0ca-4283-ba38-85576cee60c4', 1, '菜单 API', '修改菜单', 2, '', '', 'POST', '/api/system/menu/update', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.system.controller.permission.SysMenuController.updateMenu(SysMenuUpdateReqVO)', '{\"reqVO\":{\"name\":\"导入代码\",\"permission\":\"tool:codegen:create\",\"type\":3,\"sort\":\"2\",\"parentId\":115,\"path\":\"\",\"icon\":\"#\",\"component\":\"\",\"status\":0,\"id\":1058}}', '2021-02-13 13:34:22', 9, 0, '', 'true', '', '2021-02-06 21:23:50', '', '2021-02-06 21:23:50', b'0'); +INSERT INTO `sys_operate_log` VALUES (187, 'f4bb2f5b-b095-409f-ac2d-a5ec3f36e43b', 1, '菜单 API', '修改菜单', 2, '', '', 'POST', '/api/system/menu/update', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.system.controller.permission.SysMenuController.updateMenu(SysMenuUpdateReqVO)', '{\"reqVO\":{\"name\":\"生成删除\",\"permission\":\"tool:codegen:delete\",\"type\":3,\"sort\":\"3\",\"parentId\":115,\"path\":\"#\",\"icon\":\"#\",\"component\":\"\",\"status\":0,\"id\":1057}}', '2021-02-13 13:34:33', 10, 0, '', 'true', '', '2021-02-06 21:24:02', '', '2021-02-06 21:24:02', b'0'); +INSERT INTO `sys_operate_log` VALUES (188, '06d43f42-2f93-4862-9e73-92c3d0c5d8f2', 1, '菜单 API', '修改菜单', 2, '', '', 'POST', '/api/system/menu/update', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.system.controller.permission.SysMenuController.updateMenu(SysMenuUpdateReqVO)', '{\"reqVO\":{\"name\":\"预览代码\",\"permission\":\"tool:codegen:preview\",\"type\":3,\"sort\":\"4\",\"parentId\":115,\"path\":\"#\",\"icon\":\"#\",\"component\":\"\",\"status\":0,\"id\":1059}}', '2021-02-13 13:34:41', 8, 0, '', 'true', '', '2021-02-06 21:24:10', '', '2021-02-06 21:24:10', b'0'); +INSERT INTO `sys_operate_log` VALUES (189, 'a8ed61bc-55b9-429e-a43c-ce892e8d6f7e', 1, '菜单 API', '修改菜单', 2, '', '', 'POST', '/api/system/menu/update', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.system.controller.permission.SysMenuController.updateMenu(SysMenuUpdateReqVO)', '{\"reqVO\":{\"name\":\"生成代码\",\"permission\":\"tool:codegen:download\",\"type\":3,\"sort\":\"5\",\"parentId\":115,\"path\":\"\",\"icon\":\"#\",\"component\":\"\",\"status\":0,\"id\":1060}}', '2021-02-13 13:34:52', 9, 0, '', 'true', '', '2021-02-06 21:24:20', '', '2021-02-06 21:24:20', b'0'); +INSERT INTO `sys_operate_log` VALUES (190, '599ae718-60c4-4d94-a46f-2bfb73d577e8', 1, '代码生成器 API', '基于数据库的表结构,同步数据库的表和字段定义', 3, '', '', 'PUT', '/api/tool/codegen/sync-from-db', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.tool.controller.codegen.ToolCodegenController.syncCodegenFromDB(Long)', '{\"tableId\":20}', '2021-02-13 13:36:32', 83, 500, 'ServiceException: 同步失败,不存在改变', 'null', '', '2021-02-06 21:26:01', '', '2021-02-06 21:26:01', b'0'); COMMIT; -- ---------------------------- @@ -880,11 +910,13 @@ INSERT INTO `sys_user_session` VALUES ('597956fbc5b34363981530b24e1b5327', 1, '1 INSERT INTO `sys_user_session` VALUES ('5a9b736ccaa8452394c57ac82bd0815e', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-05 10:57:52', '', '2021-02-10 16:52:48', b'0'); INSERT INTO `sys_user_session` VALUES ('604ac07123a445ee8a81e58db1d6d695', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-05 16:33:53', '', '2021-02-05 16:33:53', b'0'); INSERT INTO `sys_user_session` VALUES ('64fd3d0a54754b8fa13b62d2f261b1e2', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-05 01:36:09', '', '2021-02-09 16:05:22', b'0'); +INSERT INTO `sys_user_session` VALUES ('661be9d3983e4e2eb8b346c1329015f5', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-06 19:46:45', '', '2021-02-13 12:02:29', b'0'); INSERT INTO `sys_user_session` VALUES ('73c66b705ed94e18bc53df61abc2d102', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-06 15:00:55', '', '2021-02-06 15:00:55', b'0'); INSERT INTO `sys_user_session` VALUES ('73cc914671034f3190f09f520d1b39e9', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-01-26 08:29:27', '', '2021-01-26 08:29:50', b'1'); INSERT INTO `sys_user_session` VALUES ('8331dbbca7be4348a3d2d02bf559b65e', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-05 13:29:04', '', '2021-02-10 19:06:26', b'0'); INSERT INTO `sys_user_session` VALUES ('9cc71dc2d7a24b978db1bfe0e4bae349', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-01-26 08:30:01', '', '2021-01-26 08:30:01', b'0'); INSERT INTO `sys_user_session` VALUES ('a93edff183c447719ecb627d40ca22a6', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-05 20:28:51', '', '2021-02-05 20:28:51', b'0'); +INSERT INTO `sys_user_session` VALUES ('aa22b7a5754b440e957ec47b832c9fd6', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-06 21:22:31', '', '2021-02-06 21:22:31', b'0'); INSERT INTO `sys_user_session` VALUES ('e3ad1ef8b9aa4b329855b29c7b372e8f', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-05 06:21:44', '', '2021-02-05 06:21:44', b'0'); INSERT INTO `sys_user_session` VALUES ('f881f7dc67d04cd29574657fdde32a62', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-05 08:53:20', '', '2021-02-05 08:53:20', b'0'); COMMIT; @@ -919,7 +951,7 @@ CREATE TABLE `tool_codegen_column` ( `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=243 DEFAULT CHARSET=utf8mb4 COMMENT='代码生成表字段定义'; +) ENGINE=InnoDB AUTO_INCREMENT=269 DEFAULT CHARSET=utf8mb4 COMMENT='代码生成表字段定义'; -- ---------------------------- -- Records of tool_codegen_column @@ -936,6 +968,32 @@ INSERT INTO `tool_codegen_column` VALUES (239, 20, 'create_time', 'datetime', ' INSERT INTO `tool_codegen_column` VALUES (240, 20, 'update_by', 'varchar(64)', '更新者', b'1', b'0', '0', 9, 'String', 'updateBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-06 01:33:25', '', '2021-02-06 03:26:13', b'0'); INSERT INTO `tool_codegen_column` VALUES (241, 20, 'update_time', 'datetime', '更新时间', b'0', b'0', '0', 10, 'Date', 'updateTime', '', NULL, b'0', b'0', b'0', '=', b'0', 'datetime', '', '2021-02-06 01:33:25', '', '2021-02-06 08:02:20', b'0'); INSERT INTO `tool_codegen_column` VALUES (242, 20, 'deleted', 'bit(1)', '是否删除', b'0', b'0', '0', 11, 'Boolean', 'deleted', '', NULL, b'0', b'0', b'1', '=', b'0', 'radio', '', '2021-02-06 01:33:25', '', '2021-02-06 07:52:14', b'0'); +INSERT INTO `tool_codegen_column` VALUES (243, 21, 'id', 'int(5)', '参数主键', b'0', b'1', '1', 1, 'Integer', 'id', '', NULL, b'0', b'1', b'0', '=', b'1', 'input', '', '2021-02-06 19:51:35', '', '2021-02-06 19:51:35', b'0'); +INSERT INTO `tool_codegen_column` VALUES (244, 21, 'group', 'varchar(50)', '参数分组', b'0', b'0', '0', 2, 'String', 'group', '', NULL, b'1', b'1', b'1', '=', b'1', 'input', '', '2021-02-06 19:51:35', '', '2021-02-06 19:51:35', b'0'); +INSERT INTO `tool_codegen_column` VALUES (245, 21, 'type', 'tinyint(4)', '参数类型', b'0', b'0', '0', 3, 'Integer', 'type', '', NULL, b'1', b'1', b'1', '=', b'1', 'select', '', '2021-02-06 19:51:35', '', '2021-02-06 19:51:35', b'0'); +INSERT INTO `tool_codegen_column` VALUES (246, 21, 'name', 'varchar(100)', '参数名称', b'0', b'0', '0', 4, 'String', 'name', '', NULL, b'1', b'1', b'1', 'LIKE', b'1', 'input', '', '2021-02-06 19:51:35', '', '2021-02-06 19:51:35', b'0'); +INSERT INTO `tool_codegen_column` VALUES (247, 21, 'key', 'varchar(100)', '参数键名', b'0', b'0', '0', 5, 'String', 'key', '', NULL, b'1', b'1', b'1', '=', b'1', 'input', '', '2021-02-06 19:51:35', '', '2021-02-06 19:51:35', b'0'); +INSERT INTO `tool_codegen_column` VALUES (248, 21, 'value', 'varchar(500)', '参数键值', b'0', b'0', '0', 6, 'String', 'value', '', NULL, b'1', b'1', b'1', '=', b'1', 'input', '', '2021-02-06 19:51:35', '', '2021-02-06 19:51:35', b'0'); +INSERT INTO `tool_codegen_column` VALUES (249, 21, 'sensitive', 'bit(1)', '是否敏感', b'0', b'0', '0', 7, 'Boolean', 'sensitive', '', NULL, b'1', b'1', b'1', '=', b'1', 'radio', '', '2021-02-06 19:51:35', '', '2021-02-06 19:51:35', b'0'); +INSERT INTO `tool_codegen_column` VALUES (250, 21, 'remark', 'varchar(500)', '备注', b'1', b'0', '0', 8, 'String', 'remark', '', NULL, b'1', b'1', b'1', '=', b'1', 'input', '', '2021-02-06 19:51:35', '', '2021-02-06 19:51:35', b'0'); +INSERT INTO `tool_codegen_column` VALUES (251, 21, 'create_by', 'varchar(64)', '创建者', b'1', b'0', '0', 9, 'String', 'createBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-06 19:51:35', '', '2021-02-06 19:51:35', b'0'); +INSERT INTO `tool_codegen_column` VALUES (252, 21, 'create_time', 'datetime', '创建时间', b'0', b'0', '0', 10, 'Date', 'createTime', '', NULL, b'0', b'0', b'1', 'BETWEEN', b'1', 'datetime', '', '2021-02-06 19:51:35', '', '2021-02-06 19:51:35', b'0'); +INSERT INTO `tool_codegen_column` VALUES (253, 21, 'update_by', 'varchar(64)', '更新者', b'1', b'0', '0', 11, 'String', 'updateBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-06 19:51:35', '', '2021-02-06 19:51:35', b'0'); +INSERT INTO `tool_codegen_column` VALUES (254, 21, 'update_time', 'datetime', '更新时间', b'0', b'0', '0', 12, 'Date', 'updateTime', '', NULL, b'0', b'0', b'0', 'BETWEEN', b'0', 'datetime', '', '2021-02-06 19:51:35', '', '2021-02-06 19:51:35', b'0'); +INSERT INTO `tool_codegen_column` VALUES (255, 21, 'deleted', 'bit(1)', '是否删除', b'0', b'0', '0', 13, 'Boolean', 'deleted', '', NULL, b'0', b'0', b'0', '=', b'0', 'radio', '', '2021-02-06 19:51:35', '', '2021-02-06 19:51:35', b'0'); +INSERT INTO `tool_codegen_column` VALUES (256, 23, 'job_id', 'bigint(20)', '任务ID', b'0', b'1', '1', 1, 'Long', 'jobId', '', NULL, b'0', b'1', b'0', '=', b'1', 'input', '', '2021-02-06 20:29:26', '', '2021-02-06 20:29:26', b'0'); +INSERT INTO `tool_codegen_column` VALUES (257, 23, 'job_name', 'varchar(64)', '任务名称', b'0', b'0', '0', 2, 'String', 'jobName', '', NULL, b'1', b'1', b'1', 'LIKE', b'1', 'input', '', '2021-02-06 20:29:26', '', '2021-02-06 20:47:14', b'1'); +INSERT INTO `tool_codegen_column` VALUES (258, 23, 'job_group', 'varchar(64)', '任务组名', b'0', b'0', '0', 3, 'String', 'jobGroup', '', NULL, b'1', b'1', b'1', '=', b'1', 'input', '', '2021-02-06 20:29:26', '', '2021-02-06 20:47:14', b'1'); +INSERT INTO `tool_codegen_column` VALUES (259, 23, 'invoke_target', 'varchar(500)', '调用目标字符串', b'0', b'0', '0', 4, 'String', 'invokeTarget', '', NULL, b'1', b'1', b'1', '=', b'1', 'input', '', '2021-02-06 20:29:26', '', '2021-02-06 20:47:14', b'1'); +INSERT INTO `tool_codegen_column` VALUES (260, 23, 'cron_expression', 'varchar(255)', 'cron执行表达式', b'1', b'0', '0', 5, 'String', 'cronExpression', '', NULL, b'1', b'1', b'1', '=', b'1', 'input', '', '2021-02-06 20:29:26', '', '2021-02-06 20:47:14', b'1'); +INSERT INTO `tool_codegen_column` VALUES (261, 23, 'misfire_policy', 'varchar(20)', '计划执行错误策略(1立即执行 2执行一次 3放弃执行)', b'1', b'0', '0', 6, 'String', 'misfirePolicy', '', NULL, b'1', b'1', b'1', '=', b'1', 'input', '', '2021-02-06 20:29:26', '', '2021-02-06 20:47:14', b'1'); +INSERT INTO `tool_codegen_column` VALUES (262, 23, 'concurrent', 'char(1)', '是否并发执行(0允许 1禁止)', b'1', b'0', '0', 7, 'String', 'concurrent', '', NULL, b'1', b'1', b'1', '=', b'1', 'input', '', '2021-02-06 20:29:26', '', '2021-02-06 20:47:14', b'1'); +INSERT INTO `tool_codegen_column` VALUES (263, 23, 'status', 'char(1)', '状态(0正常 1暂停)', b'1', b'0', '0', 8, 'String', 'status', '', NULL, b'1', b'1', b'1', '=', b'1', 'radio', '', '2021-02-06 20:29:26', '', '2021-02-06 20:46:49', b'1'); +INSERT INTO `tool_codegen_column` VALUES (264, 23, 'create_by', 'varchar(64)', '创建者', b'1', b'0', '0', 9, 'String', 'createBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-06 20:29:26', '', '2021-02-06 20:46:49', b'1'); +INSERT INTO `tool_codegen_column` VALUES (265, 23, 'create_time', 'datetime', '创建时间', b'0', b'0', '0', 10, 'Date', 'createTime', '', NULL, b'0', b'0', b'1', 'BETWEEN', b'1', 'datetime', '', '2021-02-06 20:29:26', '', '2021-02-06 20:46:49', b'1'); +INSERT INTO `tool_codegen_column` VALUES (266, 23, 'update_by', 'varchar(64)', '更新者', b'1', b'0', '0', 11, 'String', 'updateBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-06 20:29:26', '', '2021-02-06 20:46:49', b'1'); +INSERT INTO `tool_codegen_column` VALUES (267, 23, 'update_time', 'datetime', '更新时间', b'1', b'0', '0', 12, 'Date', 'updateTime', '', NULL, b'0', b'0', b'0', 'BETWEEN', b'0', 'datetime', '', '2021-02-06 20:29:26', '', '2021-02-06 20:47:14', b'1'); +INSERT INTO `tool_codegen_column` VALUES (268, 23, 'remark', 'varchar(500)', '备注信息', b'1', b'0', '0', 13, 'String', 'remark', '', NULL, b'1', b'1', b'1', '=', b'1', 'input', '', '2021-02-06 20:29:26', '', '2021-02-06 20:47:14', b'1'); COMMIT; -- ---------------------------- @@ -944,6 +1002,7 @@ COMMIT; DROP TABLE IF EXISTS `tool_codegen_table`; CREATE TABLE `tool_codegen_table` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号', + `import_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '导入类型', `table_name` varchar(200) NOT NULL DEFAULT '' COMMENT '表名称', `table_comment` varchar(500) NOT NULL DEFAULT '' COMMENT '表描述', `remark` varchar(500) DEFAULT NULL COMMENT '备注', @@ -952,23 +1011,24 @@ CREATE TABLE `tool_codegen_table` ( `class_name` varchar(100) NOT NULL DEFAULT '' COMMENT '类名称', `class_comment` varchar(50) NOT NULL COMMENT '类描述', `author` varchar(50) NOT NULL COMMENT '作者', - `template_type` tinyint(4) NOT NULL COMMENT '模板类型', + `template_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '模板类型', `parent_menu_id` bigint(20) DEFAULT NULL COMMENT '父菜单编号', `create_by` varchar(64) DEFAULT '' COMMENT '创建者', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `update_by` varchar(64) DEFAULT '' COMMENT '更新者', `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `package_name` varchar(100) DEFAULT NULL COMMENT '生成包路径', - `options` varchar(1000) DEFAULT NULL COMMENT '其它生成选项', PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COMMENT='代码生成表定义'; +) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COMMENT='代码生成表定义'; -- ---------------------------- -- Records of tool_codegen_table -- ---------------------------- BEGIN; -INSERT INTO `tool_codegen_table` VALUES (20, 'tool_test_demo', '测试示例表', NULL, 'tool', 'test', 'ToolTestDemo', '测试示例', '芋艿', 1, 3, '', '2021-02-06 01:33:25', '', '2021-02-06 12:34:17', b'0', NULL, NULL); +INSERT INTO `tool_codegen_table` VALUES (20, 1, 'tool_test_demo', '测试示例表', NULL, 'tool', 'test', 'ToolTestDemo', '测试示例', '芋艿', 1, 3, '', '2021-02-06 01:33:25', '', '2021-02-06 12:34:17', b'0'); +INSERT INTO `tool_codegen_table` VALUES (21, 1, 'inf_config', '参数配置表', NULL, 'infra', 'config', 'InfConfig', '参数配置', '芋艿', 1, NULL, '', '2021-02-06 19:51:35', '', '2021-02-06 19:51:35', b'0'); +INSERT INTO `tool_codegen_table` VALUES (22, 2, 'sys_file', '文件表\n', NULL, 'system', 'file', 'SysFile', '文件', '芋艿', 1, NULL, '', '2021-02-06 20:28:34', '', '2021-02-06 20:28:34', b'0'); +INSERT INTO `tool_codegen_table` VALUES (23, 2, 'sys_job', '定时任务调度表', NULL, 'system', 'job', 'SysJob', '定时任务调度', '芋艿', 1, NULL, '', '2021-02-06 20:29:26', '', '2021-02-06 20:29:26', b'0'); COMMIT; -- ---------------------------- diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenServiceImpl.java b/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenServiceImpl.java index 1dc2f285d..5d4c094bb 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenServiceImpl.java +++ b/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenServiceImpl.java @@ -56,9 +56,6 @@ public class ToolCodegenServiceImpl implements ToolCodegenService { @Resource private CodegenProperties codegenProperties; - @Resource - private ToolCodegenServiceImpl self; - private Long createCodegen0(ToolCodegenImportTypeEnum importType, ToolSchemaTableDO schemaTable, List schemaColumns) { // 校验导入的表和字段非空 @@ -99,7 +96,7 @@ public class ToolCodegenServiceImpl implements ToolCodegenService { throw exception(CODEGEN_PARSE_SQL_ERROR); } // 导入 - return self.createCodegen0(ToolCodegenImportTypeEnum.SQL, schemaTable, schemaColumns); + return this.createCodegen0(ToolCodegenImportTypeEnum.SQL, schemaTable, schemaColumns); } @Override @@ -108,7 +105,7 @@ public class ToolCodegenServiceImpl implements ToolCodegenService { ToolSchemaTableDO schemaTable = schemaTableMapper.selectByTableName(tableName); List schemaColumns = schemaColumnMapper.selectListByTableName(tableName); // 导入 - return self.createCodegen0(ToolCodegenImportTypeEnum.DB, schemaTable, schemaColumns); + return this.createCodegen0(ToolCodegenImportTypeEnum.DB, schemaTable, schemaColumns); } @Override @@ -147,7 +144,7 @@ public class ToolCodegenServiceImpl implements ToolCodegenService { List schemaColumns = schemaColumnMapper.selectListByTableName(table.getTableName()); // 执行同步 - self.syncCodegen0(tableId, schemaColumns); + this.syncCodegen0(tableId, schemaColumns); } @Override @@ -167,7 +164,7 @@ public class ToolCodegenServiceImpl implements ToolCodegenService { } // 执行同步 - self.syncCodegen0(tableId, schemaColumns); + this.syncCodegen0(tableId, schemaColumns); } private void syncCodegen0(Long tableId, List schemaColumns) { diff --git a/src/main/resources/codegen/vue/views/index.vue.vm b/src/main/resources/codegen/vue/views/index.vue.vm index 0514b00e9..78a765b6e 100644 --- a/src/main/resources/codegen/vue/views/index.vue.vm +++ b/src/main/resources/codegen/vue/views/index.vue.vm @@ -268,12 +268,12 @@ export default { this.loading = false; }); }, - // 取消按钮 + /** 取消按钮 */ cancel() { this.open = false; this.reset(); }, - // 表单重置 + /** 表单重置 */ reset() { this.form = { #foreach ($column in $columns)