feat: 代码配置重置接口

This commit is contained in:
ray
2024-07-31 21:35:53 +08:00
parent 8f5211b667
commit 5d15c8976d
6 changed files with 54 additions and 12 deletions

View File

@@ -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) {