lrf 2 years ago
parent
commit
1aa0dfbcdc
2 changed files with 3 additions and 4 deletions
  1. 1 1
      app/controller/config/.statistics.js.js
  2. 2 3
      app/service/statistics.js

+ 1 - 1
app/controller/config/.statistics.js.js

@@ -72,6 +72,6 @@ module.exports = {
     },
   },
   studentSign: {
-    requestBody: ['lesson_id', 'student_id', 'range', 'skip', 'limit'],
+    requestBody: ['!school_id', 'lesson_id', 'student_id', 'range', 'skip', 'limit'],
   },
 };

+ 2 - 3
app/service/statistics.js

@@ -286,13 +286,12 @@ class StatisticsService extends CrudService {
     return { mm, m3m, m6m, my };
   }
 
-  async studentSign({ lesson_id, student_id, range, skip, limit }) {
-    console.log('line 290 in function:');
+  async studentSign({ school_id, lesson_id, student_id, range, skip, limit }) {
     const pipeline = [];
     const baseCol = { time_start: 1, title: 1 };
     const studentQuery = {};
     // 返回数据:课程,上课时间,学生,是否签到,是否缴费
-    let $match = { lesson_id };
+    let $match = { school_id, lesson_id };
     if (_.isArray(range)) {
       const start = _.head(range);
       const end = _.last(range);