重构群组CMD命令

This commit is contained in:
王超 2020-04-05 18:42:51 +08:00
parent 8ee99e6e2b
commit c3010c9f52
3 changed files with 4 additions and 4 deletions

View File

@ -48,7 +48,7 @@ public class JoinGroupReqHandler extends AbstractCmdHandler {
User notifyUser = new User(clientUser.getUserId(),clientUser.getNick());
Group joinGroup = JsonKit.toBean(packet.getBody(),Group.class);
String groupId = joinGroup.getGroup_id();
String groupId = joinGroup.getGroupId();
//发进房间通知 COMMAND_JOIN_GROUP_NOTIFY_RESP
JoinGroupNotifyRespBody joinGroupNotifyRespBody = new JoinGroupNotifyRespBody(Command.COMMAND_JOIN_GROUP_NOTIFY_RESP, ImStatus.C10011)
.setGroup(groupId)
@ -67,7 +67,7 @@ public class JoinGroupReqHandler extends AbstractCmdHandler {
throw new ImException("body is null");
}
Group joinGroup = JsonKit.toBean(packet.getBody(),Group.class);
String groupId = joinGroup.getGroup_id();
String groupId = joinGroup.getGroupId();
if (StringUtils.isBlank(groupId)) {
log.error("group is null,{}", imChannelContext);
Jim.close(imChannelContext, "group is null when join group");

View File

@ -122,7 +122,7 @@ public class RedisImBindListener extends AbstractImBindListener{
return;
}
for(Group group : groups){
if(groupId.equals(group.getGroup_id())){
if(groupId.equals(group.getGroupId())){
groupCache.put(groupId+SUFFIX+INFO, group);
break;
}

View File

@ -369,7 +369,7 @@ public class RedisMessageHelper extends AbstractMessageHelper{
return null;
}
for(Group group : friends){
if(friend_group_id.equals(group.getGroup_id())){
if(friend_group_id.equals(group.getGroupId())){
List<User> users = group.getUsers();
if(CollectionUtils.isEmpty(users)) {
return null;