SysUserRoleMapper.java 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. package com.ruoyi.system.mapper;
  2. import java.util.List;
  3. import org.apache.ibatis.annotations.Param;
  4. import com.ruoyi.system.domain.SysUserRole;
  5. /**
  6. * 用户与角色关联表 数据层
  7. *
  8. * @author ruoyi
  9. */
  10. public interface SysUserRoleMapper
  11. {
  12. /**
  13. * 通过用户ID删除用户和角色关联
  14. *
  15. * @param userId 用户ID
  16. * @return 结果
  17. */
  18. public int deleteUserRoleByUserId(Long userId);
  19. /**
  20. * 批量删除用户和角色关联
  21. *
  22. * @param ids 需要删除的数据ID
  23. * @return 结果
  24. */
  25. public int deleteUserRole(Long[] ids);
  26. /**
  27. * 通过角色ID查询角色使用数量
  28. *
  29. * @param roleId 角色ID
  30. * @return 结果
  31. */
  32. public int countUserRoleByRoleId(Long roleId);
  33. /**
  34. * 批量新增用户角色信息
  35. *
  36. * @param userRoleList 用户角色列表
  37. * @return 结果
  38. */
  39. public int batchUserRole(List<SysUserRole> userRoleList);
  40. /**
  41. * 删除用户和角色关联信息
  42. *
  43. * @param userRole 用户和角色关联信息
  44. * @return 结果
  45. */
  46. public int deleteUserRoleInfo(SysUserRole userRole);
  47. /**
  48. * 批量取消授权用户角色
  49. *
  50. * @param roleId 角色ID
  51. * @param userIds 需要删除的用户数据ID
  52. * @return 结果
  53. */
  54. public int deleteUserRoleInfos(@Param("roleId") Long roleId, @Param("userIds") Long[] userIds);
  55. }