|
@ -260,33 +260,8 @@ class Doctor extends BaseModel {
|
|
timestamp: objectUtil.timestampToLong(patient.timestamp)
|
|
timestamp: objectUtil.timestampToLong(patient.timestamp)
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
// 含有患者的群
|
|
|
|
gmRepo.findAllGroupsWithPatient(userId, function (err, groups) {
|
|
|
|
if (err) {
|
|
|
|
modelUtil.emitDbError(self.eventEmitter, 'Get group list with patient failed', err);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (let i = 0; i < groups.length; i++) {
|
|
|
|
let group = groups[i];
|
|
|
|
|
|
|
|
// 过滤掉医生间的求助团队
|
|
|
|
if (group.group_type === 2) continue;
|
|
|
|
|
|
|
|
chats.groups.push({
|
|
|
|
code: group.code,
|
|
|
|
name: group.name,
|
|
|
|
groupType: group.msg_type,
|
|
|
|
newMessageCount: group.new_msg_count,
|
|
|
|
lastContentType: group.last_content_type,
|
|
|
|
lastContent: group.last_content,
|
|
|
|
timestamp: objectUtil.timestampToLong(group.timestamp)
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// 医生间的私聊
|
|
// 医生间的私聊
|
|
pmRepo.findAllP2PWithDoctor(userId, function (err, doctors) {
|
|
|
|
|
|
pmRepo.findAllP2PWithDoctor(userId, function (err, doctors) {
|
|
if (err) {
|
|
if (err) {
|
|
modelUtil.emitDbError(self.eventEmitter, 'Get chat list with doctor failed', err);
|
|
modelUtil.emitDbError(self.eventEmitter, 'Get chat list with doctor failed', err);
|
|
return;
|
|
return;
|
|
@ -329,7 +304,6 @@ class Doctor extends BaseModel {
|
|
modelUtil.emitData(self.eventEmitter, chats);
|
|
modelUtil.emitData(self.eventEmitter, chats);
|
|
});
|
|
});
|
|
});
|
|
});
|
|
})
|
|
|
|
});
|
|
});
|
|
}
|
|
}
|
|
getYdfList(userId){
|
|
getYdfList(userId){
|