接口 ResourceCommonService<T extends Y9ResourceBase>

    • 方法详细资料

      • delete

        void delete​(List<String> idList)
        批量删除资源
        参数:
        idList - 资源id列表
      • delete

        void delete​(String id)
        删除资源
        参数:
        id - 资源id
      • disable

        List<T> disable​(List<String> idList)
        批量禁用资源
        参数:
        idList - 资源id列表
        返回:
        List<T>
      • disable

        T disable​(String id)
        禁用资源
        参数:
        id - 资源id
        返回:
        T
      • enable

        List<T> enable​(List<String> idList)
        批量启用资源
        参数:
        idList - 资源id列表
        返回:
        List<T>
      • enable

        T enable​(String id)
        启用资源
        参数:
        id - 资源id
        返回:
        T
      • existsById

        boolean existsById​(String id)
        根据id判断资源是否存在
        参数:
        id - 资源id
        返回:
        对应的资源是否存在
      • findById

        Optional<T> findById​(String id)
        根据id获取资源
        参数:
        id - 资源id
        返回:
        Optional<T>资源对象
      • findByNameLike

        List<T> findByNameLike​(String name)
        根据资源名称查找资源列表
        参数:
        name - 名称
        返回:
        List<T>
      • getById

        T getById​(String id)
        根据id获取资源
        参数:
        id - 资源id
        返回:
        资源对象
        抛出:
        net.risesoft.y9.exception.Y9NotFoundException - id 对应的记录不存在的情况
      • saveOrUpdate

        T saveOrUpdate​(T resourceBase)
        新增或保存资源
        参数:
        resourceBase - 资源信息
        返回:
        T
      • updateTabIndex

        T updateTabIndex​(String id,
                         int index)
        更新排列序号
        参数:
        id - 资源id
        index - 序列号
        返回:
        T