Commit 2f66829a41696a7e176e837cc1ffeb0a93f46fc4

Authored by YunaiV
1 parent 95757db6

完成代码生成器~

ruoyi-common/src/main/java/com/ruoyi/generator/config/GenConfig.java deleted
1 -package com.ruoyi.generator.config;  
2 -  
3 -import org.springframework.beans.factory.annotation.Value;  
4 -import org.springframework.boot.context.properties.ConfigurationProperties;  
5 -import org.springframework.context.annotation.PropertySource;  
6 -import org.springframework.stereotype.Component;  
7 -  
8 -/**  
9 - * 读取代码生成相关配置  
10 - *  
11 - * @author ruoyi  
12 - */  
13 -@Component  
14 -@ConfigurationProperties(prefix = "gen")  
15 -@PropertySource(value = { "classpath:generator.yml" })  
16 -public class GenConfig {  
17 -  
18 - /** 作者 */  
19 - public static String author;  
20 -  
21 - /** 生成包路径 */  
22 - public static String packageName;  
23 -  
24 - /** 自动去除表前缀,默认是false */  
25 - public static boolean autoRemovePre;  
26 -  
27 - /** 表前缀(类名不会包含表前缀) */  
28 - public static String tablePrefix;  
29 -  
30 -}  
ruoyi-common/src/main/java/com/ruoyi/generator/domain/GenTable.java deleted
1 -package com.ruoyi.generator.domain;  
2 -  
3 -import java.util.List;  
4 -import javax.validation.Valid;  
5 -import javax.validation.constraints.NotBlank;  
6 -  
7 -import org.apache.commons.lang3.ArrayUtils;  
8 -import com.ruoyi.common.constant.GenConstants;  
9 -import com.ruoyi.common.core.domain.BaseEntity;  
10 -import com.ruoyi.common.utils.StringUtils;  
11 -  
12 -/**  
13 - * 业务表 gen_table  
14 - *  
15 - * @author ruoyi  
16 - */  
17 -public class GenTable extends BaseEntity {  
18 -  
19 - /**  
20 - * 生成包路径  
21 - */  
22 - @NotBlank(message = "生成包路径不能为空")  
23 - private String packageName;  
24 -  
25 - /**  
26 - * 其它生成选项  
27 - */  
28 - private String options;  
29 -  
30 - /**  
31 - * 树编码字段  
32 - */  
33 - private String treeCode;  
34 -  
35 - /**  
36 - * 树父编码字段  
37 - */  
38 - private String treeParentCode;  
39 -  
40 - /**  
41 - * 树名称字段  
42 - */  
43 - private String treeName;  
44 -  
45 -}  
ruoyi-common/src/main/java/com/ruoyi/generator/util/VelocityUtils.java deleted
1 -package com.ruoyi.generator.util;  
2 -  
3 -import java.util.ArrayList;  
4 -import java.util.HashSet;  
5 -import java.util.List;  
6 -  
7 -import org.apache.velocity.VelocityContext;  
8 -import com.alibaba.fastjson.JSONObject;  
9 -import com.ruoyi.common.constant.GenConstants;  
10 -import com.ruoyi.common.utils.DateUtils;  
11 -import com.ruoyi.common.utils.StringUtils;  
12 -import com.ruoyi.generator.domain.GenTable;  
13 -import com.ruoyi.generator.domain.GenTableColumn;  
14 -  
15 -/**  
16 - * 模板处理工具类  
17 - *  
18 - * @author ruoyi  
19 - */  
20 -public class VelocityUtils {  
21 -  
22 - /**  
23 - * 默认上级菜单,系统工具  
24 - */  
25 - private static final String DEFAULT_PARENT_MENU_ID = "3";  
26 -  
27 - /**  
28 - * 设置模板变量信息  
29 - *  
30 - * @return 模板列表  
31 - */  
32 - public static VelocityContext prepareContext(GenTable genTable) {  
33 - String moduleName = genTable.getModuleName();  
34 - String businessName = genTable.getBusinessName();  
35 - String packageName = genTable.getPackageName();  
36 - String tplCategory = genTable.getTplCategory();  
37 - String functionName = genTable.getFunctionName();  
38 -  
39 - VelocityContext velocityContext = new VelocityContext();  
40 - velocityContext.put("tplCategory", genTable.getTplCategory());  
41 - velocityContext.put("tableName", genTable.getTableName());  
42 - velocityContext.put("functionName", StringUtils.isNotEmpty(functionName) ? functionName : "【请填写功能名称】");  
43 - velocityContext.put("ClassName", genTable.getClassName());  
44 - velocityContext.put("className", StringUtils.uncapitalize(genTable.getClassName()));  
45 - velocityContext.put("moduleName", genTable.getModuleName());  
46 - velocityContext.put("BusinessName", StringUtils.capitalize(genTable.getBusinessName()));  
47 - velocityContext.put("businessName", genTable.getBusinessName());  
48 - velocityContext.put("basePackage", getPackagePrefix(packageName));  
49 - velocityContext.put("packageName", packageName);  
50 - velocityContext.put("author", genTable.getFunctionAuthor());  
51 - velocityContext.put("datetime", DateUtils.getDate());  
52 - velocityContext.put("pkColumn", genTable.getPkColumn());  
53 - velocityContext.put("importList", getImportList(genTable.getColumns()));  
54 - velocityContext.put("permissionPrefix", getPermissionPrefix(moduleName, businessName));  
55 - velocityContext.put("columns", genTable.getColumns());  
56 - velocityContext.put("table", genTable);  
57 - setMenuVelocityContext(velocityContext, genTable);  
58 - if (GenConstants.TPL_TREE.equals(tplCategory)) {  
59 - setTreeVelocityContext(velocityContext, genTable);  
60 - }  
61 - return velocityContext;  
62 - }  
63 -  
64 - public static void setTreeVelocityContext(VelocityContext context, GenTable genTable) {  
65 - String options = genTable.getOptions();  
66 - JSONObject paramsObj = JSONObject.parseObject(options);  
67 - String treeCode = getTreecode(paramsObj);  
68 - String treeParentCode = getTreeParentCode(paramsObj);  
69 - String treeName = getTreeName(paramsObj);  
70 -  
71 - context.put("treeCode", treeCode);  
72 - context.put("treeParentCode", treeParentCode);  
73 - context.put("treeName", treeName);  
74 - context.put("expandColumn", getExpandColumn(genTable));  
75 - if (paramsObj.containsKey(GenConstants.TREE_PARENT_CODE)) {  
76 - context.put("tree_parent_code", paramsObj.getString(GenConstants.TREE_PARENT_CODE));  
77 - }  
78 - if (paramsObj.containsKey(GenConstants.TREE_NAME)) {  
79 - context.put("tree_name", paramsObj.getString(GenConstants.TREE_NAME));  
80 - }  
81 - }  
82 -  
83 - /**  
84 - * 获取模板信息  
85 - *  
86 - * @return 模板列表  
87 - */  
88 - public static List<String> getTemplateList(String tplCategory) {  
89 - List<String> templates = new ArrayList<String>();  
90 - templates.add("vm/java/domain.java.vm");  
91 - templates.add("vm/java/mapper.java.vm");  
92 - templates.add("vm/java/service.java.vm");  
93 - templates.add("vm/java/serviceImpl.java.vm");  
94 - templates.add("vm/java/controller.java.vm");  
95 - templates.add("vm/xml/mapper.xml.vm");  
96 - templates.add("vm/sql/sql.vm");  
97 - templates.add("vm/js/api.js.vm");  
98 - if (GenConstants.TPL_CRUD.equals(tplCategory)) {  
99 - templates.add("vm/vue/index.vue.vm");  
100 - } else if (GenConstants.TPL_TREE.equals(tplCategory)) {  
101 - templates.add("vm/vue/index-tree.vue.vm");  
102 - }  
103 - return templates;  
104 - }  
105 -  
106 - /**  
107 - * 获取文件名  
108 - */  
109 - public static String getFileName(String template, GenTable genTable) {  
110 - // 文件名称  
111 - String fileName = "";  
112 - // 包路径  
113 - String packageName = genTable.getPackageName();  
114 - // 模块名  
115 - String moduleName = genTable.getModuleName();  
116 - // 大写类名  
117 - String className = genTable.getClassName();  
118 - // 业务名称  
119 - String businessName = genTable.getBusinessName();  
120 -  
121 - String javaPath = PROJECT_PATH + "/" + StringUtils.replace(packageName, ".", "/");  
122 - String mybatisPath = MYBATIS_PATH + "/" + moduleName;  
123 - String vuePath = "vue";  
124 -  
125 - if (template.contains("domain.java.vm")) {  
126 - fileName = StringUtils.format("{}/domain/{}.java", javaPath, className);  
127 - } else if (template.contains("mapper.java.vm")) {  
128 - fileName = StringUtils.format("{}/mapper/{}Mapper.java", javaPath, className);  
129 - } else if (template.contains("service.java.vm")) {  
130 - fileName = StringUtils.format("{}/service/I{}Service.java", javaPath, className);  
131 - } else if (template.contains("serviceImpl.java.vm")) {  
132 - fileName = StringUtils.format("{}/service/impl/{}ServiceImpl.java", javaPath, className);  
133 - } else if (template.contains("controller.java.vm")) {  
134 - fileName = StringUtils.format("{}/controller/{}Controller.java", javaPath, className);  
135 - } else if (template.contains("mapper.xml.vm")) {  
136 - fileName = StringUtils.format("{}/{}Mapper.xml", mybatisPath, className);  
137 - } else if (template.contains("sql.vm")) {  
138 - fileName = businessName + "Menu.sql";  
139 - } else if (template.contains("api.js.vm")) {  
140 - fileName = StringUtils.format("{}/api/{}/{}.js", vuePath, moduleName, businessName);  
141 - } else if (template.contains("index.vue.vm")) {  
142 - fileName = StringUtils.format("{}/views/{}/{}/index.vue", vuePath, moduleName, businessName);  
143 - } else if (template.contains("index-tree.vue.vm")) {  
144 - fileName = StringUtils.format("{}/views/{}/{}/index.vue", vuePath, moduleName, businessName);  
145 - }  
146 - return fileName;  
147 - }  
148 -  
149 - /**  
150 - * 获取包前缀  
151 - *  
152 - * @param packageName 包名称  
153 - * @return 包前缀名称  
154 - */  
155 - public static String getPackagePrefix(String packageName) {  
156 - int lastIndex = packageName.lastIndexOf(".");  
157 - String basePackage = StringUtils.substring(packageName, 0, lastIndex);  
158 - return basePackage;  
159 - }  
160 -  
161 - /**  
162 - * 根据列类型获取导入包  
163 - *  
164 - * @param columns 列集合  
165 - * @return 返回需要导入的包列表  
166 - */  
167 - public static HashSet<String> getImportList(List<GenTableColumn> columns) {  
168 - HashSet<String> importList = new HashSet<String>();  
169 - for (GenTableColumn column : columns) {  
170 - if (!column.isSuperColumn() && GenConstants.TYPE_DATE.equals(column.getJavaType())) {  
171 - importList.add("java.util.Date");  
172 - importList.add("com.fasterxml.jackson.annotation.JsonFormat");  
173 - } else if (!column.isSuperColumn() && GenConstants.TYPE_BIGDECIMAL.equals(column.getJavaType())) {  
174 - importList.add("java.math.BigDecimal");  
175 - }  
176 - }  
177 - return importList;  
178 - }  
179 -  
180 - /**  
181 - * 获取权限前缀  
182 - *  
183 - * @param moduleName 模块名称  
184 - * @param businessName 业务名称  
185 - * @return 返回权限前缀  
186 - */  
187 - public static String getPermissionPrefix(String moduleName, String businessName) {  
188 - return StringUtils.format("{}:{}", moduleName, businessName);  
189 - }  
190 -  
191 - /**  
192 - * 获取上级菜单ID字段  
193 - *  
194 - * @param paramsObj 生成其他选项  
195 - * @return 上级菜单ID字段  
196 - */  
197 - public static String getParentMenuId(JSONObject paramsObj) {  
198 - if (StringUtils.isNotEmpty(paramsObj) && paramsObj.containsKey(GenConstants.PARENT_MENU_ID)) {  
199 - return paramsObj.getString(GenConstants.PARENT_MENU_ID);  
200 - }  
201 - return DEFAULT_PARENT_MENU_ID;  
202 - }  
203 -  
204 - /**  
205 - * 获取树编码  
206 - *  
207 - * @param paramsObj 生成其他选项  
208 - * @return 树编码  
209 - */  
210 - public static String getTreecode(JSONObject paramsObj) {  
211 - if (paramsObj.containsKey(GenConstants.TREE_CODE)) {  
212 - return StringUtils.toCamelCase(paramsObj.getString(GenConstants.TREE_CODE));  
213 - }  
214 - return StringUtils.EMPTY;  
215 - }  
216 -  
217 - /**  
218 - * 获取树父编码  
219 - *  
220 - * @param paramsObj 生成其他选项  
221 - * @return 树父编码  
222 - */  
223 - public static String getTreeParentCode(JSONObject paramsObj) {  
224 - if (paramsObj.containsKey(GenConstants.TREE_PARENT_CODE)) {  
225 - return StringUtils.toCamelCase(paramsObj.getString(GenConstants.TREE_PARENT_CODE));  
226 - }  
227 - return StringUtils.EMPTY;  
228 - }  
229 -  
230 - /**  
231 - * 获取树名称  
232 - *  
233 - * @param paramsObj 生成其他选项  
234 - * @return 树名称  
235 - */  
236 - public static String getTreeName(JSONObject paramsObj) {  
237 - if (paramsObj.containsKey(GenConstants.TREE_NAME)) {  
238 - return StringUtils.toCamelCase(paramsObj.getString(GenConstants.TREE_NAME));  
239 - }  
240 - return StringUtils.EMPTY;  
241 - }  
242 -  
243 - /**  
244 - * 获取需要在哪一列上面显示展开按钮  
245 - *  
246 - * @param genTable 业务表对象  
247 - * @return 展开按钮列序号  
248 - */  
249 - public static int getExpandColumn(GenTable genTable) {  
250 - String options = genTable.getOptions();  
251 - JSONObject paramsObj = JSONObject.parseObject(options);  
252 - String treeName = paramsObj.getString(GenConstants.TREE_NAME);  
253 - int num = 0;  
254 - for (GenTableColumn column : genTable.getColumns()) {  
255 - if (column.isList()) {  
256 - num++;  
257 - String columnName = column.getColumnName();  
258 - if (columnName.equals(treeName)) {  
259 - break;  
260 - }  
261 - }  
262 - }  
263 - return num;  
264 - }  
265 -}  
ruoyi-common/src/main/resources/generator.yml deleted
1 -# 代码生成  
2 -gen:  
3 - # 作者  
4 - author: ruoyi  
5 - # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool  
6 - packageName: com.ruoyi.system  
7 - # 自动去除表前缀,默认是false  
8 - autoRemovePre: false  
9 - # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)  
10 - tablePrefix: sys_  
11 \ No newline at end of file 0 \ No newline at end of file
ruoyi-ui/src/api/tool/codegen.js
@@ -27,13 +27,25 @@ export function updateCodegen(data) { @@ -27,13 +27,25 @@ export function updateCodegen(data) {
27 } 27 }
28 28
29 // 基于数据库的表结构,同步数据库的表和字段定义 29 // 基于数据库的表结构,同步数据库的表和字段定义
30 -export function syncCodegen(tableId) { 30 +export function syncCodegenFromDB(tableId) {
31 return request({ 31 return request({
32 - url: '/tool/codegen/sync?tableId=' + tableId, 32 + url: '/tool/codegen/sync-from-db?tableId=' + tableId,
33 method: 'put' 33 method: 'put'
34 }) 34 })
35 } 35 }
36 36
  37 +// 基于 SQL 建表语句,同步数据库的表和字段定义
  38 +export function syncCodegenFromSQL(tableId, sql) {
  39 + return request({
  40 + url: '/tool/codegen/sync-from-sql?tableId=' + tableId,
  41 + method: 'put',
  42 + headers:{
  43 + 'Content-type': 'application/x-www-form-urlencoded'
  44 + },
  45 + data: 'tableId=' + tableId + "&sql=" + sql,
  46 + })
  47 +}
  48 +
