Переглянути джерело

计算会话数量增加状态筛选

huangwenjie 6 роки тому
батько
коміт
761810139a
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      src/server/repository/mysql/session.repo.js

+ 1 - 1
src/server/repository/mysql/session.repo.js

@ -123,7 +123,7 @@ class SessionRepo {
        let sql = "select session_id count from " + DB_TABLES.Participants + " w where w.participant_id = ? group by w.session_id";
        let sql = "select session_id count from " + DB_TABLES.Participants + " w where w.participant_id = ? group by w.session_id";
        let sessionSQL = "select count(id) count from " + DB_TABLES.Sessions + " s where s.id in(" + sql + ") and s.type=?";
        let sessionSQL = "select count(id) count from " + DB_TABLES.Sessions + " s where s.id in(" + sql + ") and s.type=?";
        if(status != null){
        if(status != null){
            sessionSQL = sessionSQL + " s.status="+status;
            sessionSQL = sessionSQL + " and s.status="+status;
        }
        }
        ImDb.execQuery({
        ImDb.execQuery({
            "sql": sessionSQL,
            "sql": sessionSQL,