代码生成支持同步数据库

This commit is contained in:
RuoYi
2020-09-21 13:25:51 +08:00
parent 5d1701fd69
commit f4f89f9de6
9 changed files with 99 additions and 6 deletions

View File

@@ -164,12 +164,24 @@ public class GenController extends BaseController
@PreAuthorize(hasPermi = "tool:gen:code")
@Log(title = "代码生成", businessType = BusinessType.GENCODE)
@GetMapping("/genCode/{tableName}")
public AjaxResult genCode(HttpServletResponse response, @PathVariable("tableName") String tableName)
public AjaxResult genCode(@PathVariable("tableName") String tableName)
{
genTableService.generatorCode(tableName);
return AjaxResult.success();
}
/**
* 同步数据库
*/
@PreAuthorize(hasPermi = "tool:gen:edit")
@Log(title = "代码生成", businessType = BusinessType.UPDATE)
@GetMapping("/synchDb/{tableName}")
public AjaxResult synchDb(@PathVariable("tableName") String tableName)
{
genTableService.synchDb(tableName);
return AjaxResult.success();
}
/**
* 批量生成代码
*/