|
@@ -55,7 +55,7 @@ class TeacherService extends CrudService {
|
|
|
return await this.model.findById(id, '+file');
|
|
|
}
|
|
|
async create(data) {
|
|
|
- const { name, mobile } = data;
|
|
|
+ const { name, phone: mobile } = data;
|
|
|
const user = await this.umodel.findOne({ mobile });
|
|
|
if (user) {
|
|
|
throw new BusinessError(ErrorCode.DATA_EXIST, '电话已经存在');
|
|
@@ -93,6 +93,7 @@ class TeacherService extends CrudService {
|
|
|
const { teachersid, zlscore, msscore, status, remark } = data;
|
|
|
for (const teacherid of teachersid) {
|
|
|
const teacher = await this.model.findById(teacherid);
|
|
|
+ console.log(status);
|
|
|
teacher.status = status;
|
|
|
if (zlscore) {
|
|
|
teacher.zlscore = zlscore;
|