|
@@ -263,18 +263,18 @@ class StudentService extends CrudService {
|
|
|
|
|
|
// 根据学生id删除学生
|
|
// 根据学生id删除学生
|
|
async deletestus(data) {
|
|
async deletestus(data) {
|
|
- throw new BusinessError(
|
|
|
|
- ErrorCode.BUSINESS,
|
|
|
|
- '此功能暂不开放,待确定好会出现的以外情况后,再次开放'
|
|
|
|
- );
|
|
|
|
- // for (const id of data) {
|
|
|
|
- // await this.model.deleteOne({ _id: ObjectId(id) });
|
|
|
|
- // await this.umodel.deleteOne({ uid: id });
|
|
|
|
- // await this.upmodel.deleteMany({ studentid: id });
|
|
|
|
- // await this.uqmodel.deleteMany({ studentid: id });
|
|
|
|
- // await this.scoremodel.deleteMany({ stuid: id });
|
|
|
|
- // await this.attendmodel.deleteMany({ studentid: id });
|
|
|
|
- // }
|
|
|
|
|
|
+ // throw new BusinessError(
|
|
|
|
+ // ErrorCode.BUSINESS,
|
|
|
|
+ // '此功能暂不开放,待确定好会出现的以外情况后,再次开放'
|
|
|
|
+ // );
|
|
|
|
+ for (const id of data) {
|
|
|
|
+ await this.umodel.deleteOne({ uid: id });
|
|
|
|
+ await this.upmodel.deleteMany({ studentid: id });
|
|
|
|
+ await this.uqmodel.deleteMany({ studentid: id });
|
|
|
|
+ await this.scoremodel.deleteMany({ stuid: id });
|
|
|
|
+ await this.attendmodel.deleteMany({ studentid: id });
|
|
|
|
+ await this.model.deleteOne({ _id: ObjectId(id) });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
// 批量更新寝室号
|
|
// 批量更新寝室号
|