Class DictDAO
java.lang.Object
io.github.xezzon.zeroweb.common.jpa.BaseDAO<Dict, String, DictRepository>
io.github.xezzon.zeroweb.dict.internal.DictDAO
- All Implemented Interfaces:
io.github.xezzon.zeroweb.core.trait.NewType<DictRepository>
@Repository
@NullMarked
public class DictDAO
extends io.github.xezzon.zeroweb.common.jpa.BaseDAO<Dict, String, DictRepository>
字典数据访问对象
继承自 BaseDAO,提供字典数据的增删改查功能。
实现了分页查询、状态更新等业务方法。
- Author:
- xezzon
-
Nested Class Summary
Nested classes/interfaces inherited from class io.github.xezzon.zeroweb.common.jpa.BaseDAO
io.github.xezzon.zeroweb.common.jpa.BaseDAO.ICopier<T>, io.github.xezzon.zeroweb.common.jpa.BaseDAO.UpdateCriteriaBuilder<T> -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Page<Dict> findAll(io.github.xezzon.zeroweb.core.odata.ODataQueryOption odata) 分页查询io.github.xezzon.zeroweb.common.jpa.BaseDAO.ICopier<Dict> 数据复制器实例longupdateStatus(Collection<String> ids, Boolean enabled) 更新字典项的状态void插入或更新字典数据Methods inherited from class io.github.xezzon.zeroweb.common.jpa.BaseDAO
get, partialUpdate
-
Method Details
-
getCopier
数据复制器实例- Specified by:
getCopierin classio.github.xezzon.zeroweb.common.jpa.BaseDAO<Dict, String, DictRepository>- Returns:
- 字典数据复制器
-
findAll
public org.springframework.data.domain.Page<Dict> findAll(io.github.xezzon.zeroweb.core.odata.ODataQueryOption odata) 分页查询- Overrides:
findAllin classio.github.xezzon.zeroweb.common.jpa.BaseDAO<Dict, String, DictRepository>- Parameters:
odata- 前端查询参数- Returns:
- 字典列表
-
upsert
-
updateStatus
更新字典项的状态- Parameters:
ids- 需要更新的字典项ID集合enabled- 更新后的启用状态,true为启用,false为禁用- Returns:
- 更新影响的行数
-