|
@ -142,6 +142,7 @@ class WechatClient extends RedisModel {
|
|
|
|
|
|
static sendAllRead(doctorId,sessionId){
|
|
|
let doctorClient = clientCache.findByIdAndType(doctorId,SOCKET_TYPES.DOCTOR);
|
|
|
let pc_doctorClient = clientCache.findByIdAndType("pc_"+doctorId,SOCKET_TYPES.PC_DOCTOR);
|
|
|
if(doctorClient){
|
|
|
if(doctorClient.sessionId==sessionId){
|
|
|
doctorClient.socket.emit('message',{ read:"all"});
|
|
@ -149,7 +150,12 @@ class WechatClient extends RedisModel {
|
|
|
log.warn(" doctor not in the same session ");
|
|
|
}
|
|
|
}else{
|
|
|
log.warn(doctorId+" target doctor is not online!");
|
|
|
if(pc_doctorClient && pc_doctorClient.sessionId == sessionId){
|
|
|
pc_doctorClient.socket.emit('message',{ read:"all"});
|
|
|
}else{
|
|
|
log.warn(doctorId+" target doctor is not online!");
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -162,6 +168,7 @@ class WechatClient extends RedisModel {
|
|
|
return;
|
|
|
}
|
|
|
let doctorClient = clientCache.findByIdAndType(doctorId,SOCKET_TYPES.DOCTOR);
|
|
|
let pc_doctorClient = clientCache.findByIdAndType("pc_"+doctorId,SOCKET_TYPES.PC_DOCTOR);
|
|
|
if(doctorClient){
|
|
|
if(doctorClient.sessionId==sessionId){
|
|
|
doctorClient.socket.emit('message',{ read:"all"});
|
|
@ -169,7 +176,12 @@ class WechatClient extends RedisModel {
|
|
|
log.warn(" doctor not in the same session ");
|
|
|
}
|
|
|
}else{
|
|
|
log.warn(doctorId+" target doctor is not online!");
|
|
|
if(pc_doctorClient && pc_doctorClient.sessionId == sessionId){
|
|
|
pc_doctorClient.socket.emit('message',{ read:"all"});
|
|
|
}else{
|
|
|
log.warn(doctorId+" target doctor is not online!");
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|