perf:【INFRA 基础设施】代码生成配置 delete-batch-enable: false # 是否生成批量删除接口
This commit is contained in:
@@ -155,7 +155,7 @@ public class ${table.className}ServiceImpl implements ${table.className}Service
|
||||
#end
|
||||
}
|
||||
|
||||
#if ( $table.templateType != 2 && $table.deleteBatch)
|
||||
#if ( $table.templateType != 2 && $deleteBatchEnable)
|
||||
@Override
|
||||
## 特殊:主子表专属逻辑
|
||||
#if ( $subTables && $subTables.size() > 0)
|
||||
@@ -332,7 +332,7 @@ public class ${table.className}ServiceImpl implements ${table.className}Service
|
||||
${subClassNameVars.get($index)}Mapper.deleteById(id);
|
||||
}
|
||||
|
||||
#if ($table.deleteBatch)
|
||||
#if ($deleteBatchEnable)
|
||||
@Override
|
||||
public void delete${subSimpleClassName}ByIds(List<${subPrimaryColumn.javaType}> ids) {
|
||||
// 校验存在
|
||||
@@ -353,7 +353,7 @@ public class ${table.className}ServiceImpl implements ${table.className}Service
|
||||
}
|
||||
}
|
||||
|
||||
#if ($table.deleteBatch)
|
||||
#if ($deleteBatchEnable)
|
||||
private void validate${subSimpleClassName}Exists(List<${subPrimaryColumn.javaType}> ids) {
|
||||
List<${subTable.className}DO> list = ${subClassNameVar}Mapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
@@ -400,7 +400,7 @@ public class ${table.className}ServiceImpl implements ${table.className}Service
|
||||
${subClassNameVars.get($index)}Mapper.deleteBy${SubJoinColumnName}(${subJoinColumn.javaField});
|
||||
}
|
||||
|
||||
#if ( $table.templateType != 2 && $table.deleteBatch)
|
||||
#if ( $table.templateType != 2 && $deleteBatchEnable)
|
||||
private void delete${subSimpleClassName}By${SubJoinColumnName}s(List<${primaryColumn.javaType}> ${subJoinColumn.javaField}s) {
|
||||
${subClassNameVars.get($index)}Mapper.deleteBy${SubJoinColumnName}s(${subJoinColumn.javaField}s);
|
||||
}
|
||||
|
Reference in New Issue
Block a user