UserRoleService.java 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. package com.crm.manager.service;
  2. import com.crm.rely.backend.exception.ServiceException;
  3. import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
  4. import com.crm.rely.backend.core.dto.user.role.UserNodeDisplayDto;
  5. import com.crm.rely.backend.core.dto.user.role.UserAllRoleDto;
  6. import com.crm.rely.backend.core.dto.user.role.UserRoleDto;
  7. import com.crm.rely.backend.core.entity.user.role.*;
  8. import java.util.List;
  9. /**
  10. * 角色功能
  11. */
  12. public interface UserRoleService {
  13. /**
  14. * 获取权限
  15. *
  16. * @param roleId
  17. * @return
  18. * @throws ServiceException
  19. */
  20. List<UserNodeDisplayDto> getUserNodeDisplay(Long roleId,Long merchantId,Long operatorRoleId) throws ServiceException;
  21. /**
  22. * 判断角色是否存在
  23. *
  24. * @param roleId
  25. * @throws ServiceException
  26. */
  27. void existRole(Long roleId) throws ServiceException;
  28. /**
  29. * 添加角色信息
  30. *
  31. * @param sellerRoleAddEntity
  32. * @throws ServiceException
  33. */
  34. void addRoleInfo(UserRoleAddEntity sellerRoleAddEntity) throws ServiceException;
  35. /**
  36. * 修改角色信息(基础信息)
  37. *
  38. * @param sellerRoleUpdateEntity
  39. * @throws ServiceException
  40. */
  41. void updateRoleInfo(UserRoleUpdateEntity sellerRoleUpdateEntity) throws ServiceException;
  42. /**
  43. * 修改角色信息(权限)
  44. *
  45. * @param sellerRoleOperateListEntity
  46. * @throws ServiceException
  47. */
  48. void updateRoleInfo(UserRoleOperateListEntity sellerRoleOperateListEntity) throws ServiceException;
  49. /**
  50. * 删除角色信息
  51. *
  52. * @param roleId
  53. * @throws ServiceException
  54. */
  55. void deleteRoleInfo(Long roleId) throws ServiceException;
  56. /**
  57. * 单个获取角色信息
  58. *
  59. * @param roleId
  60. * @return
  61. * @throws ServiceException
  62. */
  63. UserRoleDto getRoleInfo(Long roleId) throws ServiceException;
  64. /**
  65. * 获取角色列表(分页)
  66. *
  67. * @param sellerRoleSearchEntity
  68. * @return
  69. * @throws ServiceException
  70. */
  71. ResultWithPagerDto<UserRoleDto> getListInfo(UserRoleSearchEntity sellerRoleSearchEntity) throws ServiceException;
  72. /**
  73. * 拉取所有角色(下拉使用)
  74. *
  75. * @return
  76. * @throws ServiceException
  77. */
  78. List<UserAllRoleDto> getListInfo() throws ServiceException;
  79. /**
  80. * 更新挂靠用户的数量
  81. *
  82. * @param entitys
  83. * @throws ServiceException
  84. */
  85. void updateNumber(List<UserRoleUpdateNumberEntity> entitys) throws ServiceException;
  86. /**
  87. * 更新挂靠用户的数量
  88. *
  89. * @param entity
  90. * @throws ServiceException
  91. */
  92. void updateNumber(UserRoleUpdateNumberEntity entity) throws ServiceException;
  93. String getRoleCodeById(Long id) throws ServiceException;
  94. /**
  95. * 根据code获取id
  96. * @param code
  97. * @return
  98. * @throws Exception
  99. */
  100. Long getIdByRoleCode(String code) throws Exception;
  101. }