37 // 预览生成代码 49 // 预览生成代码
38 export function previewCodegen(tableId) { 50 export function previewCodegen(tableId) {
39 return request({ 51 return request({
@@ -61,9 +73,9 @@ export function getSchemaTableList(query) { @@ -61,9 +73,9 @@ export function getSchemaTableList(query) {
61 } 73 }
62 74
63 // 基于数据库的表结构,创建代码生成器的表定义 75 // 基于数据库的表结构,创建代码生成器的表定义
64 -export function createCodegenList(tableNames) { 76 +export function createCodegenListFromDB(tableNames) {
65 return request({ 77 return request({
66 - url: '/tool/codegen/create-list', 78 + url: '/tool/codegen/create-list-from-db',
67 method: 'post', 79 method: 'post',
68 headers:{ 80 headers:{
69 'Content-type': 'application/x-www-form-urlencoded' 81 'Content-type': 'application/x-www-form-urlencoded'
@@ -72,6 +84,18 @@ export function createCodegenList(tableNames) { @@ -72,6 +84,18 @@ export function createCodegenList(tableNames) {
72 }) 84 })
73 } 85 }
74 86
  87 +// 基于 SQL 建表语句,创建代码生成器的表定义
  88 +export function createCodegenListFromSQL(data) {
  89 + return request({
  90 + url: '/tool/codegen/create-list-from-sql',
  91 + method: 'post',
  92 + headers:{
  93 + 'Content-type': 'application/x-www-form-urlencoded'
  94 + },
  95 + data: 'sql=' + data.sql,
  96 + })
  97 +}
  98 +
75 // 删除数据库的表和字段定义 99 // 删除数据库的表和字段定义
76 export function deleteCodegen(tableId) { 100 export function deleteCodegen(tableId) {
77 return request({ 101 return request({
ruoyi-ui/src/router/index.js
@@ -107,13 +107,13 @@ export const constantRoutes = [ @@ -107,13 +107,13 @@ export const constantRoutes = [
107 ] 107 ]
108 }, 108 },
109 { 109 {
110 - path: '/gen', 110 + path: '/codegen',
111 component: Layout, 111 component: Layout,
112 hidden: true, 112 hidden: true,
113 children: [ 113 children: [
114 { 114 {
115 path: 'edit/:tableId(\\d+)', 115 path: 'edit/:tableId(\\d+)',
116 - component: (resolve) => require(['@/views/tool/gen/editTable'], resolve), 116 + component: (resolve) => require(['@/views/tool/codegen/editTable'], resolve),
117 name: 'GenEdit', 117 name: 'GenEdit',
118 meta: { title: '修改生成配置' } 118 meta: { title: '修改生成配置' }
119 } 119 }
ruoyi-ui/src/views/tool/gen/basicInfoForm.vue renamed to ruoyi-ui/src/views/tool/codegen/basicInfoForm.vue
1 -<template>  
2 - <el-form ref="basicInfoForm" :model="info" :rules="rules" label-width="150px">  
3 - <el-row>  
4 - <el-col :span="12">  
5 - <el-form-item label="表名称" prop="tableName">  
6 - <el-input placeholder="请输入仓库名称" v-model="info.tableName" />  
7 - </el-form-item>  
8 - </el-col>  
9 - <el-col :span="12">  
10 - <el-form-item label="表描述" prop="tableComment">  
11 - <el-input placeholder="请输入" v-model="info.tableComment" />  
12 - </el-form-item>  
13 - </el-col>  
14 -  
15 - <el-col :span="12">  
16 - <el-form-item label="实体类名称" prop="className">  
17 - <el-input placeholder="请输入" v-model="info.className" />  
18 - </el-form-item>  
19 - </el-col>  
20 - <el-col :span="12">  
21 - <el-form-item label="作者" prop="author">  
22 - <el-input placeholder="请输入" v-model="info.author" />  
23 - </el-form-item>  
24 - </el-col>  
25 - <el-col :span="24">  
26 - <el-form-item label="备注" prop="remark">  
27 - <el-input type="textarea" :rows="3" v-model="info.remark"></el-input>  
28 - </el-form-item>  
29 - </el-col>  
30 - </el-row>  
31 - </el-form>  
32 -</template>  
33 -<script>  
34 -export default {  
35 - name: "BasicInfoForm",  
36 - props: {  
37 - info: {  
38 - type: Object,  
39 - default: null  
40 - }  
41 - },  
42 - data() {  
43 - return {  
44 - rules: {  
45 - tableName: [  
46 - { required: true, message: "请输入表名称", trigger: "blur" }  
47 - ],  
48 - tableComment: [  
49 - { required: true, message: "请输入表描述", trigger: "blur" }  
50 - ],  
51 - className: [  
52 - { required: true, message: "请输入实体类名称", trigger: "blur" }  
53 - ],  
54 - author: [  
55 - { required: true, message: "请输入作者", trigger: "blur" }  
56 - ]  
57 - }  
58 - };  
59 - }  
60 -};  
61 -</script> 1 +<template>
  2 + <el-form ref="basicInfoForm" :model="info" :rules="rules" label-width="150px">
  3 + <el-row>
  4 + <el-col :span="12">
  5 + <el-form-item label="表名称" prop="tableName">
  6 + <el-input placeholder="请输入仓库名称" v-model="info.tableName" />
  7 + </el-form-item>
  8 + </el-col>
  9 + <el-col :span="12">
  10 + <el-form-item label="表描述" prop="tableComment">
  11 + <el-input placeholder="请输入" v-model="info.tableComment" />
  12 + </el-form-item>
  13 + </el-col>
  14 +
  15 + <el-col :span="12">
  16 + <el-form-item label="实体类名称" prop="className">
  17 + <el-input placeholder="请输入" v-model="info.className" />
  18 + </el-form-item>
  19 + </el-col>
  20 + <el-col :span="12">
  21 + <el-form-item label="作者" prop="author">
  22 + <el-input placeholder="请输入" v-model="info.author" />
  23 + </el-form-item>
  24 + </el-col>
  25 + <el-col :span="24">
  26 + <el-form-item label="备注" prop="remark">
  27 + <el-input type="textarea" :rows="3" v-model="info.remark"></el-input>
  28 + </el-form-item>
  29 + </el-col>
  30 + </el-row>
  31 + </el-form>
  32 +</template>
  33 +<script>
  34 +export default {
  35 + name: "BasicInfoForm",
  36 + props: {
  37 + info: {
  38 + type: Object,
  39 + default: null
  40 + }
  41 + },
  42 + data() {
  43 + return {
  44 + rules: {
  45 + tableName: [
  46 + { required: true, message: "请输入表名称", trigger: "blur" }
  47 + ],
  48 + tableComment: [
  49 + { required: true, message: "请输入表描述", trigger: "blur" }
  50 + ],
  51 + className: [
  52 + { required: true, message: "请输入实体类名称", trigger: "blur" }
  53 + ],
  54 + author: [
  55 + { required: true, message: "请输入作者", trigger: "blur" }
  56 + ]
  57 + }
  58 + };
  59 + }
  60 +};
  61 +</script>
ruoyi-ui/src/views/tool/gen/editTable.vue renamed to ruoyi-ui/src/views/tool/codegen/editTable.vue
1 -<template>  
2 - <el-card>  
3 - <el-tabs v-model="activeName">  
4 - <el-tab-pane label="基本信息" name="basic">  
5 - <basic-info-form ref="basicInfo" :info="table" />  
6 - </el-tab-pane>  
7 - <el-tab-pane label="字段信息" name="cloum">  
8 - <el-table ref="dragTable" :data="columns" row-key="columnId" :max-height="tableHeight">  
9 - <el-table-column  
10 - label="字段列名"  
11 - prop="columnName"  
12 - min-width="10%"  
13 - :show-overflow-tooltip="true"  
14 - />  
15 - <el-table-column label="字段描述" min-width="10%">  
16 - <template slot-scope="scope">  
17 - <el-input v-model="scope.row.columnComment"></el-input>  
18 - </template>  
19 - </el-table-column>  
20 - <el-table-column  
21 - label="物理类型"  
22 - prop="columnType"  
23 - min-width="10%"  
24 - :show-overflow-tooltip="true"  
25 - />  
26 - <el-table-column label="Java类型" min-width="11%">  
27 - <template slot-scope="scope">  
28 - <el-select v-model="scope.row.javaType">  
29 - <el-option label="Long" value="Long" />  
30 - <el-option label="String" value="String" />  
31 - <el-option label="Integer" value="Integer" />  
32 - <el-option label="Double" value="Double" />  
33 - <el-option label="BigDecimal" value="BigDecimal" />  
34 - <el-option label="Date" value="Date" />  
35 - </el-select>  
36 - </template>  
37 - </el-table-column>  
38 - <el-table-column label="java属性" min-width="10%">  
39 - <template slot-scope="scope">  
40 - <el-input v-model="scope.row.javaField"></el-input>  
41 - </template>  
42 - </el-table-column>  
43 - <el-table-column label="插入" min-width="4%">  
44 - <template slot-scope="scope">  
45 - <el-checkbox true-label="true" false-label="false" v-model="scope.row.createOperation"></el-checkbox>  
46 - </template>  
47 - </el-table-column>  
48 - <el-table-column label="编辑" min-width="4%">  
49 - <template slot-scope="scope">  
50 - <el-checkbox true-label="true" false-label="false" v-model="scope.row.updateOperation"></el-checkbox>  
51 - </template>  
52 - </el-table-column>  
53 - <el-table-column label="列表" min-width="4%">  
54 - <template slot-scope="scope">  
55 - <el-checkbox true-label="true" false-label="false" v-model="scope.row.listOperationResult"></el-checkbox>  
56 - </template>  
57 - </el-table-column>  
58 - <el-table-column label="查询" min-width="4%">  
59 - <template slot-scope="scope">  
60 - <el-checkbox true-label="true" false-label="false" v-model="scope.row.listOperation"></el-checkbox>  
61 - </template>  
62 - </el-table-column>  
63 - <el-table-column label="查询方式" min-width="10%">  
64 - <template slot-scope="scope">  
65 - <el-select v-model="scope.row.listOperationCondition">  
66 - <el-option label="=" value="=" />  
67 - <el-option label="!=" value="!=" />  
68 - <el-option label=">" value=">" />  
69 - <el-option label=">=" value=">=" />  
70 - <el-option label="<" value="<>" />  
71 - <el-option label="<=" value="<=" />  
72 - <el-option label="LIKE" value="LIKE" />  
73 - <el-option label="BETWEEN" value="BETWEEN" />  
74 - </el-select>  
75 - </template>  
76 - </el-table-column>  
77 - <el-table-column label="允许空" min-width="5%">  
78 - <template slot-scope="scope">  
79 - <el-checkbox true-label="true" false-label="false" v-model="scope.row.nullable"></el-checkbox>  
80 - </template>  
81 - </el-table-column>  
82 - <el-table-column label="显示类型" min-width="12%">  
83 - <template slot-scope="scope">  
84 - <el-select v-model="scope.row.htmlType">  
85 - <el-option label="文本框" value="input" />  
86 - <el-option label="文本域" value="textarea" />  
87 - <el-option label="下拉框" value="select" />  
88 - <el-option label="单选框" value="radio" />  
89 - <el-option label="复选框" value="checkbox" />  
90 - <el-option label="日期控件" value="datetime" />  
91 - <el-option label="图片上传" value="imageUpload" />  
92 - <el-option label="文件上传" value="fileUpload" />  
93 - <el-option label="富文本控件" value="editor" />  
94 - </el-select>  
95 - </template>  
96 - </el-table-column>  
97 - <el-table-column label="字典类型" min-width="12%">  
98 - <template slot-scope="scope">  
99 - <el-select v-model="scope.row.dictType" clearable filterable placeholder="请选择">  
100 - <el-option  
101 - v-for="dict in dictOptions"  
102 - :key="dict.id"  
103 - :label="dict.name"  
104 - :value="dict.type"  
105 - />  
106 - </el-select>  
107 - </template>  
108 - </el-table-column>  
109 - <el-table-column label="示例" min-width="10%">  
110 - <template slot-scope="scope">  
111 - <el-input v-model="scope.row.example"></el-input>  
112 - </template>  
113 - </el-table-column>  
114 - </el-table>  
115 - </el-tab-pane>  
116 - <el-tab-pane label="生成信息" name="genInfo">  
117 - <gen-info-form ref="genInfo" :info="table" :tables="tables" :menus="menus"/>  
118 - </el-tab-pane>  
119 - </el-tabs>  
120 - <el-form label-width="100px">  
121 - <el-form-item style="text-align: center;margin-left:-100px;margin-top:10px;">  
122 - <el-button type="primary" @click="submitForm()">提交</el-button>  
123 - <el-button @click="close()">返回</el-button>  
124 - </el-form-item>  
125 - </el-form>  
126 - </el-card>  
127 -</template>  
128 -<script>  
129 -import { getCodegenDetail, updateCodegen } from "@/api/tool/codegen";  
130 -import { listAllSimple as listAllSimpleDictType } from "@/api/system/dict/type";  
131 -import { listMenu as getMenuTreeselect } from "@/api/system/menu";  
132 -import { listSimpleMenus } from "@/api/system/menu";  
133 -import basicInfoForm from "./basicInfoForm";  
134 -import genInfoForm from "./genInfoForm";  
135 -import Sortable from 'sortablejs'  
136 -  
137 -export default {  
138 - name: "GenEdit",  
139 - components: {  
140 - basicInfoForm,  
141 - genInfoForm  
142 - },  
143 - data() {  
144 - return {  
145 - // 选中选项卡的 name  
146 - activeName: "cloum",  
147 - // 表格的高度  
148 - tableHeight: document.documentElement.scrollHeight - 245 + "px",  
149 - // 表信息  
150 - tables: [],  
151 - // 表列信息  
152 - columns: [],  
153 - // 字典信息  
154 - dictOptions: [],  
155 - // 菜单信息  
156 - menus: [],  
157 - // 表详细信息  
158 - table: {}  
159 - };  
160 - },  
161 - created() {  
162 - const tableId = this.$route.params && this.$route.params.tableId;  
163 - if (tableId) {  
164 - // 获取表详细信息  
165 - getCodegenDetail(tableId).then(res => {  
166 - this.table = res.data.table;  
167 - this.columns = res.data.columns;  
168 - });  
169 - /** 查询字典下拉列表 */  
170 - listAllSimpleDictType().then(response => {  
171 - this.dictOptions = response.data;  
172 - });  
173 - /** 查询菜单下拉列表 */  
174 - listSimpleMenus().then(response => {  
175 - this.menus = [];  
176 - this.menus.push(...this.handleTree(response.data, "id"));  
177 - });  
178 - }  
179 - },  
180 - methods: {  
181 - /** 提交按钮 */  
182 - submitForm() {  
183 - const basicForm = this.$refs.basicInfo.$refs.basicInfoForm;  
184 - const genForm = this.$refs.genInfo.$refs.genInfoForm;  
185 - Promise.all([basicForm, genForm].map(this.getFormPromise)).then(res => {  
186 - const validateResult = res.every(item => !!item);  
187 - if (validateResult) {  
188 - const genTable = {};  
189 - genTable.table = Object.assign({}, basicForm.model, genForm.model);  
190 - genTable.columns = this.columns;  
191 - genTable.params = {  
192 - treeCode: genTable.treeCode,  
193 - treeName: genTable.treeName,  
194 - treeParentCode: genTable.treeParentCode,  
195 - parentMenuId: genTable.parentMenuId  
196 - };  
197 - updateCodegen(genTable).then(res => {  
198 - this.msgSuccess("修改成功!");  
199 - this.close();  
200 - });  
201 - } else {  
202 - this.msgError("表单校验未通过,请重新检查提交内容");  
203 - }  
204 - });  
205 - },  
206 - getFormPromise(form) {  
207 - return new Promise(resolve => {  
208 - form.validate(res => {  
209 - resolve(res);  
210 - });  
211 - });  
212 - },  
213 - /** 关闭按钮 */  
214 - close() {  
215 - this.$store.dispatch("tagsView/delView", this.$route);  
216 - this.$router.push({ path: "/tool/gen", query: { t: Date.now()}})  
217 - }  
218 - },  
219 - mounted() {  
220 - const el = this.$refs.dragTable.$el.querySelectorAll(".el-table__body-wrapper > table > tbody")[0];  
221 - const sortable = Sortable.create(el, {  
222 - handle: ".allowDrag",  
223 - onEnd: evt => {  
224 - const targetRow = this.columns.splice(evt.oldIndex, 1)[0];  
225 - this.columns.splice(evt.newIndex, 0, targetRow);  
226 - for (let index in this.columns) {  
227 - this.columns[index].sort = parseInt(index) + 1;  
228 - }  
229 - }  
230 - });  
231 - }  
232 -};  
233 -</script> 1 +<template>
  2 + <el-card>
  3 + <el-tabs v-model="activeName">
  4 + <el-tab-pane label="基本信息" name="basic">
  5 + <basic-info-form ref="basicInfo" :info="table" />
  6 + </el-tab-pane>
  7 + <el-tab-pane label="字段信息" name="cloum">
  8 + <el-table ref="dragTable" :data="columns" row-key="columnId" :max-height="tableHeight">
  9 + <el-table-column
  10 + label="字段列名"
  11 + prop="columnName"
  12 + min-width="10%"
  13 + :show-overflow-tooltip="true"
  14 + />
  15 + <el-table-column label="字段描述" min-width="10%">
  16 + <template slot-scope="scope">
  17 + <el-input v-model="scope.row.columnComment"></el-input>
  18 + </template>
  19 + </el-table-column>
  20 + <el-table-column
  21 + label="物理类型"
  22 + prop="columnType"
  23 + min-width="10%"
  24 + :show-overflow-tooltip="true"
  25 + />
  26 + <el-table-column label="Java类型" min-width="11%">
  27 + <template slot-scope="scope">
  28 + <el-select v-model="scope.row.javaType">
  29 + <el-option label="Long" value="Long" />
  30 + <el-option label="String" value="String" />
  31 + <el-option label="Integer" value="Integer" />
  32 + <el-option label="Double" value="Double" />
  33 + <el-option label="BigDecimal" value="BigDecimal" />
  34 + <el-option label="Date" value="Date" />
  35 + </el-select>
  36 + </template>
  37 + </el-table-column>
  38 + <el-table-column label="java属性" min-width="10%">
  39 + <template slot-scope="scope">
  40 + <el-input v-model="scope.row.javaField"></el-input>
  41 + </template>
  42 + </el-table-column>
  43 + <el-table-column label="插入" min-width="4%">
  44 + <template slot-scope="scope">
  45 + <el-checkbox true-label="true" false-label="false" v-model="scope.row.createOperation"></el-checkbox>
  46 + </template>
  47 + </el-table-column>
  48 + <el-table-column label="编辑" min-width="4%">
  49 + <template slot-scope="scope">
  50 + <el-checkbox true-label="true" false-label="false" v-model="scope.row.updateOperation"></el-checkbox>
  51 + </template>
  52 + </el-table-column>
  53 + <el-table-column label="列表" min-width="4%">
  54 + <template slot-scope="scope">
  55 + <el-checkbox true-label="true" false-label="false" v-model="scope.row.listOperationResult"></el-checkbox>
  56 + </template>
  57 + </el-table-column>
  58 + <el-table-column label="查询" min-width="4%">
  59 + <template slot-scope="scope">
  60 + <el-checkbox true-label="true" false-label="false" v-model="scope.row.listOperation"></el-checkbox>
  61 + </template>
  62 + </el-table-column>
  63 + <el-table-column label="查询方式" min-width="10%">
  64 + <template slot-scope="scope">
  65 + <el-select v-model="scope.row.listOperationCondition">
  66 + <el-option label="=" value="=" />
  67 + <el-option label="!=" value="!=" />
  68 + <el-option label=">" value=">" />
  69 + <el-option label=">=" value=">=" />
  70 + <el-option label="<" value="<>" />
  71 + <el-option label="<=" value="<=" />
  72 + <el-option label="LIKE" value="LIKE" />
  73 + <el-option label="BETWEEN" value="BETWEEN" />
  74 + </el-select>
  75 + </template>
  76 + </el-table-column>
  77 + <el-table-column label="允许空" min-width="5%">
  78 + <template slot-scope="scope">
  79 + <el-checkbox true-label="true" false-label="false" v-model="scope.row.nullable"></el-checkbox>
  80 + </template>
  81 + </el-table-column>
  82 + <el-table-column label="显示类型" min-width="12%">
  83 + <template slot-scope="scope">
  84 + <el-select v-model="scope.row.htmlType">
  85 + <el-option label="文本框" value="input" />
  86 + <el-option label="文本域" value="textarea" />
  87 + <el-option label="下拉框" value="select" />
  88 + <el-option label="单选框" value="radio" />
  89 + <el-option label="复选框" value="checkbox" />
  90 + <el-option label="日期控件" value="datetime" />
  91 + <el-option label="图片上传" value="imageUpload" />
  92 + <el-option label="文件上传" value="fileUpload" />
  93 + <el-option label="富文本控件" value="editor" />
  94 + </el-select>
  95 + </template>
  96 + </el-table-column>
  97 + <el-table-column label="字典类型" min-width="12%">
  98 + <template slot-scope="scope">
  99 + <el-select v-model="scope.row.dictType" clearable filterable placeholder="请选择">
  100 + <el-option
  101 + v-for="dict in dictOptions"
  102 + :key="dict.id"
  103 + :label="dict.name"
  104 + :value="dict.type"
  105 + />
  106 + </el-select>
  107 + </template>
  108 + </el-table-column>
  109 + <el-table-column label="示例" min-width="10%">
  110 + <template slot-scope="scope">
  111 + <el-input v-model="scope.row.example"></el-input>
  112 + </template>
  113 + </el-table-column>
  114 + </el-table>
  115 + </el-tab-pane>
  116 + <el-tab-pane label="生成信息" name="genInfo">
  117 + <gen-info-form ref="genInfo" :info="table" :tables="tables" :menus="menus"/>
  118 + </el-tab-pane>
  119 + </el-tabs>
  120 + <el-form label-width="100px">
  121 + <el-form-item style="text-align: center;margin-left:-100px;margin-top:10px;">
  122 + <el-button type="primary" @click="submitForm()">提交</el-button>
  123 + <el-button @click="close()">返回</el-button>
  124 + </el-form-item>
  125 + </el-form>
  126 + </el-card>
  127 +</template>
  128 +<script>
  129 +import { getCodegenDetail, updateCodegen } from "@/api/tool/codegen";
  130 +import { listAllSimple as listAllSimpleDictType } from "@/api/system/dict/type";
  131 +import { listSimpleMenus } from "@/api/system/menu";
  132 +import basicInfoForm from "./basicInfoForm";
  133 +import genInfoForm from "./genInfoForm";
  134 +import Sortable from 'sortablejs'
  135 +
  136 +export default {
  137 + name: "GenEdit",
  138 + components: {
  139 + basicInfoForm,
  140 + genInfoForm
  141 + },
  142 + data() {
  143 + return {
  144 + // 选中选项卡的 name
  145 + activeName: "cloum",
  146 + // 表格的高度
  147 + tableHeight: document.documentElement.scrollHeight - 245 + "px",
  148 + // 表信息
  149 + tables: [],
  150 + // 表列信息
  151 + columns: [],
  152 + // 字典信息
  153 + dictOptions: [],
  154 + // 菜单信息
  155 + menus: [],
  156 + // 表详细信息
  157 + table: {}
  158 + };
  159 + },
  160 + created() {
  161 + const tableId = this.$route.params && this.$route.params.tableId;
  162 + if (tableId) {
  163 + // 获取表详细信息
  164 + getCodegenDetail(tableId).then(res => {
  165 + this.table = res.data.table;
  166 + this.columns = res.data.columns;
  167 + });
  168 + /** 查询字典下拉列表 */
  169 + listAllSimpleDictType().then(response => {
  170 + this.dictOptions = response.data;
  171 + });
  172 + /** 查询菜单下拉列表 */
  173 + listSimpleMenus().then(response => {
  174 + this.menus = [];
  175 + this.menus.push(...this.handleTree(response.data, "id"));
  176 + });
  177 + }
  178 + },
  179 + methods: {
  180 + /** 提交按钮 */
  181 + submitForm() {
  182 + const basicForm = this.$refs.basicInfo.$refs.basicInfoForm;
  183 + const genForm = this.$refs.genInfo.$refs.genInfoForm;
  184 + Promise.all([basicForm, genForm].map(this.getFormPromise)).then(res => {
  185 + const validateResult = res.every(item => !!item);
  186 + if (validateResult) {
  187 + const genTable = {};
  188 + genTable.table = Object.assign({}, basicForm.model, genForm.model);
  189 + genTable.columns = this.columns;
  190 + genTable.params = {
  191 + treeCode: genTable.treeCode,
  192 + treeName: genTable.treeName,
  193 + treeParentCode: genTable.treeParentCode,
  194 + parentMenuId: genTable.parentMenuId
  195 + };
  196 + updateCodegen(genTable).then(res => {
  197 + this.msgSuccess("修改成功!");
  198 + this.close();
  199 + });
  200 + } else {
  201 + this.msgError("表单校验未通过,请重新检查提交内容");
  202 + }
  203 + });
  204 + },
  205 + getFormPromise(form) {
  206 + return new Promise(resolve => {
  207 + form.validate(res => {
  208 + resolve(res);
  209 + });
  210 + });
  211 + },
  212 + /** 关闭按钮 */
  213 + close() {
  214 + this.$store.dispatch("tagsView/delView", this.$route);
  215 + this.$router.push({ path: "/tool/gen", query: { t: Date.now()}})
  216 + }
  217 + },
  218 + mounted() {
  219 + const el = this.$refs.dragTable.$el.querySelectorAll(".el-table__body-wrapper > table > tbody")[0];
  220 + const sortable = Sortable.create(el, {
  221 + handle: ".allowDrag",
  222 + onEnd: evt => {
  223 + const targetRow = this.columns.splice(evt.oldIndex, 1)[0];
  224 + this.columns.splice(evt.newIndex, 0, targetRow);
  225 + for (let index in this.columns) {
  226 + this.columns[index].sort = parseInt(index) + 1;
  227 + }
  228 + }
  229 + });
  230 + }
  231 +};
  232 +</script>
ruoyi-ui/src/views/tool/gen/genInfoForm.vue renamed to ruoyi-ui/src/views/tool/codegen/genInfoForm.vue
1 -<template>  
2 - <el-form ref="genInfoForm" :model="info" :rules="rules" label-width="150px">  
3 - <el-row>  
4 - <el-col :span="12">  
5 - <el-form-item prop="tplCategory">  
6 - <span slot="label">生成模板</span>  
7 - <el-select v-model="info.templateType" @change="tplSelectChange">  
8 - <el-option  
9 - v-for="dict in this.getDictDatas(DICT_TYPE.TOOL_CODEGEN_TEMPLATE_TYPE)"  
10 - :key="parseInt(dict.value)"  
11 - :label="dict.label"  
12 - :value="parseInt(dict.value)"  
13 - />  
14 - </el-select>  
15 - </el-form-item>  
16 - </el-col>  
17 -  
18 -<!-- <el-col :span="12">-->  
19 -<!-- <el-form-item prop="packageName">-->  
20 -<!-- <span slot="label">-->  
21 -<!-- 生成包路径-->  
22 -<!-- <el-tooltip content="生成在哪个java包下,例如 com.ruoyi.system" placement="top">-->  
23 -<!-- <i class="el-icon-question"></i>-->  
24 -<!-- </el-tooltip>-->  
25 -<!-- </span>-->  
26 -<!-- <el-input v-model="info.packageName" />-->  
27 -<!-- </el-form-item>-->  
28 -<!-- </el-col>-->  
29 -  
30 - <el-col :span="12">  
31 - <el-form-item prop="moduleName">  
32 - <span slot="label">  
33 - 模块名  
34 - <el-tooltip content="模块名,即一级目录,例如 system、infra、tool 等等" placement="top">  
35 - <i class="el-icon-question"></i>  
36 - </el-tooltip>  
37 - </span>  
38 - <el-input v-model="info.moduleName" />  
39 - </el-form-item>  
40 - </el-col>  
41 -  
42 - <el-col :span="12">  
43 - <el-form-item prop="businessName">  
44 - <span slot="label">  
45 - 业务名  
46 - <el-tooltip content="业务名,即二级目录,例如 user、permission、dict 等等" placement="top">  
47 - <i class="el-icon-question"></i>  
48 - </el-tooltip>  
49 - </span>  
50 - <el-input v-model="info.businessName" />  
51 - </el-form-item>  
52 - </el-col>  
53 -  
54 -<!-- <el-col :span="12">-->  
55 -<!-- <el-form-item prop="businessPackage">-->  
56 -<!-- <span slot="label">-->  
57 -<!-- 业务包-->  
58 -<!-- <el-tooltip content="业务包,自定义二级目录。例如说,我们希望将 dictType 和 dictData 归类成 dict 业务" placement="top">-->  
59 -<!-- <i class="el-icon-question"></i>-->  
60 -<!-- </el-tooltip>-->  
61 -<!-- </span>-->  
62 -<!-- <el-input v-model="info.businessPackage" />-->  
63 -<!-- </el-form-item>-->  
64 -<!-- </el-col>-->  
65 -  
66 - <el-col :span="12">  
67 - <el-form-item prop="className">  
68 - <span slot="label">  
69 - 类名称  
70 - <el-tooltip content="类名称(首字母大写),例如SysUser、SysMenu、SysDictData 等等" placement="top">  
71 - <i class="el-icon-question"></i>  
72 - </el-tooltip>  
73 - </span>  
74 - <el-input v-model="info.className" />  
75 - </el-form-item>  
76 - </el-col>  
77 -  
78 - <el-col :span="12">  
79 - <el-form-item prop="classComment">  
80 - <span slot="label">  
81 - 类描述  
82 - <el-tooltip content="用作类描述,例如 用户" placement="top">  
83 - <i class="el-icon-question"></i>  
84 - </el-tooltip>  
85 - </span>  
86 - <el-input v-model="info.classComment" />  
87 - </el-form-item>  
88 - </el-col>  
89 -  
90 - <el-col :span="12">  
91 - <el-form-item>  
92 - <span slot="label">  
93 - 上级菜单  
94 - <el-tooltip content="分配到指定菜单下,例如 系统管理" placement="top">  
95 - <i class="el-icon-question"></i>  
96 - </el-tooltip>  
97 - </span>  
98 - <treeselect :append-to-body="true" v-model="info.parentMenuId" :options="menus"  
99 - :normalizer="normalizer" :show-count="true" placeholder="请选择系统菜单" />  
100 - </el-form-item>  
101 - </el-col>  
102 -  
103 - <el-col :span="24" v-if="info.genType == '1'">  
104 - <el-form-item prop="genPath">  
105 - <span slot="label">  
106 - 自定义路径  
107 - <el-tooltip content="填写磁盘绝对路径,若不填写,则生成到当前Web项目下" placement="top">  
108 - <i class="el-icon-question"></i>  
109 - </el-tooltip>  
110 - </span>  
111 - <el-input v-model="info.genPath">  
112 - <el-dropdown slot="append">  
113 - <el-button type="primary">  
114 - 最近路径快速选择  
115 - <i class="el-icon-arrow-down el-icon--right"></i>  
116 - </el-button>  
117 - <el-dropdown-menu slot="dropdown">  
118 - <el-dropdown-item @click.native="info.genPath = '/'">恢复默认的生成基础路径</el-dropdown-item>  
119 - </el-dropdown-menu>  
120 - </el-dropdown>  
121 - </el-input>  
122 - </el-form-item>  
123 - </el-col>  
124 - </el-row>  
125 -  
126 - <el-row v-show="info.tplCategory == 'tree'">  
127 - <h4 class="form-header">其他信息</h4>  
128 - <el-col :span="12">  
129 - <el-form-item>  
130 - <span slot="label">  
131 - 树编码字段  
132 - <el-tooltip content="树显示的编码字段名, 如:dept_id" placement="top">  
133 - <i class="el-icon-question"></i>  
134 - </el-tooltip>  
135 - </span>  
136 - <el-select v-model="info.treeCode" placeholder="请选择">  
137 - <el-option  
138 - v-for="(column, index) in info.columns"  
139 - :key="index"  
140 - :label="column.columnName + ':' + column.columnComment"  
141 - :value="column.columnName"  
142 - ></el-option>  
143 - </el-select>  
144 - </el-form-item>  
145 - </el-col>  
146 - <el-col :span="12">  
147 - <el-form-item>  
148 - <span slot="label">  
149 - 树父编码字段  
150 - <el-tooltip content="树显示的父编码字段名, 如:parent_Id" placement="top">  
151 - <i class="el-icon-question"></i>  
152 - </el-tooltip>  
153 - </span>  
154 - <el-select v-model="info.treeParentCode" placeholder="请选择">  
155 - <el-option  
156 - v-for="(column, index) in info.columns"  
157 - :key="index"  
158 - :label="column.columnName + ':' + column.columnComment"  
159 - :value="column.columnName"  
160 - ></el-option>  
161 - </el-select>  
162 - </el-form-item>  
163 - </el-col>  
164 - <el-col :span="12">  
165 - <el-form-item>  
166 - <span slot="label">  
167 - 树名称字段  
168 - <el-tooltip content="树节点的显示名称字段名, 如:dept_name" placement="top">  
169 - <i class="el-icon-question"></i>  
170 - </el-tooltip>  
171 - </span>  
172 - <el-select v-model="info.treeName" placeholder="请选择">  
173 - <el-option  
174 - v-for="(column, index) in info.columns"  
175 - :key="index"  
176 - :label="column.columnName + ':' + column.columnComment"  
177 - :value="column.columnName"  
178 - ></el-option>  
179 - </el-select>  
180 - </el-form-item>  
181 - </el-col>  
182 - </el-row>  
183 - <el-row v-show="info.tplCategory == 'sub'">  
184 - <h4 class="form-header">关联信息</h4>  
185 - <el-col :span="12">  
186 - <el-form-item>  
187 - <span slot="label">  
188 - 关联子表的表名  
189 - <el-tooltip content="关联子表的表名, 如:sys_user" placement="top">  
190 - <i class="el-icon-question"></i>  
191 - </el-tooltip>  
192 - </span>  
193 - <el-select v-model="info.subTableName" placeholder="请选择" @change="subSelectChange">  
194 - <el-option  
195 - v-for="(table, index) in tables"  
196 - :key="index"  
197 - :label="table.tableName + ':' + table.tableComment"  
198 - :value="table.tableName"  
199 - ></el-option>  
200 - </el-select>  
201 - </el-form-item>  
202 - </el-col>  
203 - <el-col :span="12">  
204 - <el-form-item>  
205 - <span slot="label">  
206 - 子表关联的外键名  
207 - <el-tooltip content="子表关联的外键名, 如:user_id" placement="top">  
208 - <i class="el-icon-question"></i>  
209 - </el-tooltip>  
210 - </span>  
211 - <el-select v-model="info.subTableFkName" placeholder="请选择">  
212 - <el-option  
213 - v-for="(column, index) in subColumns"  
214 - :key="index"  
215 - :label="column.columnName + ':' + column.columnComment"  
216 - :value="column.columnName"  
217 - ></el-option>  
218 - </el-select>  
219 - </el-form-item>  
220 - </el-col>  
221 - </el-row>  
222 - </el-form>  
223 -</template>  
224 -<script>  
225 -import Treeselect from "@riophae/vue-treeselect";  
226 -import "@riophae/vue-treeselect/dist/vue-treeselect.css";  
227 -  
228 -export default {  
229 - name: "BasicInfoForm",  
230 - components: { Treeselect },  
231 - props: {  
232 - info: {  
233 - type: Object,  
234 - default: null  
235 - },  
236 - tables: {  
237 - type: Array,  
238 - default: null  
239 - },  
240 - menus: {  
241 - type: Array,  
242 - default: []  
243 - },  
244 - },  
245 - data() {  
246 - return {  
247 - subColumns: [],  
248 - rules: {  
249 - templateType: [  
250 - { required: true, message: "请选择生成模板", trigger: "blur" }  
251 - ],  
252 - // packageName: [  
253 - // { required: true, message: "请输入生成包路径", trigger: "blur" }  
254 - // ],  
255 - moduleName: [  
256 - { required: true, message: "请输入生成模块名", trigger: "blur" }  
257 - ],  
258 - businessName: [  
259 - { required: true, message: "请输入生成业务名", trigger: "blur" }  
260 - ],  
261 - businessPackage: [  
262 - { required: true, message: "请输入生成业务包", trigger: "blur" }  
263 - ],  
264 - className: [  
265 - { required: true, message: "请输入生成类名称", trigger: "blur" }  
266 - ],  
267 - classComment: [  
268 - { required: true, message: "请输入生成类描述", trigger: "blur" }  
269 - ],  
270 - }  
271 - };  
272 - },  
273 - created() {},  
274 - watch: {  
275 - 'info.subTableName': function(val) {  
276 - this.setSubTableColumns(val);  
277 - }  
278 - },  
279 - methods: {  
280 - /** 转换菜单数据结构 */  
281 - normalizer(node) {  
282 - if (node.children && !node.children.length) {  
283 - delete node.children;  
284 - }  
285 - return {  
286 - id: node.id,  
287 - label: node.name,  
288 - children: node.children  
289 - };  
290 - },  
291 - /** 选择子表名触发 */  
292 - subSelectChange(value) {  
293 - this.info.subTableFkName = '';  
294 - },  
295 - /** 选择生成模板触发 */  
296 - tplSelectChange(value) {  
297 - if (value !== 1) {  
298 - // TODO 芋艿:暂时不考虑支持树形结构  
299 - this.msgError('暂时不考虑支持【树形】和【主子表】的代码生成。原因是:导致 vm 模板过于复杂,不利于胖友二次开发');  
300 - return false;  
301 - }  
302 - if(value !== 'sub') {  
303 - this.info.subTableName = '';  
304 - this.info.subTableFkName = '';  
305 - }  
306 - },  
307 - /** 设置关联外键 */  
308 - setSubTableColumns(value) {  
309 - for (var item in this.tables) {  
310 - const name = this.tables[item].tableName;  
311 - if (value === name) {  
312 - this.subColumns = this.tables[item].columns;  
313 - break;  
314 - }  
315 - }  
316 - }  
317 - }  
318 -};  
319 -</script> 1 +<template>
  2 + <el-form ref="genInfoForm" :model="info" :rules="rules" label-width="150px">
  3 + <el-row>
  4 + <el-col :span="12">
  5 + <el-form-item prop="tplCategory">
  6 + <span slot="label">生成模板</span>
  7 + <el-select v-model="info.templateType" @change="tplSelectChange">
  8 + <el-option
  9 + v-for="dict in this.getDictDatas(DICT_TYPE.TOOL_CODEGEN_TEMPLATE_TYPE)"
  10 + :key="parseInt(dict.value)"
  11 + :label="dict.label"
  12 + :value="parseInt(dict.value)"
  13 + />
  14 + </el-select>
  15 + </el-form-item>
  16 + </el-col>
  17 +
  18 +<!-- <el-col :span="12">-->
  19 +<!-- <el-form-item prop="packageName">-->
  20 +<!-- <span slot="label">-->
  21 +<!-- 生成包路径-->
  22 +<!-- <el-tooltip content="生成在哪个java包下,例如 com.ruoyi.system" placement="top">-->
  23 +<!-- <i class="el-icon-question"></i>-->
  24 +<!-- </el-tooltip>-->
  25 +<!-- </span>-->
  26 +<!-- <el-input v-model="info.packageName" />-->
  27 +<!-- </el-form-item>-->
  28 +<!-- </el-col>-->
  29 +
  30 + <el-col :span="12">
  31 + <el-form-item prop="moduleName">
  32 + <span slot="label">
  33 + 模块名
  34 + <el-tooltip content="模块名,即一级目录,例如 system、infra、tool 等等" placement="top">
  35 + <i class="el-icon-question"></i>
  36 + </el-tooltip>
  37 + </span>
  38 + <el-input v-model="info.moduleName" />
  39 + </el-form-item>
  40 + </el-col>
  41 +
  42 + <el-col :span="12">
  43 + <el-form-item prop="businessName">
  44 + <span slot="label">
  45 + 业务名
  46 + <el-tooltip content="业务名,即二级目录,例如 user、permission、dict 等等" placement="top">
  47 + <i class="el-icon-question"></i>
  48 + </el-tooltip>
  49 + </span>
  50 + <el-input v-model="info.businessName" />
  51 + </el-form-item>
  52 + </el-col>
  53 +
  54 +<!-- <el-col :span="12">-->
  55 +<!-- <el-form-item prop="businessPackage">-->
  56 +<!-- <span slot="label">-->
  57 +<!-- 业务包-->
  58 +<!-- <el-tooltip content="业务包,自定义二级目录。例如说,我们希望将 dictType 和 dictData 归类成 dict 业务" placement="top">-->
  59 +<!-- <i class="el-icon-question"></i>-->
  60 +<!-- </el-tooltip>-->
  61 +<!-- </span>-->
  62 +<!-- <el-input v-model="info.businessPackage" />-->
  63 +<!-- </el-form-item>-->
  64 +<!-- </el-col>-->
  65 +
  66 + <el-col :span="12">
  67 + <el-form-item prop="className">
  68 + <span slot="label">
  69 + 类名称
  70 + <el-tooltip content="类名称(首字母大写),例如SysUser、SysMenu、SysDictData 等等" placement="top">
  71 + <i class="el-icon-question"></i>
  72 + </el-tooltip>
  73 + </span>
  74 + <el-input v-model="info.className" />
  75 + </el-form-item>
  76 + </el-col>
  77 +
  78 + <el-col :span="12">
  79 + <el-form-item prop="classComment">
  80 + <span slot="label">
  81 + 类描述
  82 + <el-tooltip content="用作类描述,例如 用户" placement="top">
  83 + <i class="el-icon-question"></i>
  84 + </el-tooltip>
  85 + </span>
  86 + <el-input v-model="info.classComment" />
  87 + </el-form-item>
  88 + </el-col>
  89 +
  90 + <el-col :span="12">
  91 + <el-form-item>
  92 + <span slot="label">
  93 + 上级菜单
  94 + <el-tooltip content="分配到指定菜单下,例如 系统管理" placement="top">
  95 + <i class="el-icon-question"></i>
  96 + </el-tooltip>
  97 + </span>
  98 + <treeselect :append-to-body="true" v-model="info.parentMenuId" :options="menus"
  99 + :normalizer="normalizer" :show-count="true" placeholder="请选择系统菜单" />
  100 + </el-form-item>
  101 + </el-col>
  102 +
  103 + <el-col :span="24" v-if="info.genType == '1'">
  104 + <el-form-item prop="genPath">
  105 + <span slot="label">
  106 + 自定义路径
  107 + <el-tooltip content="填写磁盘绝对路径,若不填写,则生成到当前Web项目下" placement="top">
  108 + <i class="el-icon-question"></i>
  109 + </el-tooltip>
  110 + </span>
  111 + <el-input v-model="info.genPath">
  112 + <el-dropdown slot="append">
  113 + <el-button type="primary">
  114 + 最近路径快速选择
  115 + <i class="el-icon-arrow-down el-icon--right"></i>
  116 + </el-button>
  117 + <el-dropdown-menu slot="dropdown">
  118 + <el-dropdown-item @click.native="info.genPath = '/'">恢复默认的生成基础路径</el-dropdown-item>
  119 + </el-dropdown-menu>
  120 + </el-dropdown>
  121 + </el-input>
  122 + </el-form-item>
  123 + </el-col>
  124 + </el-row>
  125 +
  126 + <el-row v-show="info.tplCategory == 'tree'">
  127 + <h4 class="form-header">其他信息</h4>
  128 + <el-col :span="12">
  129 + <el-form-item>
  130 + <span slot="label">
  131 + 树编码字段
  132 + <el-tooltip content="树显示的编码字段名, 如:dept_id" placement="top">
  133 + <i class="el-icon-question"></i>
  134 + </el-tooltip>
  135 + </span>
  136 + <el-select v-model="info.treeCode" placeholder="请选择">
  137 + <el-option
  138 + v-for="(column, index) in info.columns"
  139 + :key="index"
  140 + :label="column.columnName + ':' + column.columnComment"
  141 + :value="column.columnName"
  142 + ></el-option>
  143 + </el-select>
  144 + </el-form-item>
  145 + </el-col>
  146 + <el-col :span="12">
  147 + <el-form-item>
  148 + <span slot="label">
  149 + 树父编码字段
  150 + <el-tooltip content="树显示的父编码字段名, 如:parent_Id" placement="top">
  151 + <i class="el-icon-question"></i>
  152 + </el-tooltip>
  153 + </span>
  154 + <el-select v-model="info.treeParentCode" placeholder="请选择">
  155 + <el-option
  156 + v-for="(column, index) in info.columns"
  157 + :key="index"
  158 + :label="column.columnName + ':' + column.columnComment"
  159 + :value="column.columnName"
  160 + ></el-option>
  161 + </el-select>
  162 + </el-form-item>
  163 + </el-col>
  164 + <el-col :span="12">
  165 + <el-form-item>
  166 + <span slot="label">
  167 + 树名称字段
  168 + <el-tooltip content="树节点的显示名称字段名, 如:dept_name" placement="top">
  169 + <i class="el-icon-question"></i>
  170 + </el-tooltip>
  171 + </span>
  172 + <el-select v-model="info.treeName" placeholder="请选择">
  173 + <el-option
  174 + v-for="(column, index) in info.columns"
  175 + :key="index"
  176 + :label="column.columnName + ':' + column.columnComment"
  177 + :value="column.columnName"
  178 + ></el-option>
  179 + </el-select>
  180 + </el-form-item>
  181 + </el-col>
  182 + </el-row>
  183 + <el-row v-show="info.tplCategory == 'sub'">
  184 + <h4 class="form-header">关联信息</h4>
  185 + <el-col :span="12">
  186 + <el-form-item>
  187 + <span slot="label">
  188 + 关联子表的表名
  189 + <el-tooltip content="关联子表的表名, 如:sys_user" placement="top">
  190 + <i class="el-icon-question"></i>
  191 + </el-tooltip>
  192 + </span>
  193 + <el-select v-model="info.subTableName" placeholder="请选择" @change="subSelectChange">
  194 + <el-option
  195 + v-for="(table, index) in tables"
  196 + :key="index"
  197 + :label="table.tableName + ':' + table.tableComment"
  198 + :value="table.tableName"
  199 + ></el-option>
  200 + </el-select>
  201 + </el-form-item>
  202 + </el-col>
  203 + <el-col :span="12">
  204 + <el-form-item>
  205 + <span slot="label">
  206 + 子表关联的外键名
  207 + <el-tooltip content="子表关联的外键名, 如:user_id" placement="top">
  208 + <i class="el-icon-question"></i>
  209 + </el-tooltip>
  210 + </span>
  211 + <el-select v-model="info.subTableFkName" placeholder="请选择">
  212 + <el-option
  213 + v-for="(column, index) in subColumns"
  214 + :key="index"
  215 + :label="column.columnName + ':' + column.columnComment"
  216 + :value="column.columnName"
  217 + ></el-option>
  218 + </el-select>
  219 + </el-form-item>
  220 + </el-col>
  221 + </el-row>
  222 + </el-form>
  223 +</template>
  224 +<script>
  225 +import Treeselect from "@riophae/vue-treeselect";
  226 +import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  227 +
  228 +export default {
  229 + name: "BasicInfoForm",
  230 + components: { Treeselect },
  231 + props: {
  232 + info: {
  233 + type: Object,
  234 + default: null
  235 + },
  236 + tables: {
  237 + type: Array,
  238 + default: null
  239 + },
  240 + menus: {
  241 + type: Array,
  242 + default: []
  243 + },
  244 + },
  245 + data() {
  246 + return {
  247 + subColumns: [],
  248 + rules: {
  249 + templateType: [
  250 + { required: true, message: "请选择生成模板", trigger: "blur" }
  251 + ],
  252 + // packageName: [
  253 + // { required: true, message: "请输入生成包路径", trigger: "blur" }
  254 + // ],
  255 + moduleName: [
  256 + { required: true, message: "请输入生成模块名", trigger: "blur" }
  257 + ],
  258 + businessName: [
  259 + { required: true, message: "请输入生成业务名", trigger: "blur" }
  260 + ],
  261 + businessPackage: [
  262 + { required: true, message: "请输入生成业务包", trigger: "blur" }
  263 + ],
  264 + className: [
  265 + { required: true, message: "请输入生成类名称", trigger: "blur" }
  266 + ],
  267 + classComment: [
  268 + { required: true, message: "请输入生成类描述", trigger: "blur" }
  269 + ],
  270 + }
  271 + };
  272 + },
  273 + created() {},
  274 + watch: {
  275 + 'info.subTableName': function(val) {
  276 + this.setSubTableColumns(val);
  277 + }
  278 + },
  279 + methods: {
  280 + /** 转换菜单数据结构 */
  281 + normalizer(node) {
  282 + if (node.children && !node.children.length) {
  283 + delete node.children;
  284 + }
  285 + return {
  286 + id: node.id,
  287 + label: node.name,
  288 + children: node.children
  289 + };
  290 + },
  291 + /** 选择子表名触发 */
  292 + subSelectChange(value) {
  293 + this.info.subTableFkName = '';
  294 + },
  295 + /** 选择生成模板触发 */
  296 + tplSelectChange(value) {
  297 + if (value !== 1) {
  298 + // TODO 芋艿:暂时不考虑支持树形结构
  299 + this.msgError('暂时不考虑支持【树形】和【主子表】的代码生成。原因是:导致 vm 模板过于复杂,不利于胖友二次开发');
  300 + return false;
  301 + }
  302 + if(value !== 'sub') {
  303 + this.info.subTableName = '';
  304 + this.info.subTableFkName = '';
  305 + }
  306 + },
  307 + /** 设置关联外键 */
  308 + setSubTableColumns(value) {
  309 + for (var item in this.tables) {
  310 + const name = this.tables[item].tableName;
  311 + if (value === name) {
  312 + this.subColumns = this.tables[item].columns;
  313 + break;
  314 + }
  315 + }
  316 + }
  317 + }
  318 +};
  319 +</script>
ruoyi-ui/src/views/tool/gen/importTable.vue renamed to ruoyi-ui/src/views/tool/codegen/importTable.vue
1 -<template>  
2 - <!-- 导入表 -->  
3 - <el-dialog title="导入表" :visible.sync="visible" width="800px" top="5vh" append-to-body>  
4 - <el-form :model="queryParams" ref="queryForm" :inline="true">  
5 - <el-form-item label="表名称" prop="tableName">  
6 - <el-input  
7 - v-model="queryParams.tableName"  
8 - placeholder="请输入表名称"  
9 - clearable  
10 - size="small"  
11 - @keyup.enter.native="handleQuery"  
12 - />  
13 - </el-form-item>  
14 - <el-form-item label="表描述" prop="tableComment">  
15 - <el-input  
16 - v-model="queryParams.tableComment"  
17 - placeholder="请输入表描述"  
18 - clearable  
19 - size="small"  
20 - @keyup.enter.native="handleQuery"  
21 - />  
22 - </el-form-item>  
23 - <el-form-item>  
24 - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>  
25 - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>  
26 - </el-form-item>  
27 - </el-form>  
28 - <el-row>  
29 - <el-table @row-click="clickRow" ref="table" :data="dbTableList" @selection-change="handleSelectionChange" height="260px">  
30 - <el-table-column type="selection" width="55"></el-table-column>  
31 - <el-table-column prop="tableSchema" label="数据库" :show-overflow-tooltip="true"></el-table-column>  
32 - <el-table-column prop="tableName" label="表名称" :show-overflow-tooltip="true"></el-table-column>  
33 - <el-table-column prop="tableComment" label="表描述" :show-overflow-tooltip="true"></el-table-column>  
34 - <el-table-column prop="createTime" label="创建时间">  
35 - <template slot-scope="scope">  
36 - <span>{{ parseTime(scope.row.createTime) }}</span>  
37 - </template>  
38 - </el-table-column>  
39 - </el-table>  
40 - </el-row>  
41 - <div slot="footer" class="dialog-footer">  
42 - <el-button type="primary" @click="handleImportTable">确 定</el-button>  
43 - <el-button @click="visible = false">取 消</el-button>  
44 - </div>  
45 - </el-dialog>  
46 -</template>  
47 -  
48 -<script>  
49 -import { getSchemaTableList, createCodegenList } from "@/api/tool/codegen";  
50 -export default {  
51 - data() {  
52 - return {  
53 - // 遮罩层  
54 - visible: false,  
55 - // 选中数组值  
56 - tables: [],  
57 - // 总条数  
58 - total: 0,  
59 - // 表数据  
60 - dbTableList: [],  
61 - // 查询参数  
62 - queryParams: {  
63 - tableName: undefined,  
64 - tableComment: undefined  
65 - }  
66 - };  
67 - },  
68 - methods: {  
69 - // 显示弹框  
70 - show() {  
71 - this.getList();  
72 - this.visible = true;  
73 - },  
74 - clickRow(row) {  
75 - this.$refs.table.toggleRowSelection(row);  
76 - },  
77 - // 多选框选中数据  
78 - handleSelectionChange(selection) {  
79 - this.tables = selection.map(item => item.tableName);  
80 - },  
81 - // 查询表数据  
82 - getList() {  
83 - getSchemaTableList(this.queryParams).then(res => {  
84 - this.dbTableList = res.data;  
85 - });  
86 - },  
87 - /** 搜索按钮操作 */  
88 - handleQuery() {  
89 - this.getList();  
90 - },  
91 - /** 重置按钮操作 */  
92 - resetQuery() {  
93 - this.resetForm("queryForm");  
94 - this.handleQuery();  
95 - },  
96 - /** 导入按钮操作 */  
97 - handleImportTable() {  
98 - createCodegenList(this.tables.join(",")).then(res => {  
99 - this.msgSuccess("导入成功");  
100 - this.visible = false;  
101 - this.$emit("ok");  
102 - });  
103 - }  
104 - }  
105 -};  
106 -</script> 1 +<template>
  2 + <!-- 导入表 -->
  3 + <el-dialog title="导入表" :visible.sync="visible" width="800px" top="5vh" append-to-body>
  4 + <el-form :model="queryParams" ref="queryForm" :inline="true">
  5 + <el-form-item label="表名称" prop="tableName">
  6 + <el-input
  7 + v-model="queryParams.tableName"
  8 + placeholder="请输入表名称"
  9 + clearable
  10 + size="small"
  11 + @keyup.enter.native="handleQuery"
  12 + />
  13 + </el-form-item>
  14 + <el-form-item label="表描述" prop="tableComment">
  15 + <el-input
  16 + v-model="queryParams.tableComment"
  17 + placeholder="请输入表描述"
  18 + clearable
  19 + size="small"
  20 + @keyup.enter.native="handleQuery"
  21 + />
  22 + </el-form-item>
  23 + <el-form-item>
  24 + <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  25 + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  26 + </el-form-item>
  27 + </el-form>
  28 + <el-row>
  29 + <el-table @row-click="clickRow" ref="table" :data="dbTableList" @selection-change="handleSelectionChange" height="260px">
  30 + <el-table-column type="selection" width="55"></el-table-column>
  31 + <el-table-column prop="tableSchema" label="数据库" :show-overflow-tooltip="true"></el-table-column>
  32 + <el-table-column prop="tableName" label="表名称" :show-overflow-tooltip="true"></el-table-column>
  33 + <el-table-column prop="tableComment" label="表描述" :show-overflow-tooltip="true"></el-table-column>
  34 + <el-table-column prop="createTime" label="创建时间">
  35 + <template slot-scope="scope">
  36 + <span>{{ parseTime(scope.row.createTime) }}</span>
  37 + </template>
  38 + </el-table-column>
  39 + </el-table>
  40 + </el-row>
  41 + <div slot="footer" class="dialog-footer">
  42 + <el-button type="primary" @click="handleImportTable">确 定</el-button>
  43 + <el-button @click="visible = false">取 消</el-button>
  44 + </div>
  45 + </el-dialog>
  46 +</template>
  47 +
  48 +<script>
  49 +import { getSchemaTableList, createCodegenListFromDB } from "@/api/tool/codegen";
  50 +export default {
  51 + data() {
  52 + return {
  53 + // 遮罩层
  54 + visible: false,
  55 + // 选中数组值
  56 + tables: [],
  57 + // 总条数
  58 + total: 0,
  59 + // 表数据
  60 + dbTableList: [],
  61 + // 查询参数
  62 + queryParams: {
  63 + tableName: undefined,
  64 + tableComment: undefined
  65 + }
  66 + };
  67 + },
  68 + methods: {
  69 + // 显示弹框
  70 + show() {
  71 + this.getList();
  72 + this.visible = true;
  73 + },
  74 + clickRow(row) {
  75 + this.$refs.table.toggleRowSelection(row);
  76 + },
  77 + // 多选框选中数据
  78 + handleSelectionChange(selection) {
  79 + this.tables = selection.map(item => item.tableName);
  80 + },
  81 + // 查询表数据
  82 + getList() {
  83 + getSchemaTableList(this.queryParams).then(res => {
  84 + this.dbTableList = res.data;
  85 + });
  86 + },
  87 + /** 搜索按钮操作 */
  88 + handleQuery() {
  89 + this.getList();
  90 + },
  91 + /** 重置按钮操作 */
  92 + resetQuery() {
  93 + this.resetForm("queryForm");
  94 + this.handleQuery();
  95 + },
  96 + /** 导入按钮操作 */
  97 + handleImportTable() {
  98 + createCodegenListFromDB(this.tables.join(",")).then(res => {
  99 + this.msgSuccess("导入成功");
  100 + this.visible = false;
  101 + this.$emit("ok");
  102 + });
  103 + }
  104 + }
  105 +};
  106 +</script>
ruoyi-ui/src/views/tool/gen/index.vue renamed to ruoyi-ui/src/views/tool/codegen/index.vue
1 -<template>  
2 - <div class="app-container">  
3 - <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">  
4 - <el-form-item label="表名称" prop="tableName">  
5 - <el-input  
6 - v-model="queryParams.tableName"  
7 - placeholder="请输入表名称"  
8 - clearable  
9 - size="small"  
10 - @keyup.enter.native="handleQuery"  
11 - />  
12 - </el-form-item>  
13 - <el-form-item label="表描述" prop="tableComment">  
14 - <el-input  
15 - v-model="queryParams.tableComment"  
16 - placeholder="请输入表描述"  
17 - clearable  
18 - size="small"  
19 - @keyup.enter.native="handleQuery"  
20 - />  
21 - </el-form-item>  
22 - <el-form-item label="创建时间">  
23 - <el-date-picker  
24 - v-model="dateRange"  
25 - size="small"  
26 - style="width: 240px"  
27 - value-format="yyyy-MM-dd"  
28 - type="daterange"  
29 - range-separator="-"  
30 - start-placeholder="开始日期"  
31 - end-placeholder="结束日期"  
32 - ></el-date-picker>  
33 - </el-form-item>  
34 - <el-form-item>  
35 - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>  
36 - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>  
37 - </el-form-item>  
38 - </el-form>  
39 -  
40 - <el-row :gutter="10" class="mb8">  
41 - <el-col :span="1.5">  
42 - <el-button type="info" plain icon="el-icon-upload" size="mini" @click="openImportTable" v-hasPermi="['tool:gen:import']">导入</el-button>  
43 - </el-col>  
44 - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>  
45 - </el-row>  
46 -  
47 - <el-table v-loading="loading" :data="tableList">  
48 - <el-table-column label="表名称" align="center" prop="tableName" :show-overflow-tooltip="true" width="200"/>  
49 - <el-table-column label="表描述" align="center" prop="tableComment" :show-overflow-tooltip="true" width="120"/>  
50 - <el-table-column label="实体" align="center" prop="className" :show-overflow-tooltip="true" width="200"/>  
51 - <el-table-column label="创建时间" align="center" prop="createTime" width="160">  
52 - <template slot-scope="scope">  
53 - <span>{{ parseTime(scope.row.createTime) }}</span>  
54 - </template>  
55 - </el-table-column>  
56 - <el-table-column label="创建时间" align="center" prop="createTime" width="160">  
57 - <template slot-scope="scope">  
58 - <span>{{ parseTime(scope.row.updateTime) }}</span>  
59 - </template>  
60 - </el-table-column>  
61 - <el-table-column label="操作" align="center" class-name="small-padding fixed-width">  
62 - <template slot-scope="scope">  
63 - <el-button type="text" size="small" icon="el-icon-view" @click="handlePreview(scope.row)" v-hasPermi="['tool:gen:preview']">预览</el-button>  
64 - <el-button type="text" size="small" icon="el-icon-edit" @click="handleEditTable(scope.row)" v-hasPermi="['tool:gen:edit']">编辑</el-button>  
65 - <el-button type="text" size="small" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['tool:gen:remove']">删除</el-button>  
66 - <el-button type="text" size="small" icon="el-icon-refresh" @click="handleSynchDb(scope.row)" v-hasPermi="['tool:gen:edit']">同步</el-button>  
67 - <el-button type="text" size="small" icon="el-icon-download" @click="handleGenTable(scope.row)" v-hasPermi="['tool:gen:code']">生成代码</el-button>  
68 - </template>  
69 - </el-table-column>  
70 - </el-table>  
71 - <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" @pagination="getList"/>  
72 - <!-- 预览界面 -->  
73 - <el-dialog :title="preview.title" :visible.sync="preview.open" width="80%" top="5vh" append-to-body>  
74 - <el-tabs tab-position="left" v-model="preview.activeName">  
75 - <el-tab-pane v-for="item in preview.data" :label="item.filePath.substring(item.filePath.lastIndexOf('/') + 1)" :name="item.filePath" :key="item.filePath">  
76 - <pre><code class="hljs" v-html="highlightedCode(item)"></code></pre>  
77 - </el-tab-pane>  
78 - </el-tabs>  
79 - </el-dialog>  
80 - <import-table ref="import" @ok="handleQuery" />  
81 - </div>  
82 -</template>  
83 -  
84 -<script>  
85 -import { getCodegenTablePage, previewCodegen, downloadCodegen, deleteCodegen, syncCodegen } from "@/api/tool/codegen";  
86 -  
87 -import importTable from "./importTable";  
88 -// 代码高亮插件  
89 -import hljs from "highlight.js/lib/highlight";  
90 -import "highlight.js/styles/github-gist.css";  
91 -hljs.registerLanguage("java", require("highlight.js/lib/languages/java"));  
92 -hljs.registerLanguage("xml", require("highlight.js/lib/languages/xml"));  
93 -hljs.registerLanguage("html", require("highlight.js/lib/languages/xml"));  
94 -hljs.registerLanguage("vue", require("highlight.js/lib/languages/xml"));  
95 -hljs.registerLanguage("javascript", require("highlight.js/lib/languages/javascript"));  
96 -hljs.registerLanguage("sql", require("highlight.js/lib/languages/sql"));  
97 -  
98 -export default {  
99 - name: "Gen",  
100 - components: { importTable },  
101 - data() {  
102 - return {  
103 - // 遮罩层  
104 - loading: true,  
105 - // 唯一标识符  
106 - uniqueId: "",  
107 - // 选中表数组  
108 - tableNames: [],  
109 - // 显示搜索条件  
110 - showSearch: true,  
111 - // 总条数  
112 - total: 0,  
113 - // 表数据  
114 - tableList: [],  
115 - // 日期范围  
116 - dateRange: "",  
117 - // 查询参数  
118 - queryParams: {  
119 - pageNo: 1,  
120 - pageSize: 10,  
121 - tableName: undefined,  
122 - tableComment: undefined  
123 - },  
124 - // 预览参数  
125 - preview: {  
126 - open: false,  
127 - title: "代码预览",  
128 - data: {},  
129 - activeName: "domain.java"  
130 - }  
131 - };  
132 - },  
133 - created() {  
134 - this.getList();  
135 - },  
136 - activated() {  
137 - const time = this.$route.query.t;  
138 - if (time != null && time !== this.uniqueId) {  
139 - this.uniqueId = time;  
140 - this.resetQuery();  
141 - }  
142 - },  
143 - methods: {  
144 - /** 查询表集合 */  
145 - getList() {  
146 - this.loading = true;  
147 - getCodegenTablePage(this.addDateRange(this.queryParams, [  
148 - this.dateRange[0] ? this.dateRange[0] + ' 00:00:00' : undefined,  
149 - this.dateRange[1] ? this.dateRange[1] + ' 23:59:59' : undefined,  
150 - ], 'CreateTime')).then(response => {  
151 - this.tableList = response.data.list;  
152 - this.total = response.data.total;  
153 - this.loading = false;  
154 - }  
155 - );  
156 - },  
157 - /** 搜索按钮操作 */  
158 - handleQuery() {  
159 - this.queryParams.pageNo = 1;  
160 - this.getList();  
161 - },  
162 - /** 生成代码操作 */  
163 - handleGenTable(row) {  
164 - downloadCodegen(row.id).then(response => {  
165 - this.downloadZip(response, 'codegen-' + row.tableName + '.zip');  
166 - })  
167 - },  
168 - /** 同步数据库操作 */  
169 - handleSynchDb(row) {  
170 - const tableName = row.tableName;  
171 - this.$confirm('确认要强制同步"' + tableName + '"表结构吗?', "警告", {  
172 - confirmButtonText: "确定",  
173 - cancelButtonText: "取消",  
174 - type: "warning"  
175 - }).then(function() {  
176 - return syncCodegen(row.id);  
177 - }).then(() => {  
178 - this.msgSuccess("同步成功");  
179 - })  
180 - },  
181 - /** 打开导入表弹窗 */  
182 - openImportTable() {  
183 - this.$refs.import.show();  
184 - },  
185 - /** 重置按钮操作 */  
186 - resetQuery() {  
187 - this.dateRange = [];  
188 - this.resetForm("queryForm");  
189 - this.handleQuery();  
190 - },  
191 - /** 预览按钮 */  
192 - handlePreview(row) {  
193 - previewCodegen(row.id).then(response => {  
194 - this.preview.data = response.data;  
195 - this.preview.activeName = response.data[0].filePath;  
196 - this.preview.open = true;  
197 - });  
198 - },  
199 - /** 高亮显示 */  
200 - highlightedCode(item) {  
201 - // const vmName = key.substring(key.lastIndexOf("/") + 1, key.indexOf(".vm"));  
202 - // var language = vmName.substring(vmName.indexOf(".") + 1, vmName.length);  
203 - var language = item.filePath.substring(item.filePath.lastIndexOf(".") + 1);  
204 - const result = hljs.highlight(language, item.code || "", true);  
205 - return result.value || '&nbsp;';  
206 - },  
207 - /** 修改按钮操作 */  
208 - handleEditTable(row) {  
209 - const tableId = row.id;  
210 - this.$router.push("/gen/edit/" + tableId);  
211 - },  
212 - /** 删除按钮操作 */  
213 - handleDelete(row) {  
214 - const tableIds = row.id;  
215 - this.$confirm('是否确认删除表名称为"' + row.tableName + '"的数据项?', "警告", {  
216 - confirmButtonText: "确定",  
217 - cancelButtonText: "取消",  
218 - type: "warning"  
219 - }).then(function() {  
220 - return deleteCodegen(tableIds);  
221 - }).then(() => {  
222 - this.getList();  
223 - this.msgSuccess("删除成功");  
224 - })  
225 - }  
226 - }  
227 -};  
228 -</script> 1 +<template>
  2 + <div class="app-container">
  3 + <!-- 操作工作栏 -->
  4 + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
  5 + <el-form-item label="表名称" prop="tableName">
  6 + <el-input
  7 + v-model="queryParams.tableName"
  8 + placeholder="请输入表名称"
  9 + clearable
  10 + size="small"
  11 + @keyup.enter.native="handleQuery"
  12 + />
  13 + </el-form-item>
  14 + <el-form-item label="表描述" prop="tableComment">
  15 + <el-input
  16 + v-model="queryParams.tableComment"
  17 + placeholder="请输入表描述"
  18 + clearable
  19 + size="small"
  20 + @keyup.enter.native="handleQuery"
  21 + />
  22 + </el-form-item>
  23 + <el-form-item label="创建时间">
  24 + <el-date-picker
  25 + v-model="dateRange"
  26 + size="small"
  27 + style="width: 240px"
  28 + value-format="yyyy-MM-dd"
  29 + type="daterange"
  30 + range-separator="-"
  31 + start-placeholder="开始日期"
  32 + end-placeholder="结束日期"
  33 + ></el-date-picker>
  34 + </el-form-item>
  35 + <el-form-item>
  36 + <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  37 + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  38 + </el-form-item>
  39 + </el-form>
  40 +
  41 + <!-- 操作工作栏 -->
  42 + <el-row :gutter="10" class="mb8">
  43 + <el-col :span="1.5">
  44 + <el-button type="info" plain icon="el-icon-upload" size="mini" @click="openImportTable"
  45 + v-hasPermi="['tool:codegen:create']">基于 DB 导入</el-button>
  46 + <el-button type="info" plain icon="el-icon-upload" size="mini" @click="openImportSQL"
  47 + v-hasPermi="['tool:codegen:create']">基于 SQL 导入</el-button>
  48 + </el-col>
  49 + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  50 + </el-row>
  51 +
  52 + <!-- 列表 -->
  53 + <el-table v-loading="loading" :data="tableList">
  54 + <el-table-column label="表名称" align="center" prop="tableName" :show-overflow-tooltip="true" width="200"/>
  55 + <el-table-column label="表描述" align="center" prop="tableComment" :show-overflow-tooltip="true" width="120"/>
  56 + <el-table-column label="实体" align="center" prop="className" :show-overflow-tooltip="true" width="200"/>
  57 + <el-table-column label="创建时间" align="center" prop="createTime" width="160">
  58 + <template slot-scope="scope">
  59 + <span>{{ parseTime(scope.row.createTime) }}</span>
  60 + </template>
  61 + </el-table-column>
  62 + <el-table-column label="创建时间" align="center" prop="createTime" width="160">
  63 + <template slot-scope="scope">
  64 + <span>{{ parseTime(scope.row.updateTime) }}</span>
  65 + </template>
  66 + </el-table-column>
  67 + <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  68 + <template slot-scope="scope">
  69 + <el-button type="text" size="small" icon="el-icon-view" @click="handlePreview(scope.row)" v-hasPermi="['tool:codegen:preview']">预览</el-button>
  70 + <el-button type="text" size="small" icon="el-icon-edit" @click="handleEditTable(scope.row)" v-hasPermi="['tool:codegen:update']">编辑</el-button>
  71 + <el-button type="text" size="small" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['tool:codegen:delete']">删除</el-button>
  72 + <el-button type="text" size="small" icon="el-icon-refresh" @click="handleSynchDb(scope.row)" v-hasPermi="['tool:codegen:update']">同步</el-button>
  73 + <el-button type="text" size="small" icon="el-icon-download" @click="handleGenTable(scope.row)" v-hasPermi="['tool:codegen:download']">生成代码</el-button>
  74 + </template>
  75 + </el-table-column>
  76 + </el-table>
  77 + <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" @pagination="getList"/>
  78 +
  79 + <!-- 预览界面 -->
  80 + <el-dialog :title="preview.title" :visible.sync="preview.open" width="80%" top="5vh" append-to-body>
  81 + <el-tabs tab-position="left" v-model="preview.activeName">
  82 + <el-tab-pane v-for="item in preview.data" :label="item.filePath.substring(item.filePath.lastIndexOf('/') + 1)" :name="item.filePath" :key="item.filePath">
  83 + <pre><code class="hljs" v-html="highlightedCode(item)"></code></pre>
  84 + </el-tab-pane>
  85 + </el-tabs>
  86 + </el-dialog>
  87 +
  88 + <!-- 基于 DB 导入 -->
  89 + <import-table ref="import" @ok="handleQuery" />
  90 +
  91 + <!-- 基于 SQL 导入 -->
  92 + <el-dialog :title="importSQL.title" :visible.sync="importSQL.open" width="800px" append-to-body>
  93 + <el-form ref="importSQLForm" :model="importSQL.form" :rules="importSQL.rules" label-width="120px">
  94 + <el-row>
  95 + <el-col :span="12">
  96 + <el-form-item label="建表 SQL 语句" prop="sql">
  97 + <el-input v-model="importSQL.form.sql" type="textarea" rows="30" style="width: 650px;" placeholder="请输入建 SQL 语句" />
  98 + </el-form-item>
  99 + </el-col>
  100 + </el-row>
  101 + </el-form>
  102 + <div slot="footer" class="dialog-footer">
  103 + <el-button type="primary" @click="submitImportSQLForm">确 定</el-button>
  104 + <el-button @click="cancel">取 消</el-button>
  105 + </div>
  106 + </el-dialog>
  107 + </div>
  108 +</template>
  109 +
  110 +<script>
  111 +import { getCodegenTablePage, previewCodegen, downloadCodegen, deleteCodegen,
  112 + syncCodegenFromDB, syncCodegenFromSQL, createCodegenListFromSQL } from "@/api/tool/codegen";
  113 +
  114 +import importTable from "./importTable";
  115 +// 代码高亮插件
  116 +import hljs from "highlight.js/lib/highlight";
  117 +import "highlight.js/styles/github-gist.css";
  118 +import {SysCommonStatusEnum} from "@/utils/constants";
  119 +import {createTestDemo, updateTestDemo} from "@/api/tool/testDemo";
  120 +hljs.registerLanguage("java", require("highlight.js/lib/languages/java"));
  121 +hljs.registerLanguage("xml", require("highlight.js/lib/languages/xml"));
  122 +hljs.registerLanguage("html", require("highlight.js/lib/languages/xml"));
  123 +hljs.registerLanguage("vue", require("highlight.js/lib/languages/xml"));
  124 +hljs.registerLanguage("javascript", require("highlight.js/lib/languages/javascript"));
  125 +hljs.registerLanguage("sql", require("highlight.js/lib/languages/sql"));
  126 +
  127 +export default {
  128 + name: "Codegen",
  129 + components: { importTable },
  130 + data() {
  131 + return {
  132 + // 遮罩层
  133 + loading: true,
  134 + // 唯一标识符
  135 + uniqueId: "",
  136 + // 选中表数组
  137 + tableNames: [],
  138 + // 显示搜索条件
  139 + showSearch: true,
  140 + // 总条数
  141 + total: 0,
  142 + // 表数据
  143 + tableList: [],
  144 + // 日期范围
  145 + dateRange: "",
  146 + // 查询参数
  147 + queryParams: {
  148 + pageNo: 1,
  149 + pageSize: 10,
  150 + tableName: undefined,
  151 + tableComment: undefined
  152 + },
  153 + // 预览参数
  154 + preview: {
  155 + open: false,
  156 + title: "代码预览",
  157 + data: {},
  158 + activeName: "domain.java"
  159 + },
  160 + // 基于 SQL 导入
  161 + importSQL: {
  162 + open: false,
  163 + title: "",
  164 + form: {
  165 +
  166 + },
  167 + rules: {
  168 + sql: [{ required: true, message: "SQL 不能为空", trigger: "blur" }]
  169 + }
  170 + }
  171 + };
  172 + },
  173 + created() {
  174 + this.getList();
  175 + },
  176 + activated() {
  177 + const time = this.$route.query.t;
  178 + if (time != null && time !== this.uniqueId) {
  179 + this.uniqueId = time;
  180 + this.resetQuery();
  181 + }
  182 + },
  183 + methods: {
  184 + /** 查询表集合 */
  185 + getList() {
  186 + this.loading = true;
  187 + getCodegenTablePage(this.addDateRange(this.queryParams, [
  188 + this.dateRange[0] ? this.dateRange[0] + ' 00:00:00' : undefined,
  189 + this.dateRange[1] ? this.dateRange[1] + ' 23:59:59' : undefined,
  190 + ], 'CreateTime')).then(response => {
  191 + this.tableList = response.data.list;
  192 + this.total = response.data.total;
  193 + this.loading = false;
  194 + }
  195 + );
  196 + },
  197 + /** 搜索按钮操作 */
  198 + handleQuery() {
  199 + this.queryParams.pageNo = 1;
  200 + this.getList();
  201 + },
  202 + /** 生成代码操作 */
  203 + handleGenTable(row) {
  204 + downloadCodegen(row.id).then(response => {
  205 + this.downloadZip(response, 'codegen-' + row.tableName + '.zip');
  206 + })
  207 + },
  208 + /** 同步数据库操作 */
  209 + handleSynchDb(row) {
  210 + // 基于 SQL 同步
  211 + if (row.importType === 2) {
  212 + this.importSQL.open = true;
  213 + this.importSQL.form.tableId = row.id;
  214 + return;
  215 + }
  216 + // 基于 DB 同步
  217 + const tableName = row.tableName;
  218 + this.$confirm('确认要强制同步"' + tableName + '"表结构吗?', "警告", {
  219 + confirmButtonText: "确定",
  220 + cancelButtonText: "取消",
  221 + type: "warning"
  222 + }).then(function() {
  223 + return syncCodegenFromDB(row.id);
  224 + }).then(() => {
  225 + this.msgSuccess("同步成功");
  226 + })
  227 + },
  228 + /** 打开导入表弹窗 */
  229 + openImportTable() {
  230 + this.$refs.import.show();
  231 + },
  232 + /** 打开 SQL 导入的弹窗 **/
  233 + openImportSQL() {
  234 + this.importSQL.open = true;
  235 + },
  236 + /** 重置按钮操作 */
  237 + resetQuery() {
  238 + this.dateRange = [];
  239 + this.resetForm("queryForm");
  240 + this.handleQuery();
  241 + },
  242 + /** 预览按钮 */
  243 + handlePreview(row) {
  244 + previewCodegen(row.id).then(response => {
  245 + this.preview.data = response.data;
  246 + this.preview.activeName = response.data[0].filePath;
  247 + this.preview.open = true;
  248 + });
  249 + },
  250 + /** 高亮显示 */
  251 + highlightedCode(item) {
  252 + // const vmName = key.substring(key.lastIndexOf("/") + 1, key.indexOf(".vm"));
  253 + // var language = vmName.substring(vmName.indexOf(".") + 1, vmName.length);
  254 + var language = item.filePath.substring(item.filePath.lastIndexOf(".") + 1);
  255 + const result = hljs.highlight(language, item.code || "", true);
  256 + return result.value || '&nbsp;';
  257 + },
  258 + /** 修改按钮操作 */
  259 + handleEditTable(row) {
  260 + const tableId = row.id;
  261 + this.$router.push("/codegen/edit/" + tableId);
  262 + },
  263 + /** 删除按钮操作 */
  264 + handleDelete(row) {
  265 + const tableIds = row.id;
  266 + this.$confirm('是否确认删除表名称为"' + row.tableName + '"的数据项?', "警告", {
  267 + confirmButtonText: "确定",
  268 + cancelButtonText: "取消",
  269 + type: "warning"
  270 + }).then(function() {
  271 + return deleteCodegen(tableIds);
  272 + }).then(() => {
  273 + this.getList();
  274 + this.msgSuccess("删除成功");
  275 + })
  276 + },
  277 + // 取消按钮
  278 + cancel() {
  279 + this.importSQL.open = false;
  280 + this.reset();
  281 + },
  282 + // 表单重置
  283 + reset() {
  284 + this.importSQL.form = {
  285 + tableId: undefined,
  286 + sql: undefined,
  287 + };
  288 + this.resetForm("importSQLForm");
  289 + },
  290 + // 提交 import SQL 表单
  291 + submitImportSQLForm() {
  292 + this.$refs["importSQLForm"].validate(valid => {
  293 + if (!valid) {
  294 + return;
  295 + }
  296 + // 修改的提交
  297 + let form = this.importSQL.form;
  298 + if (form.tableId != null) {
  299 + syncCodegenFromSQL(form.tableId, form.sql).then(response => {
  300 + this.msgSuccess("同步成功");
  301 + this.importSQL.open = false;
  302 + this.getList();
  303 + });
  304 + return;
  305 + }
  306 + // 添加的提交
  307 + createCodegenListFromSQL(form).then(response => {
  308 + this.msgSuccess("导入成功");
  309 + this.importSQL.open = false;
  310 + this.getList();
  311 + });
  312 + });
  313 + }
  314 + }
  315 +};
  316 +</script>
sql/ruoyi-vue-pro.sql
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 Target Server Version : 50718 11 Target Server Version : 50718
12 File Encoding : 65001 12 File Encoding : 65001
13 13
14 - Date: 13/02/2021 10:09:02 14 + Date: 13/02/2021 13:39:00
15 */ 15 */
16 16
17 SET NAMES utf8mb4; 17 SET NAMES utf8mb4;
@@ -151,7 +151,7 @@ INSERT INTO `sys_dict_data` VALUES (48, 1, &#39;动æ€è¶…æ—¶&#39;, &#39;2&#39;, &#39;inf_redis_timeo @@ -151,7 +151,7 @@ INSERT INTO `sys_dict_data` VALUES (48, 1, &#39;动æ€è¶…æ—¶&#39;, &#39;2&#39;, &#39;inf_redis_timeo
151 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'); 151 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');
152 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'); 152 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');
153 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'); 153 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');
154 -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'); 154 +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');
155 COMMIT; 155 COMMIT;
156 156
157 -- ---------------------------- 157 -- ----------------------------
@@ -284,7 +284,7 @@ CREATE TABLE `sys_login_log` ( @@ -284,7 +284,7 @@ CREATE TABLE `sys_login_log` (
284 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´', 284 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
285 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤', 285 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
286 PRIMARY KEY (`id`) USING BTREE 286 PRIMARY KEY (`id`) USING BTREE
287 -) ENGINE=InnoDB AUTO_INCREMENT=68 DEFAULT CHARSET=utf8mb4 COMMENT='系统访问记录'; 287 +) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=utf8mb4 COMMENT='系统访问记录';
288 288
289 -- ---------------------------- 289 -- ----------------------------
290 -- Records of sys_login_log 290 -- Records of sys_login_log
@@ -357,6 +357,11 @@ INSERT INTO `sys_login_log` VALUES (64, 100, &#39;f9fcc29d-bba2-4451-a0d3-1edd9a0edf @@ -357,6 +357,11 @@ INSERT INTO `sys_login_log` VALUES (64, 100, &#39;f9fcc29d-bba2-4451-a0d3-1edd9a0edf
357 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'); 357 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');
358 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'); 358 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');
359 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'); 359 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');
  360 +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');
  361 +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');
  362 +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');
  363 +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');
  364 +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');
360 COMMIT; 365 COMMIT;
361 366
362 -- ---------------------------- 367 -- ----------------------------
@@ -405,7 +410,7 @@ INSERT INTO `sys_menu` VALUES (111, &#39;æ•°æ®ç›‘控&#39;, &#39;monitor:druid:list&#39;, 2, 3, @@ -405,7 +410,7 @@ INSERT INTO `sys_menu` VALUES (111, &#39;æ•°æ®ç›‘控&#39;, &#39;monitor:druid:list&#39;, 2, 3,
405 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'); 410 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');
406 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'); 411 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');
407 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'); 412 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');
408 -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'); 413 +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');
409 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'); 414 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');
410 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'); 415 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');
411 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'); 416 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, &#39;任务修改&#39;, &#39;monitor:job:edit&#39;, 3, 3, 1 @@ -461,12 +466,12 @@ INSERT INTO `sys_menu` VALUES (1051, &#39;任务修改&#39;, &#39;monitor:job:edit&#39;, 3, 3, 1
461 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'); 466 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');
462 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'); 467 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');
463 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'); 468 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');
464 -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');  
465 -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');  
466 -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');  
467 -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');  
468 -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');  
469 -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'); 469 +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');
  470 +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');
  471 +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');
  472 +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');
  473 +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');
  474 +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');
470 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'); 475 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');
471 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'); 476 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');
472 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'); 477 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` ( @@ -536,12 +541,37 @@ CREATE TABLE `sys_operate_log` (
536 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´', 541 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
537 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤', 542 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
538 PRIMARY KEY (`id`) USING BTREE 543 PRIMARY KEY (`id`) USING BTREE
539 -) ENGINE=InnoDB AUTO_INCREMENT=166 DEFAULT CHARSET=utf8mb4 COMMENT='æ“作日志记录'; 544 +) ENGINE=InnoDB AUTO_INCREMENT=191 DEFAULT CHARSET=utf8mb4 COMMENT='æ“作日志记录';
540 545
541 -- ---------------------------- 546 -- ----------------------------
542 -- Records of sys_operate_log 547 -- Records of sys_operate_log
543 -- ---------------------------- 548 -- ----------------------------
544 BEGIN; 549 BEGIN;
  550 +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');
  551 +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');
  552 +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');
  553 +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');
  554 +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');
  555 +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');
  556 +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');
  557 +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');
  558 +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');
  559 +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');
  560 +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');
  561 +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');
  562 +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');
  563 +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');
  564 +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');
  565 +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');
  566 +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');
  567 +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');
  568 +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');
  569 +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');
  570 +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');
  571 +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');
  572 +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');
  573 +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');
  574 +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');
