Jelajahi Sumber

需求修改

8 tahun lalu
induk
melakukan
077ebc0e29
2 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 1 1
      src/doctor/models/doctor.js
  2. 1 1
      src/doctor/repository/private.msg.repo.js

+ 1 - 1
src/doctor/models/doctor.js

@ -526,7 +526,7 @@ class Doctor extends BaseModel {
    getPrivateMessages(userId, peerId, contentType, msgStartId, msgEndId, count, closedInterval) {
        let self = this;
        pmRepo.findAllMessages(userId, peerId, contentType === undefined ? "0,1,2,3,4,5,6" : contentType, msgStartId, msgEndId, count, closedInterval, function (err, rows) {
        pmRepo.findAllMessages(userId, peerId, contentType === undefined ? "0,1,2,3,4,5,6,8,9" : contentType, msgStartId, msgEndId, count, closedInterval, function (err, rows) {
            if (err) {
                modelUtil.emitDbError(self.eventEmitter, 'Get private message failed', err);
                return;

+ 1 - 1
src/doctor/repository/private.msg.repo.js

@ -51,7 +51,7 @@ exports.findOnePatientMessage = function (messageId,handler) {
exports.findAllMessages = function (to, from, contentType, start, end, count, closedInterval, handler) {
    var sql = "SELECT msg_id, to_uid, from_uid, type, content, timestamp from msg_p2p " +
        "WHERE ((to_uid=? AND from_uid=?) OR (to_uid=? AND from_uid=?)) " +
        "   AND type in (" + contentType + ") AND msg_id between ? and ? ORDER BY msg_id DESC LIMIT ?";
        "   AND type in (" + contentType + ") AND msg_id between ? and ? ORDER BY timestamp,msg_id DESC LIMIT ?";
    imRepo.execQuery({
        "sql": sql,