ImGroupMemberService.java 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. package com.ym.mec.biz.service;
  2. import com.ym.mec.auth.api.entity.SysUser;
  3. import com.ym.mec.biz.dal.entity.ImGroup;
  4. import com.ym.mec.biz.dal.entity.ImGroupMember;
  5. import com.ym.mec.common.service.BaseService;
  6. import java.util.List;
  7. import java.util.Map;
  8. public interface ImGroupMemberService extends BaseService<Long, ImGroupMember> {
  9. /**
  10. * 加入群组
  11. * @param imGroupId 群编号
  12. * @param userId 用户编号
  13. * @param roleType 角色类型
  14. * @param isAdmin 是否是管理员
  15. * @return
  16. */
  17. boolean join(String imGroupId, Integer userId, String roleType, boolean isAdmin);
  18. /**
  19. * 加入群组
  20. * @param imGroupId 群编号
  21. * @param roleType 角色类型
  22. * @param isAdmin 是否是管理员
  23. * @return
  24. */
  25. boolean join(String imGroupId, String roleType, boolean isAdmin, ImGroup imGroup, SysUser user);
  26. /**
  27. * 批量加入群组
  28. * @param imGroupId 群组编号
  29. * @param userRoleMap key-用户编号 value-角色类型
  30. * @return
  31. */
  32. boolean join(String imGroupId, Map<Integer, String> userRoleMap);
  33. /**
  34. * 指定用户退出群组
  35. * @param imGroupId 群组编号
  36. * @param userId 指定的用户编号
  37. * @return
  38. */
  39. boolean quit(String imGroupId, Integer userId);
  40. /**
  41. * 退出指定群组
  42. * @param imGroupIdList 群组编号列表
  43. * @param userId 用户编号
  44. * @return
  45. */
  46. boolean quit(List<String> imGroupIdList, Integer userId);
  47. /**
  48. * 用户批量退出群组
  49. * @param imGroupId 群组编号
  50. * @param userIdList 学生编号
  51. * @return
  52. */
  53. boolean quit(String imGroupId, List<Integer> userIdList);
  54. /**
  55. * 修改角色类型
  56. * @param imGroupId 群组编号
  57. * @param userId 用户编号
  58. * @param roleType 角色类型
  59. * @return
  60. */
  61. boolean updateRoleType(String imGroupId, Integer userId, String roleType);
  62. void batchInsert(List<ImGroupMember> imGroupMemberList);
  63. /**
  64. * 批量删除
  65. * @param imGroupMemberList
  66. */
  67. void batchDelete(List<ImGroupMember> imGroupMemberList);
  68. /**
  69. * 根据群编号和用户编号批量删除
  70. * @param imGroupMemberList
  71. */
  72. void batchDeleteByGroupIdAndUserId(List<ImGroupMember> imGroupMemberList);
  73. /**
  74. * 是否在群里
  75. * @param groupId
  76. * @param userId
  77. * @return
  78. */
  79. boolean isExit(String groupId, String userId);
  80. void delRepeat();
  81. List<ImGroupMember> queryMembers(String groupId, List<String> userIdList, Integer tenantId);
  82. }