RuoYi
2020-11-20 1abf802a09cb054f6dd517d0e05062766c148c25
ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/controller/GenController.java
@@ -164,13 +164,25 @@
    @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();
    }
    /**
     * 批量生成代码
     */
    @PreAuthorize(hasPermi = "tool:gen:code")