545 COMMIT; 575 COMMIT;
546 576
547 -- ---------------------------- 577 -- ----------------------------
@@ -880,11 +910,13 @@ INSERT INTO `sys_user_session` VALUES (&#39;597956fbc5b34363981530b24e1b5327&#39;, 1, &#39;1 @@ -880,11 +910,13 @@ INSERT INTO `sys_user_session` VALUES (&#39;597956fbc5b34363981530b24e1b5327&#39;, 1, &#39;1
880 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'); 910 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');
881 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'); 911 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');
882 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'); 912 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');
  913 +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');
883 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'); 914 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');
884 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'); 915 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');
885 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'); 916 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');
886 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'); 917 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');
887 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'); 918 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');
  919 +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');
888 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'); 920 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');
889 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'); 921 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');
890 COMMIT; 922 COMMIT;
@@ -919,7 +951,7 @@ CREATE TABLE `tool_codegen_column` ( @@ -919,7 +951,7 @@ CREATE TABLE `tool_codegen_column` (
919 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´', 951 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
920 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤', 952 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
921 PRIMARY KEY (`id`) USING BTREE 953 PRIMARY KEY (`id`) USING BTREE
922 -) ENGINE=InnoDB AUTO_INCREMENT=243 DEFAULT CHARSET=utf8mb4 COMMENT='代ç ç”Ÿæˆè¡¨å­—段定义'; 954 +) ENGINE=InnoDB AUTO_INCREMENT=269 DEFAULT CHARSET=utf8mb4 COMMENT='代ç ç”Ÿæˆè¡¨å­—段定义';
923 955
924 -- ---------------------------- 956 -- ----------------------------
925 -- Records of tool_codegen_column 957 -- Records of tool_codegen_column
@@ -936,6 +968,32 @@ INSERT INTO `tool_codegen_column` VALUES (239, 20, &#39;create_time&#39;, &#39;datetime&#39;, &#39;å @@ -936,6 +968,32 @@ INSERT INTO `tool_codegen_column` VALUES (239, 20, &#39;create_time&#39;, &#39;datetime&#39;, &#39;å
936 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'); 968 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');
937 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'); 969 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');
938 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'); 970 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');
  971 +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');
  972 +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');
  973 +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');
  974 +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');
  975 +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');
  976 +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');
  977 +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');
  978 +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');
  979 +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');
  980 +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');
  981 +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');
  982 +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');
  983 +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');
  984 +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');
  985 +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');
  986 +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');
  987 +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');
  988 +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');
  989 +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');
  990 +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');
  991 +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');
  992 +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');
  993 +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');
  994 +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');
  995 +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');
  996 +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');
