|
@ -933,7 +933,7 @@ class Sessions extends RedisModel {
|
|
|
* @param businessType
|
|
|
* @param status 0:进行中的会话1:结束的会话
|
|
|
*/
|
|
|
getUserSessionsByType(userId,type,page, size,status,name) {
|
|
|
getUserSessionsByType(userId,type,page, size,status,name,searchType) {
|
|
|
logger.info("根据用户类型获取用户的session列表1: ");
|
|
|
let userSessionKey = RedisModel.makeRedisKey(REDIS_KEYS.UserSessions, userId);
|
|
|
let self = this;
|
|
@ -941,7 +941,7 @@ class Sessions extends RedisModel {
|
|
|
async.waterfall([
|
|
|
// 获取会话ID列表
|
|
|
function (callback) {
|
|
|
SessionRepo.findListByType(userId,type,page,size,status,name,function(err,res){
|
|
|
SessionRepo.findListByType(userId,type,page,size,status,name,searchType,function(err,res){
|
|
|
logger.info("根据用户类型获取用户的session列表: res :"+res);
|
|
|
if (res == null || res.length == 0) {
|
|
|
ModelUtil.emitOK(self.eventEmitter, []);
|
|
@ -1032,6 +1032,10 @@ class Sessions extends RedisModel {
|
|
|
} else {
|
|
|
sessionName = res[0].name;
|
|
|
}
|
|
|
var userType =null;
|
|
|
if (session.type == SESSION_TYPES.P2P){
|
|
|
userType = res[0].userType;
|
|
|
}
|
|
|
var bir = new Date().getTime();
|
|
|
if (res && res.length != 0 && res[0].birthdate) {
|
|
|
bir = res[0].birthdate.getTime();
|
|
@ -1056,6 +1060,7 @@ class Sessions extends RedisModel {
|
|
|
sender_birthday: bir,
|
|
|
participantsTimeArray:participantsTime,
|
|
|
status:session.status,
|
|
|
userType:userType,
|
|
|
});
|
|
|
|
|
|
index = (parseInt(index) + 1);
|