|
@@ -90,10 +90,12 @@ public class GenController extends BaseController {
|
|
|
/**
|
|
/**
|
|
|
* 导入表结构(保存)
|
|
* 导入表结构(保存)
|
|
|
*
|
|
*
|
|
|
- * @param tables 表名串
|
|
|
|
|
|
|
+ * @param tables 表名串
|
|
|
|
|
+ * @param dataName 数据源名称
|
|
|
*/
|
|
*/
|
|
|
@SaCheckPermission("tool:gen:import")
|
|
@SaCheckPermission("tool:gen:import")
|
|
|
@Log(title = "代码生成", businessType = BusinessType.IMPORT)
|
|
@Log(title = "代码生成", businessType = BusinessType.IMPORT)
|
|
|
|
|
+ @Lock4j(keys = {"#dataName"}, acquireTimeout = 10000)
|
|
|
@RepeatSubmit()
|
|
@RepeatSubmit()
|
|
|
@PostMapping("/importTable")
|
|
@PostMapping("/importTable")
|
|
|
public R<Void> importTableSave(String tables, String dataName) {
|
|
public R<Void> importTableSave(String tables, String dataName) {
|
|
@@ -175,7 +177,7 @@ public class GenController extends BaseController {
|
|
|
*/
|
|
*/
|
|
|
@SaCheckPermission("tool:gen:edit")
|
|
@SaCheckPermission("tool:gen:edit")
|
|
|
@Log(title = "代码生成", businessType = BusinessType.UPDATE)
|
|
@Log(title = "代码生成", businessType = BusinessType.UPDATE)
|
|
|
- @Lock4j
|
|
|
|
|
|
|
+ @Lock4j(keys = {"#tableId"}, acquireTimeout = 5000)
|
|
|
@GetMapping("/synchDb/{tableId}")
|
|
@GetMapping("/synchDb/{tableId}")
|
|
|
public R<Void> synchDb(@PathVariable("tableId") Long tableId) {
|
|
public R<Void> synchDb(@PathVariable("tableId") Long tableId) {
|
|
|
genTableService.synchDb(tableId);
|
|
genTableService.synchDb(tableId);
|
|
@@ -214,7 +216,7 @@ public class GenController extends BaseController {
|
|
|
*/
|
|
*/
|
|
|
@SaCheckPermission("tool:gen:list")
|
|
@SaCheckPermission("tool:gen:list")
|
|
|
@GetMapping(value = "/getDataNames")
|
|
@GetMapping(value = "/getDataNames")
|
|
|
- public R<Object> getCurrentDataSourceNameList(){
|
|
|
|
|
|
|
+ public R<Object> getCurrentDataSourceNameList() {
|
|
|
return R.ok(DataBaseHelper.getDataSourceNameList());
|
|
return R.ok(DataBaseHelper.getDataSourceNameList());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|