|
|
@@ -3,12 +3,15 @@ package com.usoftchina.smartschool.school.wxschool.support;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.usoftchina.smartschool.school.po.MeetingDO;
|
|
|
import com.usoftchina.smartschool.school.po.SchoolDO;
|
|
|
+import com.usoftchina.smartschool.school.wxschool.basic.service.impl.WxMeetingServiceImpl;
|
|
|
import com.usoftchina.smartschool.school.wxschool.mapper.WxMeetingMapper;
|
|
|
import com.usoftchina.smartschool.school.wxschool.mapper.WxSchoolMapper;
|
|
|
import com.usoftchina.smartschool.school.wxschool.mapper.WxTeacherMapper;
|
|
|
import com.usoftchina.smartschool.school.wxschool.mapper.WxTemplateMapper;
|
|
|
import com.usoftchina.smartschool.school.wxschool.utils.ObjectUtils;
|
|
|
import com.usoftchina.smartschool.wechat.api.WxPushApi;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
|
@@ -39,6 +42,8 @@ public class RemindTask extends TimerTask {
|
|
|
@Value("${smartschool.domain.wechat}")
|
|
|
private String wechatUrl;
|
|
|
|
|
|
+ private final static Logger LOGGER = LoggerFactory.getLogger(RemindTask.class);
|
|
|
+
|
|
|
private MeetingDO meetingDO;
|
|
|
|
|
|
private Integer i;
|
|
|
@@ -74,6 +79,7 @@ public class RemindTask extends TimerTask {
|
|
|
String openid = teacherMapper.get(teacherId).getOpenid();
|
|
|
if (ObjectUtils.isNotEmpty(schoolDO)){
|
|
|
try {
|
|
|
+ LOGGER.error("URL:{}" , wechatUrl);
|
|
|
wxPushApi.wxPush(schoolDO.getSchoolAppid(), schoolDO.getSchoolSecret(),openid , meeting, "您好,您有一条新的会议通知",meetingName , simpleDateFormat.format(meetingDO.getStartDate()), meetingDO.getMeetingAddress(), "-", "点击查看详情", wechatUrl + "/meet-detail/" + meetingDO.getMeetingId()+"?teacherId="+teacherId);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|