|
@@ -86,6 +86,7 @@ class UtilService extends CrudService {
|
|
|
return res;
|
|
|
}
|
|
|
async utilMethod(query, body) {
|
|
|
+ // 重置班级
|
|
|
const { planid, termid, batchid, classid } = query;
|
|
|
const filters = {};
|
|
|
if (classid) filters.classid = classid;
|
|
@@ -94,16 +95,8 @@ class UtilService extends CrudService {
|
|
|
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';
|
|
|
- // ch.consume(
|
|
|
- // queue,
|
|
|
- // msg => {
|
|
|
- // console.log(' [x] Received %s', msg.content.toString());
|
|
|
- // },
|
|
|
- // { noAck: true }
|
|
|
- // );
|
|
|
- // // ch.close();
|
|
|
+ // 重置班级结束
|
|
|
+
|
|
|
}
|
|
|
async getQueryOptions({ skip, limit, sort, desc } = {}) {
|
|
|
if (sort && _.isString(sort)) {
|