liuyu 5 سال پیش
والد
کامیت
365891b7f1
3فایلهای تغییر یافته به همراه5 افزوده شده و 2 حذف شده
  1. 2 0
      app/controller/.news.js
  2. 1 0
      app/model/news.js
  3. 2 2
      app/service/dock.js

+ 2 - 0
app/controller/.news.js

@@ -4,6 +4,7 @@ module.exports = {
       'column_id',
       'column_name',
       '!title',
+      'titlejj',
       'orgin',
       'publish',
       'publish_time',
@@ -21,6 +22,7 @@ module.exports = {
       'column_id',
       'column_name',
       '!title',
+      'titlejj',
       'orgin',
       'publish',
       'publish_time',

+ 1 - 0
app/model/news.js

@@ -7,6 +7,7 @@ const NewsSchema = {
   column_id: { type: String, required: false, maxLength: 500 }, // 栏目id
   column_name: { type: String, required: false, maxLength: 500 }, // 栏目名称
   title: { type: String, required: false, maxLength: 500 }, // 标题
+  titlejj: { type: String, required: false, maxLength: 500 }, // 标题简介
   orgin: { type: String, required: false, maxLength: 500 }, // 来源
   publish: { type: String, required: false, maxLength: 500 }, // 发布者
   publish_time: { type: String, required: false, maxLength: 500 }, // 发布时间

+ 2 - 2
app/service/dock.js

@@ -52,14 +52,14 @@ class ChatService extends CrudService {
     return res;
   }
   async dockCheck({ id }, { is_allowed, reason = '' }) {
-    const dock = this.model.findOne({ _id: ObjectId(id) });
+    const dock = await this.model.findOne({ _id: ObjectId(id) });
     if (!dock) {
       throw new BusinessError('没有查询到该对接会');
     }
     assert(is_allowed, '请选择审核结果');
     dock.is_allowed = is_allowed;
     dock.reason = reason;
-    const res = dock.save();
+    const res = await dock.save();
     return res;
   }
 }