|
@@ -82,8 +82,10 @@ class TeacherService extends CrudService {
|
|
|
// 将数据存入数据库中
|
|
|
for (const tea of teadatas) {
|
|
|
const res = await this.model.findOne({ idnumber: tea.idnumber, name: tea.name });
|
|
|
- res.xsscore = tea.xsscore;
|
|
|
- await res.save();
|
|
|
+ if (res) {
|
|
|
+ res.xsscore = tea.xsscore;
|
|
|
+ await res.save();
|
|
|
+ }
|
|
|
}
|
|
|
return datacheck;
|
|
|
}
|