浏览代码

成员变化的时候时间更新为空问题处理

8 年之前
父节点
当前提交
5b34b84ed4
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/server/repository/mysql/participant.repo.js

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

@ -212,6 +212,7 @@ class ParticipantRepo {
    static saveParticipantsToMysql(sessionId, users, handler) {
        let sql = "INSERT INTO " + DB_TABLES.Participants + " (session_id,participant_id,participant_role,last_fetch_time) VALUES ";
        let args = [];
        let nowDate = new Date();
        for (let j in users) {
            let tokens = users[j].split(":");
            if(tokens.length > 1&&tokens[1]==2)continue;
@ -219,7 +220,7 @@ class ParticipantRepo {
            args.push(sessionId);
            args.push(tokens[0]);
            args.push(tokens.length > 1 ? tokens[1] : '0');
            args.push(new Date());
            args.push(nowDate);
            if (j != users.length - 1) sql += ", ";
        }