|
@ -843,7 +843,7 @@ class Sessions extends RedisModel {
|
|
for (let j in res) {
|
|
for (let j in res) {
|
|
if (res[j].type == SESSION_TYPES.SYSTEM) {
|
|
if (res[j].type == SESSION_TYPES.SYSTEM) {
|
|
if (j == res.length - 1) {
|
|
if (j == res.length - 1) {
|
|
ModelUtil.emitOK(self.eventEmitter, {count: count});
|
|
|
|
|
|
ModelUtil.emitOK(self.eventEmitter, {count: count, patient: patientCount, doctor: doctorCount});
|
|
}
|
|
}
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
@ -858,7 +858,7 @@ class Sessions extends RedisModel {
|
|
}
|
|
}
|
|
|
|
|
|
count = count + con;
|
|
count = count + con;
|
|
if (session.type == SESSION_BUSINESS_TYPE.PATIENT) {
|
|
|
|
|
|
if (session.business_type == SESSION_BUSINESS_TYPE.PATIENT) {
|
|
patientCount = patientCount + con;
|
|
patientCount = patientCount + con;
|
|
} else {
|
|
} else {
|
|
doctorCount = doctorCount + con;
|
|
doctorCount = doctorCount + con;
|
|
@ -1232,6 +1232,8 @@ class Sessions extends RedisModel {
|
|
if(sessionType==SESSION_TYPES.P2P){
|
|
if(sessionType==SESSION_TYPES.P2P){
|
|
WechatClient.sendReadDoctorByDoctorId(targetUserId, message);
|
|
WechatClient.sendReadDoctorByDoctorId(targetUserId, message);
|
|
}
|
|
}
|
|
|
|
//告知医生新消息
|
|
|
|
WechatClient.sendSocketMessageToDoctor(targetUserId,message);
|
|
AppClient.sendNotification(targetUserId, message);
|
|
AppClient.sendNotification(targetUserId, message);
|
|
}
|
|
}
|
|
});
|
|
});
|