939 COMMIT; 997 COMMIT;
940 998
941 -- ---------------------------- 999 -- ----------------------------
@@ -944,6 +1002,7 @@ COMMIT; @@ -944,6 +1002,7 @@ COMMIT;
944 DROP TABLE IF EXISTS `tool_codegen_table`; 1002 DROP TABLE IF EXISTS `tool_codegen_table`;
945 CREATE TABLE `tool_codegen_table` ( 1003 CREATE TABLE `tool_codegen_table` (
946 `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ç¼–å·', 1004 `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ç¼–å·',
  1005 + `import_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '导入类型',
947 `table_name` varchar(200) NOT NULL DEFAULT '' COMMENT '表åç§°', 1006 `table_name` varchar(200) NOT NULL DEFAULT '' COMMENT '表åç§°',
948 `table_comment` varchar(500) NOT NULL DEFAULT '' COMMENT '表æè¿°', 1007 `table_comment` varchar(500) NOT NULL DEFAULT '' COMMENT '表æè¿°',
949 `remark` varchar(500) DEFAULT NULL COMMENT '备注', 1008 `remark` varchar(500) DEFAULT NULL COMMENT '备注',
@@ -952,23 +1011,24 @@ CREATE TABLE `tool_codegen_table` ( @@ -952,23 +1011,24 @@ CREATE TABLE `tool_codegen_table` (
952 `class_name` varchar(100) NOT NULL DEFAULT '' COMMENT 'ç±»åç§°', 1011 `class_name` varchar(100) NOT NULL DEFAULT '' COMMENT 'ç±»åç§°',
953 `class_comment` varchar(50) NOT NULL COMMENT 'ç±»æè¿°', 1012 `class_comment` varchar(50) NOT NULL COMMENT 'ç±»æè¿°',
954 `author` varchar(50) NOT NULL COMMENT '作者', 1013 `author` varchar(50) NOT NULL COMMENT '作者',
955 - `template_type` tinyint(4) NOT NULL COMMENT '模æ¿ç±»åž‹', 1014 + `template_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '模æ¿ç±»åž‹',
956 `parent_menu_id` bigint(20) DEFAULT NULL COMMENT '父èœå•ç¼–å·', 1015 `parent_menu_id` bigint(20) DEFAULT NULL COMMENT '父èœå•ç¼–å·',
957 `create_by` varchar(64) DEFAULT '' COMMENT '创建者', 1016 `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
958 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', 1017 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
959 `update_by` varchar(64) DEFAULT '' COMMENT '更新者', 1018 `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
960 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´', 1019 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
961 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤', 1020 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
962 - `package_name` varchar(100) DEFAULT NULL COMMENT '生æˆåŒ…路径',  
963 - `options` varchar(1000) DEFAULT NULL COMMENT '其它生æˆé€‰é¡¹',  
964 PRIMARY KEY (`id`) USING BTREE 1021 PRIMARY KEY (`id`) USING BTREE
965 -) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COMMENT='代ç ç”Ÿæˆè¡¨å®šä¹‰'; 1022 +) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COMMENT='代ç ç”Ÿæˆè¡¨å®šä¹‰';
966 1023
967 -- ---------------------------- 1024 -- ----------------------------
968 -- Records of tool_codegen_table 1025 -- Records of tool_codegen_table
969 -- ---------------------------- 1026 -- ----------------------------
970 BEGIN; 1027 BEGIN;
971 -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); 1028 +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');
  1029 +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');
  1030 +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');
  1031 +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');
