|
@@ -50,9 +50,13 @@ class TeacherService extends CrudService {
|
|
|
detail = '您已通过审核被正式录入教师库';
|
|
|
}
|
|
|
const date = await this.ctx.service.util.updatedate();
|
|
|
+ console.log(teacher.id);
|
|
|
+
|
|
|
const user = await this.umodel.findOne({ uid: teacher.id, type: '3' });
|
|
|
+ console.log(user);
|
|
|
+
|
|
|
if (user && user.openid) {
|
|
|
- await this.ctx.service.weixin.sendTemplateMsg(this.ctx.app.config.REVIEW_TEMPLATE_ID, teacher.openid, '您有一个新的通知', detail, date, remark);
|
|
|
+ await this.ctx.service.weixin.sendTemplateMsg(this.ctx.app.config.REVIEW_TEMPLATE_ID, user.openid, '您有一个新的通知', detail, date, remark);
|
|
|
} else {
|
|
|
await this.ctx.service.util.sendMail(teacher.email, '账号审核', detail, '');
|
|
|
}
|