UserGroupMapper.java 2.0 KB

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