|
|
@@ -93,6 +93,7 @@ public class ImMsgReceivedServiceImpl implements IImMsgReceivedService {
|
|
|
log.info("用户登录成功:{}", JSONUtil.toJsonStr(loginInfo));
|
|
|
TenantContextHolder.setIgnore(Boolean.TRUE);
|
|
|
groupUserRepository.readAllMsg(loginInfo.getClinicId(), loginInfo.getUserId());
|
|
|
+ TenantContextHolder.setIgnore(Boolean.FALSE);
|
|
|
if(StrUtil.equals(MsgRoleType.DOCTOR,loginInfo.getRole())){
|
|
|
self.doctorOnLine(loginInfo.getClinicId());
|
|
|
}
|
|
|
@@ -104,7 +105,9 @@ public class ImMsgReceivedServiceImpl implements IImMsgReceivedService {
|
|
|
sendMsg(MsgDTO.noneMsg(loginInfo.getClinicId(),loginInfo.getUserId(),loginInfo.getUserId(),loginInfo.getTenantId()),Boolean.FALSE);
|
|
|
}else if(StrUtil.equals(MsgRoleType.DOCTOR,loginInfo.getRole())){
|
|
|
//医生上线
|
|
|
+ TenantContextHolder.setIgnore(Boolean.TRUE);
|
|
|
List<String> userIds = ServerEventCallbackHandler.onGetGroupUserIds.apply(loginInfo.getClinicId());
|
|
|
+ TenantContextHolder.setIgnore(Boolean.FALSE);
|
|
|
log.info("群组用户:{}", JSONUtil.toJsonStr(userIds));
|
|
|
CollectionUtil.removeAny(userIds,loginInfo.getUserId());
|
|
|
for (String userId : userIds) {
|
|
|
@@ -118,8 +121,6 @@ public class ImMsgReceivedServiceImpl implements IImMsgReceivedService {
|
|
|
loginInfo.getRole(),
|
|
|
Optional.ofNullable(e.getMessage()).orElse("未知错误"),
|
|
|
e);
|
|
|
- }finally {
|
|
|
- TenantContextHolder.setIgnore(Boolean.FALSE);
|
|
|
}
|
|
|
};
|
|
|
|