Bladeren bron

代码修改错误修改

8 jaren geleden
bovenliggende
commit
4a88f52bc5
2 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 2 2
      src/server/repository/mysql/participant.repo.js
  2. 1 1
      src/server/repository/mysql/session.repo.js

+ 2 - 2
src/server/repository/mysql/participant.repo.js

@ -91,7 +91,7 @@ class ParticipantRepo {
     * @param handler
     */
    static saveParticipantsToMysql(sessionId, users, handler) {
        let sql = "insert into " + DB_TABLES.SessionParticipants + " (session_id,participant_id,participant_role) VALUES "
        let sql = "insert into " + DB_TABLES.Participants + " (session_id,participant_id,participant_role) VALUES "
        let args = [];
        for (var j in users) {
            sql += "(?,?,?)";
@ -114,7 +114,7 @@ class ParticipantRepo {
    }
    static deleteUserFromMysql(sessionId, userId) {
        let sql = "delete from " + DB_TABLES.SessionParticipants + " where user_id=? and session_id=? ";
        let sql = "delete from " + DB_TABLES.Participants + " where user_id=? and session_id=? ";
        ImDb.execQuery({
            "sql": sql,
            "args": [userId, sessionId],

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

@ -66,7 +66,7 @@ class SessionRepo {
     */
    static
    findStickySessions(userId, handler) {
        let sql = "select session_id from " + DB_TABLES.SessionParticipants + " w where w.participant_id = ? group by w.session_id";
        let sql = "select session_id from " + DB_TABLES.Participants + " w where w.participant_id = ? group by w.session_id";
        let sessionSQL = "select s.id,s.name,s.type,s.create_date from " + DB_TABLES.Sessions + " s," + DB_TABLES.StickySessions + " ss  where s.id = ss.session_id s.id in(" + sql + ")";
        ImDb.execQuery({
            "sql": sessionSQL,