blue
3 years ago
committed by
Gitee
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with
6 additions and
4 deletions
-
im-platform/pom.xml
-
im-platform/src/main/java/com/bx/implatform/service/impl/GroupServiceImpl.java
-
im-platform/src/main/java/com/bx/implatform/service/impl/UserServiceImpl.java
-
im-server/pom.xml
-
im-ui/src/components/chat/ChatItem.vue
|
|
|
@ -114,6 +114,7 @@ |
|
|
|
<plugin> |
|
|
|
<groupId>org.springframework.boot</groupId> |
|
|
|
<artifactId>spring-boot-maven-plugin</artifactId> |
|
|
|
<version>2.0.3.RELEASE</version> |
|
|
|
<executions> |
|
|
|
<execution> |
|
|
|
<goals> |
|
|
|
|
|
|
|
@ -230,7 +230,7 @@ public class GroupServiceImpl extends ServiceImpl<GroupMapper, Group> implements |
|
|
|
if(groupMembers.isEmpty()){ |
|
|
|
return Collections.EMPTY_LIST; |
|
|
|
} |
|
|
|
// 拉取群信息
|
|
|
|
// 拉取群列表
|
|
|
|
List<Long> ids = groupMembers.stream().map((gm -> gm.getGroupId())).collect(Collectors.toList()); |
|
|
|
QueryWrapper<Group> groupWrapper = new QueryWrapper(); |
|
|
|
groupWrapper.lambda().in(Group::getId, ids); |
|
|
|
@ -238,7 +238,7 @@ public class GroupServiceImpl extends ServiceImpl<GroupMapper, Group> implements |
|
|
|
// 转vo
|
|
|
|
List<GroupVO> vos = groups.stream().map(g -> { |
|
|
|
GroupVO vo = BeanUtils.copyProperties(g, GroupVO.class); |
|
|
|
GroupMember member = groupMembers.stream().filter(m -> g.getId() == m.getGroupId()).findFirst().get(); |
|
|
|
GroupMember member = groupMembers.stream().filter(m -> g.getId().equals(m.getGroupId())).findFirst().get(); |
|
|
|
vo.setAliasName(member.getAliasName()); |
|
|
|
vo.setRemark(member.getRemark()); |
|
|
|
return vo; |
|
|
|
|
|
|
|
@ -86,7 +86,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU |
|
|
|
@Override |
|
|
|
public void update(UserVO vo) { |
|
|
|
UserSession session = SessionContext.getSession(); |
|
|
|
if(session.getId() != vo.getId()){ |
|
|
|
if(!session.getId().equals(vo.getId()) ){ |
|
|
|
throw new GlobalException(ResultCode.PROGRAM_ERROR,"不允许修改其他用户的信息!"); |
|
|
|
} |
|
|
|
User user = this.getById(vo.getId()); |
|
|
|
|
|
|
|
@ -44,6 +44,7 @@ |
|
|
|
<plugin> |
|
|
|
<groupId>org.springframework.boot</groupId> |
|
|
|
<artifactId>spring-boot-maven-plugin</artifactId> |
|
|
|
<version>2.0.3.RELEASE</version> |
|
|
|
<executions> |
|
|
|
<execution> |
|
|
|
<goals> |
|
|
|
|
|
|
|
@ -103,7 +103,7 @@ |
|
|
|
|
|
|
|
.mid { |
|
|
|
margin-left: 15px; |
|
|
|
flex: 3; |
|
|
|
flex: 2; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
height: 100%; |
|
|
|
|