|
@ -1412,6 +1412,37 @@ class Sessions extends RedisModel {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
/*function callback(res, j, session) {
|
|
|
self.getSessionUnreadMessageCount(res[j].id, userId, function (err, con) {
|
|
|
if (err) {
|
|
|
if(handler)
|
|
|
{
|
|
|
handler(err,count);
|
|
|
return;
|
|
|
}
|
|
|
ModelUtil.logError("getAllSessionsUnreadMessageCount is failed", err);
|
|
|
}
|
|
|
|
|
|
count = count + con;
|
|
|
if (session.business_type == SESSION_BUSINESS_TYPE.PATIENT) {
|
|
|
if(session.status == SESSION_STATUS.ENDED){//新增判断是否咨询结束
|
|
|
patientEndCount = patientEndCount + con;
|
|
|
}else{
|
|
|
patientCount = patientCount + con;
|
|
|
}
|
|
|
} else {
|
|
|
doctorCount = doctorCount + con;
|
|
|
}
|
|
|
if (j == res.length - 1) {
|
|
|
if(handler)
|
|
|
{
|
|
|
handler(err,count)
|
|
|
return;
|
|
|
}
|
|
|
ModelUtil.emitOK(self.eventEmitter, {count: count, patient: patientCount,patientEnd: patientEndCount, doctor: doctorCount});
|
|
|
}
|
|
|
})
|
|
|
}*/
|
|
|
function callback(res, j, session) {
|
|
|
self.getSessionUnreadMessageCount(res[j].id, userId, function (err, con) {
|
|
|
if (err) {
|