972 COMMIT; 1032 COMMIT;
973 1033
974 -- ---------------------------- 1034 -- ----------------------------
src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenServiceImpl.java
@@ -56,9 +56,6 @@ public class ToolCodegenServiceImpl implements ToolCodegenService { @@ -56,9 +56,6 @@ public class ToolCodegenServiceImpl implements ToolCodegenService {
56 @Resource 56 @Resource
57 private CodegenProperties codegenProperties; 57 private CodegenProperties codegenProperties;
58 58
59 - @Resource  
60 - private ToolCodegenServiceImpl self;  
61 -  
62 private Long createCodegen0(ToolCodegenImportTypeEnum importType, 59 private Long createCodegen0(ToolCodegenImportTypeEnum importType,
63 ToolSchemaTableDO schemaTable, List<ToolSchemaColumnDO> schemaColumns) { 60 ToolSchemaTableDO schemaTable, List<ToolSchemaColumnDO> schemaColumns) {
64 // 校验导入的表和字段非空 61 // 校验导入的表和字段非空
@@ -99,7 +96,7 @@ public class ToolCodegenServiceImpl implements ToolCodegenService { @@ -99,7 +96,7 @@ public class ToolCodegenServiceImpl implements ToolCodegenService {
99 throw exception(CODEGEN_PARSE_SQL_ERROR); 96 throw exception(CODEGEN_PARSE_SQL_ERROR);
100 } 97 }
101 // 导入 98 // 导入
102 - return self.createCodegen0(ToolCodegenImportTypeEnum.SQL, schemaTable, schemaColumns); 99 + return this.createCodegen0(ToolCodegenImportTypeEnum.SQL, schemaTable, schemaColumns);
103 } 100 }
104 101
105 @Override 102 @Override
@@ -108,7 +105,7 @@ public class ToolCodegenServiceImpl implements ToolCodegenService { @@ -108,7 +105,7 @@ public class ToolCodegenServiceImpl implements ToolCodegenService {
108 ToolSchemaTableDO schemaTable = schemaTableMapper.selectByTableName(tableName); 105 ToolSchemaTableDO schemaTable = schemaTableMapper.selectByTableName(tableName);
109 List<ToolSchemaColumnDO> schemaColumns = schemaColumnMapper.selectListByTableName(tableName); 106 List<ToolSchemaColumnDO> schemaColumns = schemaColumnMapper.selectListByTableName(tableName);
110 // 导入 107 // 导入
111 - return self.createCodegen0(ToolCodegenImportTypeEnum.DB, schemaTable, schemaColumns); 108 + return this.createCodegen0(ToolCodegenImportTypeEnum.DB, schemaTable, schemaColumns);
112 } 109 }
113 110
114 @Override 111 @Override
@@ -147,7 +144,7 @@ public class ToolCodegenServiceImpl implements ToolCodegenService { @@ -147,7 +144,7 @@ public class ToolCodegenServiceImpl implements ToolCodegenService {
147 List<ToolSchemaColumnDO> schemaColumns = schemaColumnMapper.selectListByTableName(table.getTableName()); 144 List<ToolSchemaColumnDO> schemaColumns = schemaColumnMapper.selectListByTableName(table.getTableName());
148 145
149 // 执行同步 146 // 执行同步
150 - self.syncCodegen0(tableId, schemaColumns); 147 + this.syncCodegen0(tableId, schemaColumns);
151 } 148 }
152 149
153 @Override 150 @Override
@@ -167,7 +164,7 @@ public class ToolCodegenServiceImpl implements ToolCodegenService { @@ -167,7 +164,7 @@ public class ToolCodegenServiceImpl implements ToolCodegenService {
167 } 164 }
168 165
169 // 执行同步 166 // 执行同步
170 - self.syncCodegen0(tableId, schemaColumns); 167 + this.syncCodegen0(tableId, schemaColumns);
171 } 168 }
172 169
173 private void syncCodegen0(Long tableId, List<ToolSchemaColumnDO> schemaColumns) { 170 private void syncCodegen0(Long tableId, List<ToolSchemaColumnDO> schemaColumns) {
src/main/resources/codegen/vue/views/index.vue.vm
@@ -268,12 +268,12 @@ export default { @@ -268,12 +268,12 @@ export default {
268 this.loading = false; 268 this.loading = false;
269 }); 269 });
270 }, 270 },
271 - // 取消按钮 271 + /** 取消按钮 */
272 cancel() { 272 cancel() {
273 this.open = false; 273 this.open = false;
274 this.reset(); 274 this.reset();
275 }, 275 },
276 - // 表单重置 276 + /** 表单重置 */
277 reset() { 277 reset() {
278 this.form = { 278 this.form = {
279 #foreach ($column in $columns) 279 #foreach ($column in $columns)