lrf402788946 4 년 전
부모
커밋
b40e4a237c
2개의 변경된 파일583개의 추가작업 그리고 517개의 파일을 삭제
  1. 576 517
      app/service/class.js
  2. 7 0
      app/service/util.js

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 576 - 517
app/service/class.js


+ 7 - 0
app/service/util.js

@@ -86,6 +86,13 @@ class UtilService extends CrudService {
     return res;
   }
   async utilMethod(query, body) {
+    const { planid, termid, batchid, classid } = query;
+    const filters = {};
+    if (classid) filters.classid = classid;
+    else if (batchid)filters.batchid = batchid;
+    else if (termid)filters.termid = termid;
+    else if (planid)filters.planid = planid;
+    await this.ctx.model.Student.updateMany(filters, { classid: undefined });
     // const ch = await this.ctx.amqp.conn.createChannel();
     // const queue = 'hello';
     // ch.consume(