This commit is contained in:
iqudoo
2026-05-23 19:27:01 +08:00
parent 748ebad0c4
commit 88fa1c88dd
4 changed files with 226 additions and 278 deletions

View File

@@ -35,17 +35,11 @@
- `deleteAll({Example} example, boolean release)` - 删除(批量,支持物理删除)
- `recoverById(long id)` - 从回收站恢复(单个)
- `recoverAll({Example} example)` - 从回收站恢复(批量)
- `findAnyById(long id)` - 查找(不区分有效/回收站)
- `findValidById(long id)` - 查找有效记录(单个)
- `findTrashById(long id)` - 查找回收站记录(单个)
- `findValidOne({Example} example)` - 查找有效记录(单个,支持条件)
- `findTrashOne({Example} example)` - 查找回收站记录(单个,支持条件)
- `getValidList({Example} example)` - 获取有效记录列表(支持分页)
- `getTrashList({Example} example)` - 获取回收站记录列表(支持分页)
- `countByValid({Example} example)` - 统计有效记录数
- `countByValidWithPage({Example} example)` - 统计分页有效记录数
- `countByTrash({Example} example)` - 统计回收站记录数
- `countByTrashWithPage({Example} example)` - 统计分页回收站记录数
- `findById(long id)` - 根据主键查询数据
- `findOne({Example} example)` - 查找单条数据
- `getList({Example} example)` - 获取多条数据
- `count({Example} example)` - 统计记录数
- `countByWithPage({Example} example)` - 统计分页记录数
- `insert({Model} record)` - 插入记录(自动生成 GUID、设置默认值
- `batchInsert(List<{Model}> records)` - 批量插入记录(自动生成 GUID、设置默认值
- `updateByExampleSelective({Model} record, {Example} example)` - 按条件更新记录
@@ -55,9 +49,8 @@
为视图表生成 RepoView 层代码:
- **接口位置**: `{facadeRepoviewPackage}.I{TableName}Repo`
- **实现类位置**: `{domainRepoviewPackage}.{TableName}RepoImpl`
- **视图表识别**: 仅处理包含 `viewKeyWords` 关键字的表
- **接口位置**: `{facadeViewRepositoryPackage}.I{TableName}Repo`
- **实现类位置**: `{domainViewRepositoryPackage}.{TableName}RepoImpl`
**生成的方法**
@@ -77,6 +70,7 @@
- `ignorePageSize` - 忽略分页数量(默认 10000每页数量大于10000时忽略分页
- `maxPageSize` - 最大每页数量(默认 100
- `withBLOBs` - 是否返回BLOBs列的数据
- `resultType` - 返回数据格式any, trash, valid默认
**添加的方法**
@@ -85,6 +79,13 @@
- `usePage(int pageNum, int pageSize)` - 使用页码和每页数量(自动计算 offset
- `setWithBLOBs(boolean withBLOBs)` - 设置是否返回BLOBs列的数据
- `isWithBLOBs()` - 是否返回BLOBs列的数据
- `setResultType(String type)` - 设置返回值的类型
- `resultAny()` - 不区分
- `isResultAny()` - 查询不区分
- `resultTrash()` - 回收站
- `isResultTrash()` - 查询回收站
- `resultValid()` - 有效数据
- `isResultValid()` - 查询有效数据
- `getPageNum()` - 获取当前页码
- `getPageSize()` - 获取当前每页数量
- `getOffset()` - 获取当前分页limit的offset