lrf402788946 5 years ago
parent
commit
10cc701a01
2 changed files with 2 additions and 1 deletions
  1. 1 1
      app/controller/.personchat.js
  2. 1 0
      app/service/personroom.js

+ 1 - 1
app/controller/.personchat.js

@@ -48,7 +48,7 @@ module.exports = {
     options: {
       query: ["skip", "limit"],
       sort: ["meta.createdAt"],
-      desc: true,
+      asc: true,
       count: true,
     },
   },

+ 1 - 0
app/service/personroom.js

@@ -21,6 +21,7 @@ class PersonroomService extends CrudService {
     let res = await this.model.findOne({ buyer_id, seller_id });
     if (!res) res = await this.model.create({ buyer_id, seller_id, buyer_name, seller_name });
     // TODO MQ
+    //这个地方不应该有MQ;买家在请求完房间号后订阅MQ;卖家应该在自己进入中台管理时订阅MQ,且订阅的应该是这个人是否有未读消息
     const { mq } = this.ctx;
     if (mq) {
       const exchange = 'person_room';