lrf402788946 4 yıl önce
ebeveyn
işleme
2dc1bc674a
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      app/service/leave.js

+ 1 - 1
app/service/leave.js

@@ -20,13 +20,13 @@ class LeaveService extends CrudService {
     const student = await this.smodel.findById(studentid);
     const schid = student.schid;
     const newdata = { ...data, status: '0', schid };
-    // TODO请假发送不对
     let sch = await this.ctx.model.School.find({ code: schid });
     if (!sch) throw new BusinessError(ErrorCode.DATA_NOT_EXIST, '未找到该学生的学校信息');
     sch = JSON.parse(JSON.stringify(sch));
     const { _id } = sch;
     const user = await this.umodel.findOne({ uid: _id, type: '2' });
     const entity = await this.model.create(newdata);
+    console.log(user);
     if (user) {
       const openid = 'ocPqjswkUejZHq2ANriNrFFC7A3I'; // user.openid
       const date = await this.ctx.service.util.updatedate();