|
@@ -66,7 +66,9 @@ class TrainplanService extends CrudService {
|
|
|
let date = new Date();
|
|
|
date = moment(date).format('YYYY-MM-DD HH:mm:ss');
|
|
|
const remark = '感谢您的使用';
|
|
|
- this.ctx.service.weixin.sendTemplateMsg(this.ctx.app.config.REVIEW_TEMPLATE_ID, openid, '您有一个新的通知', detail, date, remark);
|
|
|
+ if (openid) {
|
|
|
+ this.ctx.service.weixin.sendTemplateMsg(this.ctx.app.config.REVIEW_TEMPLATE_ID, openid, '您有一个新的通知', detail, date, remark);
|
|
|
+ }
|
|
|
}
|
|
|
// 查询所有学校用户
|
|
|
const schools = await this.umodel.find({ type: '2' });
|