feat: 代码配置重置接口
This commit is contained in:
@@ -42,7 +42,8 @@ public class GeneratorController {
|
||||
@Operation(summary = "获取代码生成配置")
|
||||
@GetMapping("/{tableName}/config")
|
||||
public Result<GenConfigForm> getGenConfigFormData(
|
||||
@Parameter(description = "表名", example = "sys_user") @PathVariable String tableName) {
|
||||
@Parameter(description = "表名", example = "sys_user") @PathVariable String tableName
|
||||
) {
|
||||
GenConfigForm formData = generatorService.getGenConfigFormData(tableName);
|
||||
return Result.success(formData);
|
||||
}
|
||||
@@ -54,6 +55,15 @@ public class GeneratorController {
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@Operation(summary = "删除代码生成配置")
|
||||
@DeleteMapping("/{tableName}/config")
|
||||
public Result deleteGenConfig(
|
||||
@Parameter(description = "表名", example = "sys_user") @PathVariable String tableName
|
||||
) {
|
||||
boolean result = generatorService.deleteGenConfig(tableName);
|
||||
return Result.judge(result);
|
||||
}
|
||||
|
||||
@Operation(summary = "获取预览生成代码")
|
||||
@GetMapping("/{tableName}/preview")
|
||||
public Result<List<GeneratorPreviewVO>> getTablePreviewData(@PathVariable String tableName) {
|
||||
|
||||
Reference in New Issue
Block a user