Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
wecloud_im_server
Commits
f670341d
Commit
f670341d
authored
May 11, 2022
by
罗长华
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/xiaohudou_20220427' into xiaohudou_20220427
parents
10f5ad2d
ae35ab17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
131 additions
and
50 deletions
+131
-50
core/src/main/java/com/wecloud/im/entity/ImConversation.java
+4
-0
core/src/main/java/com/wecloud/im/param/ChatRoomMemberPageParam.java
+4
-0
core/src/main/java/com/wecloud/im/service/impl/ImConversationServiceImpl.java
+117
-44
core/src/main/java/com/wecloud/im/ws/cache/UserStateCacheManager.java
+2
-2
core/src/main/java/com/wecloud/rtc/service/impl/MangerRtcCacheServiceImpl.java
+4
-4
No files found.
core/src/main/java/com/wecloud/im/entity/ImConversation.java
View file @
f670341d
...
@@ -45,6 +45,10 @@ public class ImConversation extends BaseEntity {
...
@@ -45,6 +45,10 @@ public class ImConversation extends BaseEntity {
@ApiModelProperty
(
"群成员数量"
)
@ApiModelProperty
(
"群成员数量"
)
private
Integer
memberCount
;
private
Integer
memberCount
;
/**
* 会话属性
* @see com.wecloud.im.sdk.enums.ChatTypeEnum
*/
@ApiModelProperty
(
"会话属性,1:单聊,2:普通群,3:万人群,4:聊天室"
)
@ApiModelProperty
(
"会话属性,1:单聊,2:普通群,3:万人群,4:聊天室"
)
private
Integer
chatType
;
private
Integer
chatType
;
...
...
core/src/main/java/com/wecloud/im/param/ChatRoomMemberPageParam.java
View file @
f670341d
...
@@ -2,7 +2,9 @@ package com.wecloud.im.param;
...
@@ -2,7 +2,9 @@ package com.wecloud.im.param;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.io.Serializable
;
...
@@ -15,6 +17,8 @@ import java.io.Serializable;
...
@@ -15,6 +17,8 @@ import java.io.Serializable;
@Data
@Data
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"聊天室成员分页入参"
)
@ApiModel
(
value
=
"聊天室成员分页入参"
)
@NoArgsConstructor
@AllArgsConstructor
public
class
ChatRoomMemberPageParam
implements
Serializable
{
public
class
ChatRoomMemberPageParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
3284648263835691087L
;
private
static
final
long
serialVersionUID
=
3284648263835691087L
;
...
...
core/src/main/java/com/wecloud/im/service/impl/ImConversationServiceImpl.java
View file @
f670341d
This diff is collapsed.
Click to expand it.
core/src/main/java/com/wecloud/im/ws/cache/UserStateCacheManager.java
View file @
f670341d
...
@@ -41,7 +41,7 @@ public class UserStateCacheManager extends UserStateListener {
...
@@ -41,7 +41,7 @@ public class UserStateCacheManager extends UserStateListener {
String
[]
split
=
platformAndIp
.
split
(
RedisUtils
.
SPLIT
);
String
[]
split
=
platformAndIp
.
split
(
RedisUtils
.
SPLIT
);
String
innerPlatform
=
split
[
0
];
String
innerPlatform
=
split
[
0
];
if
(
innerPlatform
.
equals
(
String
.
valueOf
(
platform
)))
{
if
(
innerPlatform
.
equals
(
String
.
valueOf
(
platform
)))
{
redisUtils
.
removeForSet
(
getUserStateCacheKey
(
clientId
),
platformAndIp
);
//
redisUtils.removeForSet(getUserStateCacheKey(clientId), platformAndIp);
}
}
}
}
...
@@ -53,7 +53,7 @@ public class UserStateCacheManager extends UserStateListener {
...
@@ -53,7 +53,7 @@ public class UserStateCacheManager extends UserStateListener {
String
key
=
getUserStateCacheKey
(
clientId
);
String
key
=
getUserStateCacheKey
(
clientId
);
String
value
=
platform
+
RedisUtils
.
SPLIT
+
GetIpUtils
.
getlanIp
();
String
value
=
platform
+
RedisUtils
.
SPLIT
+
GetIpUtils
.
getlanIp
();
log
.
info
(
"ws用户离线删除redis key: {}, value: {}, uid: {}, clientId: {}"
,
key
,
value
,
longChannelId
,
clientId
);
log
.
info
(
"ws用户离线删除redis key: {}, value: {}, uid: {}, clientId: {}"
,
key
,
value
,
longChannelId
,
clientId
);
redisUtils
.
removeForSet
(
key
,
value
);
//
redisUtils.removeForSet(key, value);
}
}
/**
/**
...
...
core/src/main/java/com/wecloud/rtc/service/impl/MangerRtcCacheServiceImpl.java
View file @
f670341d
...
@@ -69,11 +69,11 @@ public class MangerRtcCacheServiceImpl implements MangerRtcCacheService {
...
@@ -69,11 +69,11 @@ public class MangerRtcCacheServiceImpl implements MangerRtcCacheService {
String
channelKey
=
String
.
format
(
RtcRedisKey
.
RTC_CHANNEL_INFO
,
rtcChannelId
);
String
channelKey
=
String
.
format
(
RtcRedisKey
.
RTC_CHANNEL_INFO
,
rtcChannelId
);
redisUtils
.
addKey
(
channelKey
,
rtcChannelInfoJson
,
Duration
.
ofDays
(
10
));
redisUtils
.
addKey
(
channelKey
,
rtcChannelInfoJson
,
Duration
.
ofDays
(
10
));
//用户当前在线的频道ID
//
用户当前在线的频道ID
String
userJoinChannelKey
=
String
.
format
(
RtcRedisKey
.
USER_JOIN_CHANNEL
,
clientId
);
String
userJoinChannelKey
=
String
.
format
(
RtcRedisKey
.
USER_JOIN_CHANNEL
,
clientId
);
redisUtils
.
addKey
(
userJoinChannelKey
,
rtcChannelId
.
toString
(),
Duration
.
ofDays
(
10
));
redisUtils
.
addKey
(
userJoinChannelKey
,
rtcChannelId
.
toString
(),
Duration
.
ofDays
(
10
));
//频道中存在的用户
//
频道中存在的用户
String
rtcChannelUsers
=
String
.
format
(
RtcRedisKey
.
RTC_CHANNEL_USERS
,
rtcChannelId
);
String
rtcChannelUsers
=
String
.
format
(
RtcRedisKey
.
RTC_CHANNEL_USERS
,
rtcChannelId
);
redisUtils
.
addForSet
(
rtcChannelUsers
,
clientId
+
""
,
10
,
TimeUnit
.
DAYS
);
redisUtils
.
addForSet
(
rtcChannelUsers
,
clientId
+
""
,
10
,
TimeUnit
.
DAYS
);
redisUtils
.
addForSet
(
rtcChannelUsers
,
toClientId
+
""
,
10
,
TimeUnit
.
DAYS
);
redisUtils
.
addForSet
(
rtcChannelUsers
,
toClientId
+
""
,
10
,
TimeUnit
.
DAYS
);
...
@@ -97,8 +97,8 @@ public class MangerRtcCacheServiceImpl implements MangerRtcCacheService {
...
@@ -97,8 +97,8 @@ public class MangerRtcCacheServiceImpl implements MangerRtcCacheService {
redisUtils
.
delKey
(
userJoinChannelKey
);
redisUtils
.
delKey
(
userJoinChannelKey
);
//频道中存在的用户
//频道中存在的用户
String
rtcChannelUsers
k
ey
=
String
.
format
(
RtcRedisKey
.
RTC_CHANNEL_USERS
,
rtcChannelId
);
String
rtcChannelUsers
K
ey
=
String
.
format
(
RtcRedisKey
.
RTC_CHANNEL_USERS
,
rtcChannelId
);
redisUtils
.
removeForSet
(
rtcChannelUsers
k
ey
,
clientId
+
""
);
redisUtils
.
removeForSet
(
rtcChannelUsers
K
ey
,
clientId
+
""
);
}
}
@Override
@Override
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment