blue
2 years ago
committed by
Gitee
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with
13 additions and
5 deletions
-
README.md
-
im-server/src/main/java/com/bx/imserver/netty/UserChannelCtxMap.java
|
|
|
@ -44,10 +44,10 @@ |
|
|
|
|-------------|----------------------------------| |
|
|
|
| im-platform | 业务平台服务,负责处理来自用户的业务请求(http) | |
|
|
|
| im-server | 消息推送服务,不依赖业务,负责将消息推送给用户(ws) | |
|
|
|
| im-client | 消息推送sdk, 任何服务均可集成此sdk与im-server通信 | |
|
|
|
| im-common | 公共包 | |
|
|
|
| im-ui | web页面 | |
|
|
|
| im-uniapp | uniapp页面 | |
|
|
|
| im-client | 消息推送sdk, 其他服务可集成此sdk与im-server通信 | |
|
|
|
| im-common | 公共包,后端服务均依赖此包 | |
|
|
|
| im-web | web页面 | |
|
|
|
| im-uniapp | uniapp页面,可打包成app、h5、微信小程序 | |
|
|
|
|
|
|
|
#### 消息推送方案 |
|
|
|
 |
|
|
|
@ -85,6 +85,10 @@ npm run serve |
|
|
|
将im-uniapp目录导入HBuilderX,点击菜单"运行"->"开发环境-h5" |
|
|
|
访问 http://localhost:5173 |
|
|
|
|
|
|
|
#### 接入消息推送 |
|
|
|
盒子IM对消息推送模块进行了剥离和封装, 如果您不关心盒子IM的业务功能,只需要一个可以将消息推送至前端的服务,则只需要启动im-server即可 |
|
|
|
然后参考以下文档进行接入: |
|
|
|
https://www.yuque.com/u1475064/mufu2a/vn5u10ephxh9sau8 |
|
|
|
|
|
|
|
#### 界面截图 |
|
|
|
私聊: |
|
|
|
@ -121,5 +125,6 @@ npm run serve |
|
|
|
|
|
|
|
1. 本系统允许用于商业用途,且不收费(自愿投币)。**但切记不要用于任何非法用途** ,本软件作者不会为此承担任何责任 |
|
|
|
1. 基于本系统二次开发后再次开源的项目,请注明引用出处,以避免引发不必要的误会 |
|
|
|
1. 为方便管理,要pr的同学请将代码提交到v_3.0.0分支,作者会在功能上线时合并到master分支 |
|
|
|
1. 作者目前不打算接项目,如果能接受1k/天以上的报价,也可以聊聊 |
|
|
|
|
|
|
|
|
|
|
|
@ -20,6 +20,9 @@ public class UserChannelCtxMap { |
|
|
|
if (userId != null && terminal != null && channelMap.containsKey(userId)) { |
|
|
|
Map<Integer, ChannelHandlerContext> userChannelMap = channelMap.get(userId); |
|
|
|
userChannelMap.remove(terminal); |
|
|
|
if (userChannelMap.isEmpty()) { |
|
|
|
channelMap.remove(userId); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|