perf:【INFRA 基础设施】代码生成配置 delete-batch-enable: false # 是否生成批量删除接口

This commit is contained in:
puhui999
2025-05-19 23:52:58 +08:00
parent 05bf229a3c
commit 61cfcc283b
14 changed files with 30 additions and 37 deletions

View File

@@ -1,7 +1,6 @@
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import java.time.LocalDateTime;
@@ -46,9 +45,6 @@ public class CodegenTableRespVO {
@Schema(description = "前端类型,参见 CodegenFrontTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "20")
private Integer frontType;
@Schema(description = "是否生成批量删除接口", example = "true")
private Boolean deleteBatch;
@Schema(description = "父菜单编号", example = "1024")
private Long parentMenuId;

View File

@@ -60,10 +60,6 @@ public class CodegenTableSaveReqVO {
@NotNull(message = "前端类型不能为空")
private Integer frontType;
@Schema(description = "是否生成批量删除接口", example = "true")
@NotNull(message = "是否生成批量删除接口不能为空")
private Boolean deleteBatch;
@Schema(description = "父菜单编号", example = "1024")
private Long parentMenuId;

View File

@@ -108,12 +108,6 @@ public class CodegenTableDO extends BaseDO {
* 枚举 {@link CodegenFrontTypeEnum}
*/
private Integer frontType;
/**
* 是否生成批量删除接口
* -true 是
* -false 否
*/
private Boolean deleteBatch;
// ========== 菜单相关字段 ==========

View File

@@ -40,4 +40,10 @@ public class CodegenProperties {
@NotNull(message = "是否生成单元测试不能为空")
private Boolean unitTestEnable;
/**
* 是否生成批量删除接口
*/
@NotNull(message = "是否生成批量删除接口不能为空")
private Boolean deleteBatchEnable;
}

View File

@@ -380,7 +380,7 @@ public class CodegenEngine {
bindingMap.put("columns", columns);
bindingMap.put("primaryColumn", CollectionUtils.findFirst(columns, CodegenColumnDO::getPrimaryKey)); // 主键字段
bindingMap.put("sceneEnum", CodegenSceneEnum.valueOf(table.getScene()));
bindingMap.put("deleteBatchEnable", codegenProperties.getDeleteBatchEnable());
// className 相关
// 去掉指定前缀,将 TestDictType 转换成 DictType. 因为在 create 等方法后,不需要带上 Test 前缀
String simpleClassName = equalsAnyIgnoreCase(table.getClassName(), table.getModuleName()) ? table.getClassName()