|
-
- //
-
-
-
-
-
-
-
-
- namespace SafeCampus.System;
-
- /// <summary>
- /// 字典服务
- /// </summary>
- public interface IDictService : ITransient
- {
- /// <summary>
- /// 添加字典
- /// </summary>
- /// <param name="input">输入参数</param>
- /// <returns></returns>
- Task Add(DictAddInput input);
-
- /// <summary>
- /// 构建字典树形结构
- /// </summary>
- /// <param name="dictList">字典列表</param>
- /// <param name="parentId">父ID</param>
- /// <returns>字典树形结构</returns>
- List<SysDict> ConstructResourceTrees(List<SysDict> dictList, long parentId = 0);
-
- /// <summary>
- /// 删除字典
- /// </summary>
- /// <param name="input">删除参数</param>
- /// <returns></returns>
- Task Delete(DictDeleteInput input);
-
- /// <summary>
- /// 编辑字典
- /// </summary>
- /// <param name="input">输入参数</param>
- /// <returns></returns>
- Task Edit(DictAddInput input);
-
- /// <summary>
- /// 获取字典
- /// </summary>
- /// <param name="dictValue">字典</param>
- /// <returns></returns>
- Task<SysDict> GetDict(string dictValue);
-
- /// <summary>
- /// 获取所有
- /// </summary>
- /// <returns>字典列表</returns>
- Task<List<SysDict>> GetListAsync();
-
- /// <summary>
- /// 根据字典DictValue获取字典值列表
- /// </summary>
- /// <param name="dictValue">字典值</param>
- /// <param name="devDictList">字典列表</param>
- /// <returns>字典值列表</returns>
- Task<List<string>> GetValuesByDictValue(string dictValue, List<SysDict> devDictList = null);
-
- /// <summary>
- /// 根据字典DictValue列表获取对应字典值列表
- /// </summary>
- /// <param name="dictValues">字典值列表</param>
- /// <returns></returns>
- Task<Dictionary<string, List<string>>> GetValuesByDictValue(string[] dictValues);
-
- /// <summary>
- /// 字典分页查询
- /// </summary>
- /// <param name="input">查询参数</param>
- /// <returns>字典分页列表</returns>
- Task<SqlSugarPagedList<SysDict>> Page(DictPageInput input);
-
- /// <summary>
- /// 获取字典树形结构
- /// </summary>
- /// <param name="input">查询参数</param>
- /// <returns>字典树形结构</returns>
- Task<List<SysDict>> Tree(DictTreeInput input);
-
- /// <summary>
- /// 根据字典值获取子级字典
- /// </summary>
- /// <param name="dictValue">字典值</param>
- /// <returns></returns>
- Task<List<SysDict>> GetChildrenByDictValue(string dictValue);
- }
|