|
@ -196,7 +196,15 @@ class Sessions extends RedisModel {
|
|
|
//查找该sessionId是否存在存在则直接返回实例
|
|
|
SessionRepo.findOne(sessionId, function (err, res) {
|
|
|
if (res.length > 0) {//已经存在
|
|
|
handler(null, res[0]);
|
|
|
for (let i in participantArray) {
|
|
|
ParticipantRepo.updateParticipant(sessionId,participantArray[i].split(":")[0],participantArray[i].split(":")[1],function(err,ures){
|
|
|
if(err){
|
|
|
logger.error("updateParticipant error"+err);
|
|
|
return;
|
|
|
}
|
|
|
handler(null, res[0]);
|
|
|
})
|
|
|
}
|
|
|
} else {
|
|
|
let createDate = new Date();
|
|
|
let session = {
|