lrf402788946 4 년 전
부모
커밋
42abf1c042
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      app/service/util.js

+ 1 - 0
app/service/util.js

@@ -92,6 +92,7 @@ class UtilService extends CrudService {
     else if (batchid)filters.batchid = batchid;
     else if (termid)filters.termid = termid;
     else if (planid)filters.planid = planid;
+    else throw new BusinessError(ErrorCode.BADPARAM, '需要重置范围');
     await this.ctx.model.Student.updateMany(filters, { classid: undefined });
     // const ch = await this.ctx.amqp.conn.createChannel();
     // const queue = 'hello';