|
@@ -274,11 +274,12 @@ class LessonService extends CrudService {
|
|
|
/**
|
|
|
* 修改课表的状态,并发送信息
|
|
|
* @param {Array} ids 要修改的课表
|
|
|
+ * @property {Array} classids 班级表ids
|
|
|
*/
|
|
|
- async check({ ids }) {
|
|
|
+ async check({ ids, classids }) {
|
|
|
// 1,修改课表状态; TODO 2,拿到所有的班级,获取所有人员;3,然后发送信息
|
|
|
- const list = await this.model.find({ _id: { $in: ids } });
|
|
|
- const res = await this.model.updateMany({ _id: { $in: ids } }, { status: '1' });
|
|
|
+ const list = await this.model.find({ _id: { $in: ids }, classid: classids });
|
|
|
+ const res = await this.model.updateMany({ _id: { $in: ids }, classid: classids }, { status: '1' });
|
|
|
const noticeList = [];
|
|
|
const defaults = {
|
|
|
noticeid: 'system',
|
|
@@ -350,7 +351,7 @@ class LessonService extends CrudService {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- await this.toSendMsg(noticeList);
|
|
|
+ // await this.toSendMsg(noticeList);
|
|
|
}
|
|
|
// 给班主任发信息
|
|
|
async getHeadTeacherMsg(classInfo) {
|