Sfoglia il codice sorgente

Merge branch 'im-internet-hospital-oracle' of http://192.168.1.220:10080/Amoy/im.doctor into im-internet-hospital-oracle

huangwenjie 4 anni fa
parent
commit
d54925fee8

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

@ -1668,7 +1668,7 @@ class Sessions extends RedisModel {
                           message.content_type == CONTENT_TYPES.Audio||
                           message.content_type == CONTENT_TYPES.Video){
                            TopicRepo.findLastBySessionId(sessionId,function(err,res){
                                if(res&&res.length>0&&res[0].reply==0){
                                if(res&&res.length>0&&(res[0].reply==0||res[0].reply==null)){
                                    TopicRepo.replyTopic(message.sender_id,message.id,res[0].id,function(err,res){
                                        if(err){
                                            logger.error("update topic reply error");

+ 1 - 1
src/server/repository/oracle/topics.repo.js

@ -438,7 +438,7 @@ class TopicRepo {
     * @param topicId
     */
    static replyTopic(reply_user,reply_message_id,topicId,handler){
        let sql = "UPDATE " + DB_TABLES.Topics + " SET REPLY = 1,REPLY_TIME = NOW(),REPLY_USER = :REPLY_USER,REPLY_MESSAGE_ID = :REPLY_MESSAGE_ID WHERE ID = :ID";
        let sql = "UPDATE " + DB_TABLES.Topics + " SET REPLY = 1,REPLY_TIME = SYSDATE,REPLY_USER = :REPLY_USER,REPLY_MESSAGE_ID = :REPLY_MESSAGE_ID WHERE ID = :ID";
        oracledbUtil.query({
            "sql": sql,
            "args": [reply_user, reply_message_id, topicId],

+ 2 - 2
src/server/util/oracledb.util.js

@ -36,7 +36,7 @@ let query = function(options){
                    doRelease(connection);
                    return handler(err, result);
                }
                console.log(result);
                //console.log(result);
                if(!result.rows ||  result.rows.length == 0){
                    handler(null, result.rows);
                }else{
@ -47,7 +47,7 @@ let query = function(options){
                        {
                            // log.info("开始组装数据库返回值:"+i)
                            p[key.name] = v[i];
                            log.info(p)
                            //log.info(p)
                            return p;
                        }, {})
                    }));