Commit 064fecf4eed58bc44ef67ac4bf74dad3b75bd6b5
1 parent
cd341da6
perf:【INFRA 基础设施】代码生成DO模式:主子表非erp模式下,主表保存更新时携带的子表信息放主表的 DO 里
Showing
1 changed file
with
15 additions
and
0 deletions
yudao-module-infra/src/main/resources/codegen/java/dal/do.vm
| @@ -78,4 +78,19 @@ public class ${table.className}DO extends BaseDO { | @@ -78,4 +78,19 @@ public class ${table.className}DO extends BaseDO { | ||
| 78 | #end | 78 | #end |
| 79 | #end | 79 | #end |
| 80 | 80 | ||
| 81 | +## 特殊:主子表专属逻辑(非 ERP 模式) | ||
| 82 | +#if ( $voType == 20 && $subTables && $subTables.size() > 0 && $table.templateType != 11 ) | ||
| 83 | + #foreach ($subTable in $subTables) | ||
| 84 | + #set ($index = $foreach.count - 1) | ||
| 85 | + #if ( $subTable.subJoinMany) | ||
| 86 | + @Schema(description = "${subTable.classComment}列表") | ||
| 87 | + private List<${subTable.className}DO> ${subClassNameVars.get($index)}s; | ||
| 88 | + | ||
| 89 | + #else | ||
| 90 | + @Schema(description = "${subTable.classComment}") | ||
| 91 | + private ${subTable.className}DO ${subClassNameVars.get($index)}; | ||
| 92 | + #end | ||
| 93 | + #end | ||
| 94 | +#end | ||
| 95 | + | ||
| 81 | } | 96 | } |
| 82 | \ No newline at end of file | 97 | \ No newline at end of file |