|
@@ -67,7 +67,7 @@ public class GroupsServiceImpl extends ServiceImpl<GroupsMapper, Groupss>
|
|
|
|
|
|
@Autowired
|
|
|
private UserRelationshipsMapper userRelationshipsMapper;
|
|
|
-
|
|
|
+// 穿件群聊
|
|
|
@Override
|
|
|
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class, timeout = 30)
|
|
|
public Result addGroup(AddGroupsDto addGroupsDto) {
|
|
@@ -163,7 +163,7 @@ public class GroupsServiceImpl extends ServiceImpl<GroupsMapper, Groupss>
|
|
|
|
|
|
return Result.ERR(null, "添加失败");
|
|
|
}
|
|
|
-
|
|
|
+// 查询拉人的用户
|
|
|
@Override
|
|
|
public Result selectAddGroup(AddUserLoginDto addUserLoginDto) {
|
|
|
List<UserRelationships> userRelationships = userRelationshipsMapper.selectList(new LambdaQueryWrapper<UserRelationships>().eq(UserRelationships::getUserId, addUserLoginDto.getUid()));
|
|
@@ -255,28 +255,28 @@ public class GroupsServiceImpl extends ServiceImpl<GroupsMapper, Groupss>
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-//查询所有的群ID和群里面成员ID
|
|
|
- @Override
|
|
|
- public List<GroupDto> getList() {
|
|
|
- List<Groupss> list = this.list();
|
|
|
- List<GroupDto> list3 = new ArrayList<>();
|
|
|
-// 所有的群ID
|
|
|
- List<Long> collect = list.stream().map(Groupss::getGroupId).collect(Collectors.toList());
|
|
|
- List<GroupMembers> list1 = groupMembersService.list();
|
|
|
- for (Long c:collect) {
|
|
|
- List<Long> list2 = new ArrayList<>();
|
|
|
- for (GroupMembers m: list1) {
|
|
|
- if (c.equals(m.getGroupId())){
|
|
|
- list2.add(m.getUserId());
|
|
|
+ //查询所有的群ID和群里面成员ID
|
|
|
+ @Override
|
|
|
+ public List<GroupDto> getList() {
|
|
|
+ List<Groupss> list = this.list();
|
|
|
+ List<GroupDto> list3 = new ArrayList<>();
|
|
|
+ // 所有的群ID
|
|
|
+ List<Long> collect = list.stream().map(Groupss::getGroupId).collect(Collectors.toList());
|
|
|
+ List<GroupMembers> list1 = groupMembersService.list();
|
|
|
+ for (Long c:collect) {
|
|
|
+ List<Long> list2 = new ArrayList<>();
|
|
|
+ for (GroupMembers m: list1) {
|
|
|
+ if (c.equals(m.getGroupId())){
|
|
|
+ list2.add(m.getUserId());
|
|
|
+ }
|
|
|
}
|
|
|
+ GroupDto groupDto = new GroupDto();
|
|
|
+ groupDto.setGroupId(c);
|
|
|
+ groupDto.setUid(list2);
|
|
|
+ list3.add(groupDto);
|
|
|
}
|
|
|
- GroupDto groupDto = new GroupDto();
|
|
|
- groupDto.setGroupId(c);
|
|
|
- groupDto.setUid(list2);
|
|
|
- list3.add(groupDto);
|
|
|
+ return list3;
|
|
|
}
|
|
|
- return list3;
|
|
|
- }
|
|
|
|
|
|
// 查询群成员
|
|
|
@Override
|
|
@@ -328,6 +328,7 @@ public class GroupsServiceImpl extends ServiceImpl<GroupsMapper, Groupss>
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// 设置角色
|
|
|
@Override
|
|
|
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class, timeout = 30)
|
|
|
public Result updateGroupMemberRole(UpdateGroupMemberRoleDto updateGroupMemberRoleDto) {
|