Sfoglia il codice sorgente

fix
研究队列推送

lifang 1 mese fa
parent
commit
a279ee5223

+ 7 - 1
tr-modules/tr-module-mobile/src/main/java/cn/tr/module/mobile/service/impl/ImMsgReceivedServiceImpl.java

@@ -104,7 +104,13 @@ public class ImMsgReceivedServiceImpl implements IImMsgReceivedService {
                 }else if(!StrUtil.equals(MsgRoleType.DOCTOR,loginInfo.getRole())){
                     sendMsg(MsgDTO.noneMsg(loginInfo.getClinicId(),loginInfo.getUserId(),loginInfo.getUserId(),loginInfo.getTenantId()),Boolean.FALSE);
                 }else if(StrUtil.equals(MsgRoleType.DOCTOR,loginInfo.getRole())){
-                    sendMsg(MsgDTO.onlineMsg(loginInfo.getClinicId(),loginInfo.getUserId(),loginInfo.getUserId(),loginInfo.getTenantId()),Boolean.FALSE);
+                    //医生上线
+                    List<String> userIds = ServerEventCallbackHandler.onGetGroupUserIds.apply(loginInfo.getClinicId());
+                    log.info("群组用户:{}", JSONUtil.toJsonStr(userIds));
+                    CollectionUtil.removeAny(userIds,loginInfo.getUserId());
+                    for (String userId : userIds) {
+                        sendMsg(MsgDTO.onlineMsg(loginInfo.getClinicId(),loginInfo.getUserId(),userId,loginInfo.getTenantId()),Boolean.FALSE);
+                    }
                 }
             }catch (Exception e){
                 log.warn("发送消息失败:{%s}",e.getMessage());