lrf402788946 4 lat temu
rodzic
commit
31cc0114f0
1 zmienionych plików z 10 dodań i 9 usunięć
  1. 10 9
      app/service/student.js

+ 10 - 9
app/service/student.js

@@ -236,15 +236,16 @@ class StudentService extends CrudService {
 
   // 根据学生id删除学生
   async deletestus(data) {
-    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.leavemodel.deleteMany({ studentid: id });
-      await this.attendmodel.deleteMany({ studentid: id });
-    }
+    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.leavemodel.deleteMany({ studentid: id });
+    //   await this.attendmodel.deleteMany({ studentid: id });
+    // }
   }
 
   // 批量更新寝室号