|
|
@@ -45,6 +45,9 @@ public class WxTaskNotifyServiceImpl implements WxTaskNotifyService {
|
|
|
@Autowired
|
|
|
private WxParentsStuMapper wxParentsStuMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private WxSubjectMapper wxSubjectMapper;
|
|
|
+
|
|
|
/**
|
|
|
* 发布作业
|
|
|
* @param taskString
|
|
|
@@ -61,7 +64,8 @@ public class WxTaskNotifyServiceImpl implements WxTaskNotifyService {
|
|
|
taskNotifyDO.setTaskCreator(taskCreator);
|
|
|
Long schoolId = teacherMapper.get(taskCreator).getSchoolId();
|
|
|
taskNotifyDO.setSchoolId(schoolId);
|
|
|
- taskNotifyDO.setSubjectId(json.getLong("subjectId"));
|
|
|
+ Long subjectId = json.getLong("subjectId");
|
|
|
+ taskNotifyDO.setSubjectId(subjectId);
|
|
|
taskNotifyDO.setTaskFiles(json.getString("taskFiles"));
|
|
|
taskNotifyDO.setTaskStatus(json.getInteger("taskStatus"));
|
|
|
taskNotifyDO.setCreateDate(new Date());
|
|
|
@@ -82,7 +86,7 @@ public class WxTaskNotifyServiceImpl implements WxTaskNotifyService {
|
|
|
if (parentsStuDOS.size()>0){
|
|
|
for (ParentsStuDO ps:parentsStuDOS) {
|
|
|
ParentsDO parentsDO = parentsMapper.get(ps.getParentId());
|
|
|
- wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),parentsDO.getOpenid(), "WwKtiHd4lso9axuavfLdpHIVbzTiopOTyh_uCsL3ZI8",taskTitle,"-",format.format(new Date()), taskContext,"-", "点击查看详情", "");
|
|
|
+ wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),parentsDO.getOpenid(), "WwKtiHd4lso9axuavfLdpHIVbzTiopOTyh_uCsL3ZI8",taskTitle,wxSubjectMapper.get(subjectId).getSubjectName(),format.format(new Date()), taskContext,"-", "点击查看详情", "");
|
|
|
}
|
|
|
}
|
|
|
}
|