|
@ -7,7 +7,7 @@
|
|
|
let log = require("../util/log.js");
|
|
|
|
|
|
let clientCache = require('../models/socket.io/client.cache').clientCache();
|
|
|
let onlineCache = require('../models/socket.io/onlineCache').onlineCache();
|
|
|
// let onlineCache = require('../models/socket.io/onlineCache').onlineCache();
|
|
|
let PatientClient = require('./../models/socket.io/patient.client');
|
|
|
let PcPatientClient = require('./../models/socket.io/pcPatient.client');
|
|
|
let PcDoctorClient = require('./../models/socket.io/pcDoctor.client');
|
|
@ -107,7 +107,7 @@ class SocketHandler {
|
|
|
patientClient.sessionId = data.sessionId||"";
|
|
|
patientClient.userType = data.userType||"";
|
|
|
clientCache.addClient(patientClient);
|
|
|
onlineCache.addUser(data.userId,patientClient.userType);
|
|
|
// onlineCache.addUser(data.userId,patientClient.userType);
|
|
|
users.login(data.userId, 10, '', '');
|
|
|
//修改居民在线状态
|
|
|
let participants = new Participants();
|
|
@ -152,7 +152,7 @@ class SocketHandler {
|
|
|
doctorClient.sessionId = data.sessionId||"";
|
|
|
doctorClient.userType = data.userType||"";
|
|
|
clientCache.addClient(doctorClient);
|
|
|
onlineCache.addUser(data.userId,doctorClient.userType);
|
|
|
// onlineCache.addUser(data.userId,doctorClient.userType);
|
|
|
//修改医生在线状态
|
|
|
let participants = new Participants();
|
|
|
//participants.changUserRedisLoginStatus(original_login_userid,data.clientType,1,doctorClient.sessionId);
|
|
@ -358,7 +358,7 @@ class SocketHandler {
|
|
|
participants.emitSessionUsers(client.sessionId,client.userId,"offline");
|
|
|
}
|
|
|
log.info('User logout: ' + client.userId);
|
|
|
onlineCache.removeUser(client.userId,client.userType);
|
|
|
// onlineCache.removeUser(client.userId,client.userType);
|
|
|
clientCache.removeByUserId(client.userId);
|
|
|
|
|
|
}
|
|
@ -401,7 +401,7 @@ class SocketHandler {
|
|
|
participants.emitSessionUsers(patientClient.sessionId,patientClient.userId,"offline");
|
|
|
}*/
|
|
|
log.info("User disconnect: ", patientClient.userId);
|
|
|
onlineCache.removeUser(patientClient.userId,patientClient.userType);
|
|
|
// onlineCache.removeUser(patientClient.userId,patientClient.userType);
|
|
|
clientCache.removeByUserSocket(socket);
|
|
|
}
|
|
|
});
|