Browse Source

需求修改

8 years ago
parent
commit
21ed37f316

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

@ -13,7 +13,7 @@ exports.save = function (from, groupId, at, contentType, content, handler) {
exports.findAllMessages = function (groupId, contentType, start, end, count, handler) {
    var sql = "SELECT to_gid, msg_id, from_uid, at_uid, type, content, timestamp " +
        "FROM msg_group " +
        "WHERE to_gid = ? AND type in(" + contentType + ") AND msg_id BETWEEN ? AND ? ORDER BY timestamp,msg_id DESC LIMIT ?";
        "WHERE to_gid = ? AND type in(" + contentType + ") AND msg_id BETWEEN ? AND ? ORDER BY timestamp DESC,msg_id DESC LIMIT ?";
    imRepo.execQuery({
        "sql": sql,

+ 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 timestamp,msg_id DESC LIMIT ?";
        "   AND type in (" + contentType + ") AND msg_id between ? and ? ORDER BY timestamp DESC,msg_id DESC LIMIT ?";
    imRepo.execQuery({
        "sql": sql,