lrf402788946 4 năm trước cách đây
mục cha
commit
42abf1c042
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  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';