|
@@ -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(
|