Class DictDAO

java.lang.Object
io.github.xezzon.zeroweb.common.jpa.BaseDAO<Dict,String,DictRepository>
io.github.xezzon.zeroweb.dict.DictDAO
All Implemented Interfaces:
io.github.xezzon.tao.trait.NewType<DictRepository>

@Repository public class DictDAO extends io.github.xezzon.zeroweb.common.jpa.BaseDAO<Dict,String,DictRepository>
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 extends Object>, io.github.xezzon.zeroweb.common.jpa.BaseDAO.UpdateCriteriaBuilder<T extends Object>
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.data.domain.Page<Dict>
    findAll(io.github.xezzon.zeroweb.core.odata.ODataQueryOption odata)
    分页查询
    io.github.xezzon.zeroweb.common.jpa.BaseDAO.ICopier<Dict>
     
    long
    更新字典项的状态
    void
    upsert(Dict dict)
    根据 tag、code 判断,如果字典存在,则跳过;否则保存

    Methods inherited from class io.github.xezzon.zeroweb.common.jpa.BaseDAO

    get, partialUpdate

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getCopier

      public io.github.xezzon.zeroweb.common.jpa.BaseDAO.ICopier<Dict> getCopier()
      Specified by:
      getCopier in class io.github.xezzon.zeroweb.common.jpa.BaseDAO<Dict,String,DictRepository>
    • findAll

      public org.springframework.data.domain.Page<Dict> findAll(io.github.xezzon.zeroweb.core.odata.ODataQueryOption odata)
      分页查询
      Overrides:
      findAll in class io.github.xezzon.zeroweb.common.jpa.BaseDAO<Dict,String,DictRepository>
      Parameters:
      odata - 前端查询参数
      Returns:
      字典列表
    • upsert

      public void upsert(Dict dict)
      根据 tag、code 判断,如果字典存在,则跳过;否则保存
      Parameters:
      dict - 字典信息
    • updateStatus

      public long updateStatus(Collection<String> ids, Boolean enabled)
      更新字典项的状态
      Parameters:
      ids - 需要更新的字典项ID集合
      enabled - 更新后的启用状态,true为启用,false为禁用
      Returns:
      更新影响的行数