|
@ -202,7 +202,7 @@ class SessionRepo {
|
|
|
//找出角色讨论组中为旁听且未结束的咨询
|
|
|
let sql1 = ("select session_id from " + DB_TABLES.Participants + " w where w.participant_id = ? and participant_role ="+PARTICIPANT_ROLES.REGULAR+" group by w.session_id")
|
|
|
sessionSQL = "select * from "
|
|
|
+ DB_TABLES.Sessions + " s where (s.id in(" + sql + ") and s.business_type = ? and s.status = 1) or (s.id in(" + sql1 + ") and s.business_type = ? and s.status = 0) limit "+page+","+pagesize;
|
|
|
+ DB_TABLES.Sessions + " s where (s.id in(" + sql + ") and s.business_type = ? and s.status = 1) or (s.id in(" + sql1 + ") and s.business_type = ? and s.status = 0) limit "+page+","+pagesize;
|
|
|
log.info("findAllByTypeAndStatus: sql " + sessionSQL);
|
|
|
log.info("findAllByTypeAndStatus: args " + [userId, businessType,userId,businessType]);
|
|
|
ImDb.execQuery({
|
|
@ -249,7 +249,7 @@ class SessionRepo {
|
|
|
//中山医院无法查询到所有会话记录,暂时取消participant_role的判断条件 20190619
|
|
|
sql = "select session_id from " + DB_TABLES.Participants + " w where w.participant_id = ? group by w.session_id";
|
|
|
sessionSQL = "select * from "
|
|
|
+ DB_TABLES.Sessions + " s where s.id in(" + sql + ") and s.business_type = ? and s.type!=0 limit "+page+","+pagesize;
|
|
|
+ DB_TABLES.Sessions + " s where s.id in(" + sql + ") and s.business_type = ? and s.type!=0 order by s.create_date desc limit "+page+","+pagesize;
|
|
|
ImDb.execQuery({
|
|
|
"sql": sessionSQL,
|
|
|
"args": [userId, businessType],
|
|
@ -264,7 +264,7 @@ class SessionRepo {
|
|
|
//中山医院无法查询到所有会话记录,暂时取消participant_role的判断条件 20190619
|
|
|
sql = "select session_id from " + DB_TABLES.Participants + " w where w.participant_id = ? group by w.session_id";
|
|
|
sessionSQL = "select * from "
|
|
|
+ DB_TABLES.Sessions + " s where s.id in(" + sql + ") and s.type!=0 limit "+page+","+pagesize;
|
|
|
+ DB_TABLES.Sessions + " s where s.id in(" + sql + ") and s.type!=0 order by s.create_date desc limit "+page+","+pagesize;
|
|
|
ImDb.execQuery({
|
|
|
"sql": sessionSQL,
|
|
|
"args": [userId],
|