ISysUserRoleService.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using Dto;
  2. using Model;
  3. using Model.Base;
  4. namespace Services
  5. {
  6. public interface ISysUserRoleService : IBaseService<SysUserRole>
  7. {
  8. public int CountUserRoleByRoleId(long roleId);
  9. /// <summary>
  10. /// 删除用户角色
  11. /// </summary>
  12. /// <param name="userId"></param>
  13. /// <returns></returns>
  14. public int DeleteUserRoleByUserId(int userId);
  15. /// <summary>
  16. /// 批量删除角色对应用户
  17. /// </summary>
  18. /// <param name="roleId"></param>
  19. /// <param name="userIds"></param>
  20. /// <returns></returns>
  21. public int DeleteRoleUserByUserIds(long roleId, List<long> userIds);
  22. /// <summary>
  23. /// 添加用户角色
  24. /// </summary>
  25. /// <param name="sysUsers"></param>
  26. /// <returns></returns>
  27. public int AddUserRole(List<SysUserRole> sysUsers);
  28. /// <summary>
  29. /// 获取用户数据根据角色id
  30. /// </summary>
  31. /// <param name="roleId"></param>
  32. /// <returns></returns>
  33. public List<SysUser> GetSysUsersByRoleId(long roleId);
  34. /// <summary>
  35. /// 获取用户数据根据角色id
  36. /// </summary>
  37. /// <param name="roleUserQueryDto"></param>
  38. /// <returns></returns>
  39. public PagedInfo<SysUser> GetSysUsersByRoleId(RoleUserQueryDto roleUserQueryDto);
  40. /// <summary>
  41. /// 获取尚未指派的用户数据根据角色id
  42. /// </summary>
  43. /// <param name="roleUserQueryDto"></param>
  44. /// <returns></returns>
  45. public PagedInfo<SysUser> GetExcludedSysUsersByRoleId(RoleUserQueryDto roleUserQueryDto);
  46. /// <summary>
  47. /// 新增用户角色信息
  48. /// </summary>
  49. /// <param name="user"></param>
  50. /// <returns></returns>
  51. public int InsertUserRole(SysUser user);
  52. /// <summary>
  53. /// 新增加角色用户
  54. /// </summary>
  55. /// <param name="roleUsersCreateDto"></param>
  56. /// <returns></returns>
  57. public int InsertRoleUser(RoleUsersCreateDto roleUsersCreateDto);
  58. }
  59. }