|
|
@@ -6,7 +6,7 @@ import com.usoftchina.smartschool.school.po.*;
|
|
|
import com.usoftchina.smartschool.school.wxschool.basic.service.WxNotifyService;
|
|
|
import com.usoftchina.smartschool.school.wxschool.mapper.*;
|
|
|
import com.usoftchina.smartschool.school.wxschool.utils.ObjectUtils;
|
|
|
-import com.usoftchina.smartschool.wechat.service.WxPushService;
|
|
|
+import com.usoftchina.smartschool.wechat.api.WxPushApi;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@@ -29,7 +29,7 @@ public class WxNotifyServiceImpl implements WxNotifyService {
|
|
|
private WxStudentMapper studentMapper;
|
|
|
|
|
|
@Autowired
|
|
|
- private WxPushService wxPushService;
|
|
|
+ private WxPushApi wxPushApi;
|
|
|
|
|
|
@Autowired
|
|
|
private WxSchoolMapper wxSchoolMapper;
|
|
|
@@ -91,7 +91,7 @@ public class WxNotifyServiceImpl implements WxNotifyService {
|
|
|
notifyrecordsMapper.save(notifyrecordsDO);
|
|
|
TeacherDO teacherDO = teacherMapper.get(l);
|
|
|
SchoolDO schoolDO = wxSchoolMapper.get(teacherDO.getSchoolId());
|
|
|
- wxPushService.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),teacherDO.getOpenid(), "h0BkcnTo24b2jsficMeVO0B17GvE-VzlPvF0fVXea4w", "您好,您有一条通知", schoolDO.getSchoolName(),teacherMapper.get(notifyCreator).getTeacherName(),format.format(new Date()),notifyDetails, "点击查看详情", "");
|
|
|
+ wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),teacherDO.getOpenid(), "h0BkcnTo24b2jsficMeVO0B17GvE-VzlPvF0fVXea4w", "您好,您有一条通知", schoolDO.getSchoolName(),teacherMapper.get(notifyCreator).getTeacherName(),format.format(new Date()),notifyDetails, "点击查看详情", "");
|
|
|
}
|
|
|
}
|
|
|
List<Long> stuIds = JSON.parseArray(notifyStu, Long.class);
|
|
|
@@ -105,7 +105,7 @@ public class WxNotifyServiceImpl implements WxNotifyService {
|
|
|
notifyrecordsMapper.save(notifyrecordsDO);
|
|
|
ParentsDO parentsDO = wxParentsMapper.get(l);
|
|
|
SchoolDO schoolDO = wxSchoolMapper.get(parentsDO.getSchoolId());
|
|
|
- wxPushService.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),parentsDO.getOpenid(), "h0BkcnTo24b2jsficMeVO0B17GvE-VzlPvF0fVXea4w", "您好,您有一条通知", schoolDO.getSchoolName(),teacherMapper.get(notifyCreator).getTeacherName(),format.format(new Date()),notifyDetails, "点击查看详情", "");
|
|
|
+ wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),parentsDO.getOpenid(), "h0BkcnTo24b2jsficMeVO0B17GvE-VzlPvF0fVXea4w", "您好,您有一条通知", schoolDO.getSchoolName(),teacherMapper.get(notifyCreator).getTeacherName(),format.format(new Date()),notifyDetails, "点击查看详情", "");
|
|
|
}
|
|
|
}
|
|
|
return "创建成功";
|