wangzhinan %!s(int64=5) %!d(string=hai) anos
pai
achega
2e7975babc

+ 2 - 0
src/server/include/commons.js

@ -17,6 +17,8 @@ if (process.env.IM_PROFILE === "prod") {
    configFile += "local";
} else if (process.env.IM_PROFILE === "test") {
    configFile += "test";
} else if (process.env.IM_PROFILE === "ystest") {
    configFile += "ystest";
} else {
    configFile += "test";
}

+ 1 - 1
src/server/models/sessions/sessions.js

@ -534,7 +534,7 @@ class Sessions extends RedisModel {
                                                "last_content_type", session.last_content_type||"",
                                                "last_content", session.last_content||"",
                                                "last_message_time", session.last_message_time||"",
                                                "create_date", ObjectUtil.timestampToLong(session.create_date),
                                                "create_date", new Date(session.create_date).getTime(),
                                                "status",session.status==null?0:session.status
                                            ];
                                            // cache sessions

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

@ -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],