平安校园
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

96 lines
2.5 KiB

  1. //
  2. namespace SafeCampus.System;
  3. /// <summary>
  4. /// 字典服务
  5. /// </summary>
  6. public interface IDictService : ITransient
  7. {
  8. /// <summary>
  9. /// 添加字典
  10. /// </summary>
  11. /// <param name="input">输入参数</param>
  12. /// <returns></returns>
  13. Task Add(DictAddInput input);
  14. /// <summary>
  15. /// 构建字典树形结构
  16. /// </summary>
  17. /// <param name="dictList">字典列表</param>
  18. /// <param name="parentId">父ID</param>
  19. /// <returns>字典树形结构</returns>
  20. List<SysDict> ConstructResourceTrees(List<SysDict> dictList, long parentId = 0);
  21. /// <summary>
  22. /// 删除字典
  23. /// </summary>
  24. /// <param name="input">删除参数</param>
  25. /// <returns></returns>
  26. Task Delete(DictDeleteInput input);
  27. /// <summary>
  28. /// 编辑字典
  29. /// </summary>
  30. /// <param name="input">输入参数</param>
  31. /// <returns></returns>
  32. Task Edit(DictAddInput input);
  33. /// <summary>
  34. /// 获取字典
  35. /// </summary>
  36. /// <param name="dictValue">字典</param>
  37. /// <returns></returns>
  38. Task<SysDict> GetDict(string dictValue);
  39. /// <summary>
  40. /// 获取所有
  41. /// </summary>
  42. /// <returns>字典列表</returns>
  43. Task<List<SysDict>> GetListAsync();
  44. /// <summary>
  45. /// 根据字典DictValue获取字典值列表
  46. /// </summary>
  47. /// <param name="dictValue">字典值</param>
  48. /// <param name="devDictList">字典列表</param>
  49. /// <returns>字典值列表</returns>
  50. Task<List<string>> GetValuesByDictValue(string dictValue, List<SysDict> devDictList = null);
  51. /// <summary>
  52. /// 根据字典DictValue列表获取对应字典值列表
  53. /// </summary>
  54. /// <param name="dictValues">字典值列表</param>
  55. /// <returns></returns>
  56. Task<Dictionary<string, List<string>>> GetValuesByDictValue(string[] dictValues);
  57. /// <summary>
  58. /// 字典分页查询
  59. /// </summary>
  60. /// <param name="input">查询参数</param>
  61. /// <returns>字典分页列表</returns>
  62. Task<SqlSugarPagedList<SysDict>> Page(DictPageInput input);
  63. /// <summary>
  64. /// 获取字典树形结构
  65. /// </summary>
  66. /// <param name="input">查询参数</param>
  67. /// <returns>字典树形结构</returns>
  68. Task<List<SysDict>> Tree(DictTreeInput input);
  69. /// <summary>
  70. /// 根据字典值获取子级字典
  71. /// </summary>
  72. /// <param name="dictValue">字典值</param>
  73. /// <returns></returns>
  74. Task<List<SysDict>> GetChildrenByDictValue(string dictValue);
  75. }