DictService.java 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. package com.huaxu.service;
  2. import com.baomidou.mybatisplus.core.metadata.IPage;
  3. import com.huaxu.dto.DictDto;
  4. import com.huaxu.entity.Dict;
  5. import java.util.List;
  6. /**
  7. * 数据字典(Dict)表服务接口
  8. *
  9. * @author yjy
  10. * @since 2020-10-26
  11. */
  12. public interface DictService {
  13. /**
  14. * 通过ID查询单条数据
  15. *
  16. * @param id 主键
  17. * @return 实例对象
  18. */
  19. Dict selectById(Integer id);
  20. /**
  21. * 查询全部
  22. *
  23. * @return 对象列表
  24. */
  25. List<Dict> selectAll();
  26. /**
  27. * 通过实体作为筛选条件查询
  28. *
  29. * @param dict 实例对象
  30. * @return 对象列表
  31. */
  32. List<Dict> selectList(Dict dict);
  33. /**
  34. * 新增数据
  35. *
  36. * @param dict 实例对象
  37. * @return 影响行数
  38. */
  39. int insert(Dict dict);
  40. /**
  41. * 批量新增
  42. *
  43. * @param dicts 实例对象的集合
  44. * @return 影响行数
  45. */
  46. int batchInsert(List<Dict> dicts);
  47. /**
  48. * 修改数据
  49. *
  50. * @param dict 实例对象
  51. * @return 修改
  52. */
  53. int update(Dict dict);
  54. /**
  55. * 通过主键删除数据
  56. *
  57. * @param ids 主键
  58. * @return 影响行数
  59. */
  60. int deleteById(Long[] ids);
  61. /**
  62. * 查询总数据数
  63. *
  64. * @return 数据总数
  65. */
  66. int count();
  67. IPage<Dict> selectPage(Dict app, IPage<Dict> page);
  68. /**
  69. * 字典编码和父配置ID数量
  70. *
  71. * @return 数据总数
  72. */
  73. int countByCodePid(Dict dict);
  74. /**
  75. * 查询父列表
  76. *
  77. * @param dict 实例对象
  78. * @return 对象列表
  79. */
  80. List<DictDto> selectParentList(Dict dict);
  81. }