|
|
@@ -171,11 +171,11 @@ public class WxNotifyServiceImpl implements WxNotifyService {
|
|
|
* @param pageIndex
|
|
|
* @param pageSize
|
|
|
*/
|
|
|
- public Map<String, Object> notifyListByTeacher(Long teacherId, Integer notifyStatus, Integer pageIndex, Integer pageSize){
|
|
|
- Map<String, Object> hashMap = new HashMap<>();
|
|
|
+ public List<NotifyDO> notifyListByTeacher(Long teacherId, Integer notifyStatus, Integer pageIndex, Integer pageSize){
|
|
|
+ //Map<String, Object> hashMap = new HashMap<>();
|
|
|
Integer pageStart = (pageIndex-1)*pageSize;
|
|
|
- List<NotifyDO> notifyDOS = notifyMapper.selectNotifyListByCreator(teacherId, notifyStatus, pageStart, pageSize);
|
|
|
- List<NotifyDO> createList = new ArrayList<>();
|
|
|
+ //List<NotifyDO> notifyDOS = notifyMapper.selectNotifyListByCreator(teacherId, notifyStatus, pageStart, pageSize);
|
|
|
+ /*List<NotifyDO> createList = new ArrayList<>();
|
|
|
if (ObjectUtils.isNotEmpty(notifyDOS)){
|
|
|
for (NotifyDO nt:notifyDOS) {
|
|
|
NotifyDO notifyDO = getNotifyDetail(0L,teacherId, nt);
|
|
|
@@ -183,7 +183,7 @@ public class WxNotifyServiceImpl implements WxNotifyService {
|
|
|
createList.add(notifyDO);
|
|
|
}
|
|
|
}
|
|
|
- hashMap.put("create",createList);
|
|
|
+ hashMap.put("create",createList);*/
|
|
|
|
|
|
List<NotifyDO> notifyList = new ArrayList<>();
|
|
|
TeacherDO teacherDO = teacherMapper.get(teacherId);
|
|
|
@@ -195,33 +195,54 @@ public class WxNotifyServiceImpl implements WxNotifyService {
|
|
|
notifyList.add(notifyDO);
|
|
|
}
|
|
|
}
|
|
|
- hashMap.put("notify",notifyList);
|
|
|
- return hashMap;
|
|
|
+ //hashMap.put("notify",notifyList);
|
|
|
+ return notifyList;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* 家长分页显示
|
|
|
- * @param personId
|
|
|
+ * @param stuId
|
|
|
* @param notifyStatus
|
|
|
* @param pageIndex
|
|
|
* @param pageSize
|
|
|
*/
|
|
|
- public List<NotifyDO> notifyList(Long personId, Integer notifyStatus, Integer pageIndex, Integer pageSize) throws Exception {
|
|
|
+ public List<NotifyDO> notifyListByStu(Long stuId, Integer notifyStatus, Integer pageIndex, Integer pageSize) {
|
|
|
Integer pageStart = (pageIndex-1)*pageSize;
|
|
|
- StudentDO studentDO = studentMapper.get(personId);
|
|
|
+ StudentDO studentDO = studentMapper.get(stuId);
|
|
|
+ List<NotifyDO> notifyList = new ArrayList<>();
|
|
|
if (ObjectUtils.isNotEmpty(studentDO)){
|
|
|
- List<NotifyDO> notifyList = new ArrayList<>();
|
|
|
List<NotifyDO> notifyDOS = notifyMapper.selectNotifyListSchoolId(studentDO.getSchoolId(), notifyStatus,
|
|
|
pageStart, pageSize);
|
|
|
for (NotifyDO nt:notifyDOS) {
|
|
|
- NotifyDO notifyDetail = getNotifyDetail(personId, 0L, nt);
|
|
|
+ NotifyDO notifyDetail = getNotifyDetail(stuId, 0L, nt);
|
|
|
notifyList.add(notifyDetail);
|
|
|
}
|
|
|
- return notifyList;
|
|
|
- }else {
|
|
|
- throw new Exception("该学生暂时不存在");
|
|
|
}
|
|
|
+ return notifyList;
|
|
|
+ }
|
|
|
|
|
|
+ /**
|
|
|
+ * 分页显示
|
|
|
+ * @param personId
|
|
|
+ * @param notifyStatus
|
|
|
+ * @param pageIndex
|
|
|
+ * @param pageSize
|
|
|
+ */
|
|
|
+ public List<NotifyDO> notifyList(Long personId, Integer notifyStatus, Integer pageIndex, Integer pageSize, Integer type) {
|
|
|
+ if (null == pageIndex) {
|
|
|
+ pageIndex = 1;
|
|
|
+ }
|
|
|
+ if (null == pageSize) {
|
|
|
+ pageIndex = 10;
|
|
|
+ }
|
|
|
+ List<NotifyDO> notifyList = null;
|
|
|
+ if (0 == type) {
|
|
|
+ notifyList = notifyListByStu(personId, notifyStatus, pageIndex, pageSize);
|
|
|
+ } else {
|
|
|
+ notifyList = notifyListByTeacher(personId, notifyStatus, pageIndex, pageSize);
|
|
|
+ }
|
|
|
+ return notifyList;
|
|
|
}
|
|
|
|
|
|
/**
|