DictMapper.java 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. package com.huaxu.dao;
  2. import com.baomidou.mybatisplus.core.metadata.IPage;
  3. import com.huaxu.entity.Dict;
  4. import org.apache.ibatis.annotations.Mapper;
  5. import org.apache.ibatis.annotations.Param;
  6. import java.util.List;
  7. /**
  8. * 数据字典(Dict)表数据库访问层
  9. *
  10. * @author yjy
  11. * @since 2020-10-26
  12. */
  13. @Mapper
  14. public interface DictMapper {
  15. /**
  16. * 通过ID查询单条数据
  17. *
  18. * @param id 主键
  19. * @return 实例对象
  20. */
  21. Dict selectById(Integer id);
  22. /**
  23. * 查询全部
  24. *
  25. * @return 对象列表
  26. */
  27. List<Dict> selectAll();
  28. /**
  29. * 通过实体作为筛选条件查询
  30. *
  31. * @param dict 实例对象
  32. * @return 对象列表
  33. */
  34. List<Dict> selectList(Dict dict);
  35. /**
  36. * 新增数据
  37. *
  38. * @param dict 实例对象
  39. * @return 影响行数
  40. */
  41. int insert(Dict dict);
  42. /**
  43. * 批量新增
  44. *
  45. * @param dicts 实例对象的集合
  46. * @return 影响行数
  47. */
  48. int batchInsert(List<Dict> dicts);
  49. /**
  50. * 修改数据
  51. *
  52. * @param dict 实例对象
  53. * @return 影响行数
  54. */
  55. int update(Dict dict);
  56. /**
  57. * 通过主键删除数据
  58. *
  59. * @param ids 主键
  60. * @return 影响行数
  61. */
  62. int deleteById(@Param("ids") Long[] ids);
  63. /**
  64. * 查询总数据数
  65. *
  66. * @return 数据总数
  67. */
  68. int count();
  69. IPage<Dict> selectPage(IPage<Dict> page, Dict dict);
  70. }