|
@ -303,12 +303,12 @@ class SessionRepo {
|
|
}else{
|
|
}else{
|
|
sql = "select session_id from " + DB_TABLES.Participants + " w where w.participant_id = ? and participant_role ="+PARTICIPANT_ROLES.HOST+" group by w.session_id";
|
|
sql = "select session_id from " + DB_TABLES.Participants + " w where w.participant_id = ? and participant_role ="+PARTICIPANT_ROLES.HOST+" group by w.session_id";
|
|
sessionSQL = "select * from "
|
|
sessionSQL = "select * from "
|
|
+ DB_TABLES.Sessions + " s where s.id in(" + sql + ") and s.business_type = ? and s.status = ? limit "+page+","+pagesize;
|
|
|
|
|
|
+ DB_TABLES.Sessions + " s where s.id in(" + sql + ") and s.business_type in (?) and s.status = ? limit "+page+","+pagesize;
|
|
log.info("findAllByTypeAndStatus: sql : "+sessionSQL);
|
|
log.info("findAllByTypeAndStatus: sql : "+sessionSQL);
|
|
log.info("findAllByTypeAndStatus: args : "+[userId, businessType,status]);
|
|
log.info("findAllByTypeAndStatus: args : "+[userId, businessType,status]);
|
|
ImDb.execQuery({
|
|
ImDb.execQuery({
|
|
"sql": sessionSQL,
|
|
"sql": sessionSQL,
|
|
"args": [userId, businessType,status],
|
|
|
|
|
|
"args": [userId, businessType.split(","),status],
|
|
"handler": handler || function (err, res) {
|
|
"handler": handler || function (err, res) {
|
|
if(err) log.error(err);
|
|
if(err) log.error(err);
|
|
}
|
|
}
|