平安校园
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

IDictService.cs 2.5 KiB

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