|
|
@@ -112,18 +112,16 @@ public class GenController extends BaseController
|
|
112
|
112
|
/**
|
|
113
|
113
|
* 导入表结构(保存)
|
|
114
|
114
|
*/
|
|
115
|
|
- //@PreAuthorize("@ss.hasPermi('tool:gen:import')")
|
|
|
115
|
+ @PreAuthorize("@ss.hasPermi('tool:gen:import')")
|
|
116
|
116
|
@Log(title = "代码生成", businessType = BusinessType.IMPORT)
|
|
117
|
117
|
@PostMapping("/importTable")
|
|
118
|
118
|
@ApiOperation("导入表结构(保存)")
|
|
119
|
|
- @Anonymous
|
|
120
|
119
|
public AjaxResult importTableSave(String tables)
|
|
121
|
120
|
{
|
|
122
|
121
|
String[] tableNames = Convert.toStrArray(tables);
|
|
123
|
122
|
// 查询表信息
|
|
124
|
123
|
List<GenTable> tableList = genTableService.selectDbTableListByNames(tableNames);
|
|
125
|
|
- //genTableService.importGenTable(tableList, SecurityUtils.getUsername());
|
|
126
|
|
- genTableService.importGenTable(tableList, "admin");
|
|
|
124
|
+ genTableService.importGenTable(tableList, SecurityUtils.getUsername());
|
|
127
|
125
|
return success();
|
|
128
|
126
|
}
|
|
129
|
127
|
|
|
|
@@ -215,11 +213,10 @@ public class GenController extends BaseController
|
|
215
|
213
|
/**
|
|
216
|
214
|
* 生成代码(自定义路径)
|
|
217
|
215
|
*/
|
|
218
|
|
- //@PreAuthorize("@ss.hasPermi('tool:gen:code')")
|
|
|
216
|
+ @PreAuthorize("@ss.hasPermi('tool:gen:code')")
|
|
219
|
217
|
@ApiOperation("代码生成")
|
|
220
|
218
|
@Log(title = "代码生成", businessType = BusinessType.GENCODE)
|
|
221
|
219
|
@GetMapping("/genCode/{tableName}")
|
|
222
|
|
- @Anonymous
|
|
223
|
220
|
public AjaxResult genCode(@PathVariable("tableName") String tableName)
|
|
224
|
221
|
{
|
|
225
|
222
|
if (!GenConfig.isAllowOverwrite())
|