|
|
@@ -37,6 +37,9 @@ public class WxNotifyServiceImpl implements WxNotifyService {
|
|
|
@Autowired
|
|
|
private WxParentsMapper wxParentsMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private WxParentsStuMapper wxParentsStuMapper;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 获取系统消息和使用帮助
|
|
|
@@ -103,9 +106,14 @@ public class WxNotifyServiceImpl implements WxNotifyService {
|
|
|
notifyrecordsDO.setNotifyId(notifyDO.getNotifyId());
|
|
|
notifyrecordsDO.setStuId(l);
|
|
|
notifyrecordsMapper.save(notifyrecordsDO);
|
|
|
- ParentsDO parentsDO = wxParentsMapper.get(l);
|
|
|
- SchoolDO schoolDO = wxSchoolMapper.get(parentsDO.getSchoolId());
|
|
|
- this.wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),parentsDO.getOpenid(), "h0BkcnTo24b2jsficMeVO0B17GvE-VzlPvF0fVXea4w", "您好,您有一条通知", schoolDO.getSchoolName(),teacherMapper.get(notifyCreator).getTeacherName(),format.format(new Date()),notifyDetails, "点击查看详情", "");
|
|
|
+ List<ParentsStuDO> parentsStuDOS = wxParentsStuMapper.listByStuId(l);
|
|
|
+ if (parentsStuDOS.size()>0){
|
|
|
+ for (ParentsStuDO ps:parentsStuDOS) {
|
|
|
+ ParentsDO parentsDO = wxParentsMapper.get(ps.getParentId());
|
|
|
+ SchoolDO schoolDO = wxSchoolMapper.get(parentsDO.getSchoolId());
|
|
|
+ this.wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),parentsDO.getOpenid(), "h0BkcnTo24b2jsficMeVO0B17GvE-VzlPvF0fVXea4w", "您好,您有一条通知", schoolDO.getSchoolName(),teacherMapper.get(notifyCreator).getTeacherName(),format.format(new Date()),notifyDetails, "点击查看详情", "");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return "创建成功";
|