|
@@ -68,7 +68,7 @@ public class ImGroupMemberServiceImpl extends BaseServiceImpl<Long, ImGroupMembe
|
|
|
return imGroupMemberDao;
|
|
|
}
|
|
|
|
|
|
- public void joinGroup(Long imGroupId, Integer userId, String roleType, boolean isAdmin,Map<Integer,String> userRoleMap){
|
|
|
+ public ImGroup joinGroup(Long imGroupId, Integer userId, String roleType, boolean isAdmin,Map<Integer,String> userRoleMap){
|
|
|
ClassGroup classGroup = classGroupDao.get(imGroupId.intValue());
|
|
|
String tags = classGroup.getName();
|
|
|
//相关用户加入群组
|
|
@@ -103,11 +103,12 @@ public class ImGroupMemberServiceImpl extends BaseServiceImpl<Long, ImGroupMembe
|
|
|
userRoleMap.put(vipGroup.getEducationalTeacherId(), "乐团主管");
|
|
|
tags = vipGroup.getName();
|
|
|
}
|
|
|
- imGroupService.create(imGroupId, null, classGroup.getName(), tags, tags, tags, null, classGroup.getGroupType().getCode());
|
|
|
+ ImGroup imGroup = imGroupService.create(imGroupId, null, classGroup.getName(), tags, tags, tags, null, classGroup.getGroupType().getCode());
|
|
|
if(userId != null){
|
|
|
join(imGroupId,userId,roleType,isAdmin);
|
|
|
}
|
|
|
join(imGroupId,userRoleMap);
|
|
|
+ return imGroup;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -160,7 +161,7 @@ public class ImGroupMemberServiceImpl extends BaseServiceImpl<Long, ImGroupMembe
|
|
|
public boolean join(Long imGroupId, Map<Integer, String> userRoleMap) {
|
|
|
ImGroup imGroup = imGroupDao.getLocked(imGroupId);
|
|
|
if (imGroup == null) {
|
|
|
- joinGroup(imGroupId,null,null,false,userRoleMap);
|
|
|
+ imGroup = joinGroup(imGroupId,null,null,false,userRoleMap);
|
|
|
}
|
|
|
//检查用户是否已存在
|
|
|
List<Integer> existUserIdList = imGroupMemberDao.queryByImGroupIdAndUserId(imGroupId.toString(), userRoleMap.keySet().stream().filter(Objects::nonNull).map(Objects::toString)
|