OrgMapper.java 1.9 KB

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