疯狂的狮子li
2022-07-07 0b077806196ceb8a68af93f00880ccc70aee50c2
ruoyi-generator/src/main/java/com/ruoyi/generator/controller/GenController.java
@@ -12,8 +12,8 @@
import com.ruoyi.generator.domain.GenTable;
import com.ruoyi.generator.domain.GenTableColumn;
import com.ruoyi.generator.service.IGenTableService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -30,7 +30,7 @@
 * @author Lion Li
 */
@Validated
@Api(value = "代码生成", tags = {"代码生成管理"})
@Tag(name = "代码生成", description = "代码生成管理")
@RequiredArgsConstructor
@RestController
@RequestMapping("/tool/gen")
@@ -41,7 +41,7 @@
    /**
     * 查询代码生成列表
     */
    @ApiOperation("查询代码生成列表")
    @Operation(summary = "查询代码生成列表")
    @SaCheckPermission("tool:gen:list")
    @GetMapping("/list")
    public TableDataInfo<GenTable> genList(GenTable genTable, PageQuery pageQuery) {
@@ -51,7 +51,7 @@
    /**
     * 修改代码生成业务
     */
    @ApiOperation("修改代码生成业务")
    @Operation(summary = "修改代码生成业务")
    @SaCheckPermission("tool:gen:query")
    @GetMapping(value = "/{tableId}")
    public R<Map<String, Object>> getInfo(@PathVariable Long tableId) {
@@ -68,7 +68,7 @@
    /**
     * 查询数据库列表
     */
    @ApiOperation("查询数据库列表")
    @Operation(summary = "查询数据库列表")
    @SaCheckPermission("tool:gen:list")
    @GetMapping("/db/list")
    public TableDataInfo<GenTable> dataList(GenTable genTable, PageQuery pageQuery) {
@@ -78,7 +78,7 @@
    /**
     * 查询数据表字段列表
     */
    @ApiOperation("查询数据表字段列表")
    @Operation(summary = "查询数据表字段列表")
    @SaCheckPermission("tool:gen:list")
    @GetMapping(value = "/column/{tableId}")
    public TableDataInfo<GenTableColumn> columnList(Long tableId) {
@@ -92,7 +92,7 @@
    /**
     * 导入表结构(保存)
     */
    @ApiOperation("导入表结构(保存)")
    @Operation(summary = "导入表结构(保存)")
    @SaCheckPermission("tool:gen:import")
    @Log(title = "代码生成", businessType = BusinessType.IMPORT)
    @PostMapping("/importTable")
@@ -107,7 +107,7 @@
    /**
     * 修改保存代码生成业务
     */
    @ApiOperation("修改保存代码生成业务")
    @Operation(summary = "修改保存代码生成业务")
    @SaCheckPermission("tool:gen:edit")
    @Log(title = "代码生成", businessType = BusinessType.UPDATE)
    @PutMapping
@@ -120,7 +120,7 @@
    /**
     * 删除代码生成
     */
    @ApiOperation("删除代码生成")
    @Operation(summary = "删除代码生成")
    @SaCheckPermission("tool:gen:remove")
    @Log(title = "代码生成", businessType = BusinessType.DELETE)
    @DeleteMapping("/{tableIds}")
@@ -132,7 +132,7 @@
    /**
     * 预览代码
     */
    @ApiOperation("预览代码")
    @Operation(summary = "预览代码")
    @SaCheckPermission("tool:gen:preview")
    @GetMapping("/preview/{tableId}")
    public R<Map<String, String>> preview(@PathVariable("tableId") Long tableId) throws IOException {
@@ -143,7 +143,7 @@
    /**
     * 生成代码(下载方式)
     */
    @ApiOperation("生成代码(下载方式)")
    @Operation(summary = "生成代码(下载方式)")
    @SaCheckPermission("tool:gen:code")
    @Log(title = "代码生成", businessType = BusinessType.GENCODE)
    @GetMapping("/download/{tableName}")
@@ -155,7 +155,7 @@
    /**
     * 生成代码(自定义路径)
     */
    @ApiOperation("生成代码(自定义路径)")
    @Operation(summary = "生成代码(自定义路径)")
    @SaCheckPermission("tool:gen:code")
    @Log(title = "代码生成", businessType = BusinessType.GENCODE)
    @GetMapping("/genCode/{tableName}")
@@ -167,7 +167,7 @@
    /**
     * 同步数据库
     */
    @ApiOperation("同步数据库")
    @Operation(summary = "同步数据库")
    @SaCheckPermission("tool:gen:edit")
    @Log(title = "代码生成", businessType = BusinessType.UPDATE)
    @GetMapping("/synchDb/{tableName}")
@@ -179,7 +179,7 @@
    /**
     * 批量生成代码
     */
    @ApiOperation("批量生成代码")
    @Operation(summary = "批量生成代码")
    @SaCheckPermission("tool:gen:code")
    @Log(title = "代码生成", businessType = BusinessType.GENCODE)
    @GetMapping("/batchGenCode")