OrgMapper.java 1.6 KB

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