Browse Source

增加日志查询条件

asd123a20 3 years ago
parent
commit
c6907737f6
2 changed files with 2 additions and 2 deletions
  1. 0 1
      app/service/content.js
  2. 2 1
      app/service/log.js

+ 0 - 1
app/service/content.js

@@ -64,7 +64,6 @@ class ContentService extends Service {
     const filter = {};
     if (title) filter.title = { $regex: title };
     if (columns) filter.columns = columns;
-    console.log(filter);
     let total = 0;
     try {
       let res;

+ 2 - 1
app/service/log.js

@@ -29,11 +29,12 @@ class LogService extends Service {
       throw new Error({ errcode: -2001, errmsg: '删除失败' });
     }
   }
-  async query({ skip, limit, mondel, method }) {
+  async query({ skip, limit, mondel, method, result }) {
     const { Log: model } = this.ctx.model;
     const filter = {};
     if (mondel) filter.mondel = mondel;
     if (method) filter.method = method;
+    if (result) filter.result = result;
     try {
       const total = await model.find({ ...filter });
       let res;