|
@ -120,29 +120,38 @@ REST API遵循REST最佳实践,规范命名URL中的每个部分。注意POST
|
|
|
Sessions: {
|
|
|
Base: '/api/v2/sessions',
|
|
|
|
|
|
Session: '/:session_id/session',
|
|
|
Session: '/:session_id/session', // 获取会话
|
|
|
SessionListByType: '/sessionListByType', // 按会话类型获取会话
|
|
|
SessionCountByType: '/sessionCountByType', // 按会话类型获取会话数量
|
|
|
SessionSticky: '/:session_id/sticky', // 会话置顶,置顶使用PUT,取消置顶使用DELETE
|
|
|
SessionStatus: '/:session_id/status', //更新状态
|
|
|
SessionStatus: '/:session_id/status', // 更新状态
|
|
|
SessionName: '/:session_id/name', // 更新会话名称
|
|
|
RecentSessions: '/recent', // 最近会话,使用类型过滤出'患者'或'医生'会话
|
|
|
IsExist: '/isExist', // 判断会话是否存在(i健康发送muc的im消息会话前会先调用创建会话的方法,这个方法会更新redis中每个成员的最后获取时间,导致未读消息不准)
|
|
|
|
|
|
Topics: '/:topic_id/topics',
|
|
|
Topic: '/topics/:topic_id', // 议题,指定ID的议题将返回其信息
|
|
|
Topics: '/:topic_id/topics', // 获取单个议题
|
|
|
Topic: '/topics/:topic_id', // 议题,指定ID的议题将返回其信息
|
|
|
TopicEnded: '/:session_id/topics/:topic_id/ended', // 议题是否已结束,若top_id为current,则检查最后一个议题的状态
|
|
|
TopicList:'/topics',
|
|
|
TopicReplyCount:"/topics/count/reply",
|
|
|
TopicMessages:'/topic/:topic_id/messages',
|
|
|
Messages: '/:session_id/messages', // 会话消息
|
|
|
TopicInto: '/:session_id/topics/:topic_id/into', // 居民进入议题
|
|
|
TopicList:'/topics', //获取议题列表
|
|
|
HealthTopicList:'/healthTopics', //健康咨询
|
|
|
TopicListByType:'/topicListByType', //按类型查找咨询(未回复,进行中,已回复)
|
|
|
TopicListCountByType:'/topicListCountByType', //按类型查找咨询(未回复,进行中,已回复)的数量
|
|
|
HealthTeamTopicList:'/healthTeamTopics', //健康咨询(区分团队)
|
|
|
TopicReplyCount:"/topics/count/reply", //议题回复数统计
|
|
|
TopicMessages:'/topic/:topic_id/messages', //议题消息
|
|
|
Messages: '/:session_id/messages', // 会话消息
|
|
|
MessagesByTopic: '/:session_id/topics/:topic_id/messages', // 议题消息
|
|
|
Message: '/:session_id/messages/:message_id', // 单条消息
|
|
|
|
|
|
SessionsUnreadMessageCount: '/unread_message_count', // 所有会话的未读消息数
|
|
|
SessionUnreadMessageCount: '/:session_id/unread_message_count', // 指定会话的未读消息数
|
|
|
SessionUnreadMessages: '/:session_id/messages/unread', // 会话未读消息
|
|
|
SessionUnreadMessages: '/:session_id/messages/unread', // 会话未读消息
|
|
|
|
|
|
ParticipantUpdate:'/:session_id/participant/update',//更新成员=删除旧成员,新增新成员
|
|
|
ParticipantUpdate:'/:session_id/participant/update', //更新成员=删除旧成员,新增新成员
|
|
|
Participants: '/:session_id/participants', // 会话所有成员
|
|
|
ParticipantsAvatar: '/:session_id/participants/avatars', // 会话所有成员头像
|
|
|
Participant: '/:session_id/participants/:participant_id', // 会话单个成员
|
|
|
Participant: '/:session_id/participants/:participant_id', // 会话单个成员(多个participant_id 用英文逗号间隔)
|
|
|
ParticipantAvatar: '/:session_id/participants/:participant_id/avatars' // 会话单个成员头像
|
|
|
}
|
|
|
### 业务分析
|
|
@ -164,6 +173,10 @@ REST API遵循REST最佳实践,规范命名URL中的每个部分。注意POST
|
|
|
11、预留
|
|
|
12、小视频消息
|
|
|
13、预留
|
|
|
14、进入议题 系统发送的会话消息
|
|
|
15、续方审核消息消息
|
|
|
16、续方咨询血糖血压咨询消息
|
|
|
17、续方咨询随访问卷消息
|
|
|
|
|
|
**会话类型**
|
|
|
|
|
@ -175,7 +188,11 @@ REST API遵循REST最佳实践,规范命名URL中的每个部分。注意POST
|
|
|
c、type =3 消息保存group_messages、行政团队聊天会话
|
|
|
|
|
|
d、type =0 消息保存system_messages 系统聊天会话
|
|
|
|
|
|
|
|
|
e、type =4 临时讨论组
|
|
|
f、type =5 专科医生和家庭医生的固定组
|
|
|
g、type =8 续方咨询
|
|
|
|
|
|
sessions的business_type字段
|
|
|
|
|
|
a、business_type =1 此会话不包含患者
|
|
@ -255,6 +272,17 @@ select w.* from muc_messages w ,(
|
|
|
select m.`timestamp` as begin_date,m2.`timestamp` as end_date,t.session_id from topics t,muc_messages m, muc_messages m2 where m.id = t.start_message_id and m2.id = t.end_message_id and t.session_id = '4d5be29f8ba0413d8658441902b958ff_c7a121954a3a4fae84852fd5668b590d_2'
|
|
|
) s where w.session_id = s.session_id and w.`timestamp` >= s.begin_date and w.`timestamp`<=s.end_date;
|
|
|
|
|
|
-- 系统不稳定的时候会出现wlyy和im库其中一个数据库的数据没有新增,目前是手动处理,后续可以考虑写job定时处理脏数据
|
|
|
SELECT * from wlyy.wlyy_patient WHERE mobile = '';-- 查找居民
|
|
|
SELECT * from wlyy.wlyy_consult WHERE patient = '';-- 查找居民咨询
|
|
|
SELECT * from wlyy.wlyy_consult_team WHERE patient = '';-- 查找居民咨询
|
|
|
|
|
|
SELECT * from im.topics WHERE id = ''; -- 查找议题
|
|
|
SELECT * from im.sessions WHERE id = ''; -- 查找会话
|
|
|
SELECT * from im.muc_messages WHERE session_id = '' ORDER BY `timestamp` desc;-- 查找聊天记录
|
|
|
(ps:大部分是im库有数据,wlyy库没有数据,此时只需要吧wlyy_consult和wlyy_consult_team的数据手动插入即可)
|
|
|
|
|
|
|
|
|
###更改NODE插件数据源在安装完成NODE及配置完成环境变量后执行
|
|
|
npm config set registry https://registry.npm.taobao.org
|
|
|
设置完成后执行npm install 即可安装相对于的插件。
|