lrf402788946 há 4 anos atrás
pai
commit
42abf1c042
1 ficheiros alterados com 1 adições e 0 exclusões
  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';