Skip to content

Commit

Permalink
Merge pull request #582 from jiushinakecai/com-dev
Browse files Browse the repository at this point in the history
Update mapper_sub.vm
  • Loading branch information
YunaiV authored Jul 7, 2024
2 parents ec480d1 + 7a42b3f commit 0337b1d
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ public interface ${subTable.className}Mapper extends BaseMapperX<${subTable.clas
.orderByDesc(${subTable.className}DO::getId));## 大多数情况下,id 倒序

}
## 主表与子表是一对一时
#if (!$subTable.subJoinMany)
default ${subTable.className}DO selectBy${SubJoinColumnName}(${subJoinColumn.javaType} ${subJoinColumn.javaField}) {
return selectOne(${subTable.className}DO::get${SubJoinColumnName}, ${subJoinColumn.javaField});
}
#end

## 情况二:非 MASTER_ERP 时,需要列表查询子表
#else
Expand All @@ -48,4 +54,4 @@ public interface ${subTable.className}Mapper extends BaseMapperX<${subTable.clas
return delete(${subTable.className}DO::get${SubJoinColumnName}, ${subJoinColumn.javaField});
}

}
}

0 comments on commit 0337b1d

Please sign in to comment.