3 Commits 396926b3d1 ... d08faabf43

Auteur SHA1 Bericht Datum
  huangwenjie d08faabf43 修改未读数 4 jaren geleden
  huangwenjie d54925fee8 Merge branch 'im-internet-hospital-oracle' of http://192.168.1.220:10080/Amoy/im.doctor into im-internet-hospital-oracle 4 jaren geleden
  huangwenjie 94f9c68758 修改未读数 4 jaren geleden
2 gewijzigde bestanden met toevoegingen van 4 en 4 verwijderingen
  1. 2 2
      src/server/models/sessions/sessions.js
  2. 2 2
      src/server/repository/oracle/session.repo.js

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

@ -1367,8 +1367,8 @@ class Sessions extends RedisModel {
        let doctorCount = 0;
        let patientEndCount = 0;
        if(type){
            SessionRepo.findAllBySessionType(userId, type,function (err, res) {
                // SessionRepo.findUnEndAll(userId, function (err, res) {
            // SessionRepo.findAllBySessionType(userId, type,function (err, res) {
            SessionRepo.findUnEndAll(userId,type,function (err, res) {
                if (err) {
                    if(handler)
                    {

+ 2 - 2
src/server/repository/oracle/session.repo.js

@ -82,11 +82,11 @@ class SessionRepo {
     * @param userId
     * @param handler
     */
    static findUnEndAll(userId, handler) {
    static findUnEndAll(userId, type,handler) {
        let sql = "SELECT SESSION_ID FROM " + DB_TABLES.Participants + " W WHERE W.PARTICIPANT_ID = :PARTICIPANT_ID AND PARTICIPANT_ROLE =0  GROUP BY W.SESSION_ID";
        let sys_session = "SELECT SESSION_ID FROM " + DB_TABLES.Participants + " W WHERE W.PARTICIPANT_ID = 'SYSTEM' AND PARTICIPANT_ROLE =0  GROUP BY W.SESSION_ID";
        let sessionSQL = "SELECT S.\"ID\" AS \"id\",S.\"NAME\" AS \"name\",S.\"TYPE\" AS \"type\",S.\"BUSINESS_TYPE\" AS \"business_type\",S.\"STATUS\" AS \"status\",S.\"CREATE_DATE\" AS \"create_date\",S.\"LAST_SENDER_ID\" AS \"last_sender_id\",S.\"LAST_SENDER_NAME\" AS \"last_sender_name\",S.\"LAST_CONTENT_TYPE\" AS \"last_content_type\",S.\"LAST_CONTENT\" AS \"last_content\",S.\"LAST_MESSAGE_TIME\" AS \"last_message_time\",S.\"BAK_ID\" AS \"bak_id\" FROM "
            + DB_TABLES.Sessions + " S WHERE S.ID IN(" + sql + ") AND S.ID NOT IN ("+sys_session+") AND S.`STATUS` = 0";
            + DB_TABLES.Sessions + " S WHERE S.ID IN(" + sql + ") AND S.TYPE IN(" + type + ")AND S.ID NOT IN ("+sys_session+") AND S.STATUS = 0";
        oracledbUtil.query({
            "sql": sessionSQL,