|
@@ -89,16 +89,18 @@ public class NoticeServiceImpl implements NoticeService {
|
|
List<UserNoticeEntity> adds=new ArrayList<>();
|
|
List<UserNoticeEntity> adds=new ArrayList<>();
|
|
for(NoticeReceiverRuleEntity r:rs) {
|
|
for(NoticeReceiverRuleEntity r:rs) {
|
|
if(NoticeReceiverRuleType.ALL_STUDENTS_OF_ROOT_ORG.equals(r.getRuleType())) {
|
|
if(NoticeReceiverRuleType.ALL_STUDENTS_OF_ROOT_ORG.equals(r.getRuleType())) {
|
|
- if (userNoticeRepo.getNotice(rootOrgId, UserType.STUDENT.name(), studentId)==null) {
|
|
|
|
|
|
+ if (userNoticeRepo.getNotice(r.getNoticeId(), UserType.STUDENT.name(), studentId)==null) {
|
|
UserNoticeEntity userNotice = initUserNoticeEntity(rootOrgId, studentId, r.getNoticeId(),
|
|
UserNoticeEntity userNotice = initUserNoticeEntity(rootOrgId, studentId, r.getNoticeId(),
|
|
UserType.STUDENT);
|
|
UserType.STUDENT);
|
|
adds.add(userNotice);
|
|
adds.add(userNotice);
|
|
}
|
|
}
|
|
}else if(NoticeReceiverRuleType.STUDENTS_OF_EXAM.equals(r.getRuleType())) {
|
|
}else if(NoticeReceiverRuleType.STUDENTS_OF_EXAM.equals(r.getRuleType())) {
|
|
if(examIds.contains(Long.valueOf(r.getRuleValue()))) {
|
|
if(examIds.contains(Long.valueOf(r.getRuleValue()))) {
|
|
- UserNoticeEntity userNotice = initUserNoticeEntity(rootOrgId, studentId, r.getNoticeId(),
|
|
|
|
- UserType.STUDENT);
|
|
|
|
- adds.add(userNotice);
|
|
|
|
|
|
+ if (userNoticeRepo.getNotice(r.getNoticeId(), UserType.STUDENT.name(), studentId)==null) {
|
|
|
|
+ UserNoticeEntity userNotice = initUserNoticeEntity(rootOrgId, studentId, r.getNoticeId(),
|
|
|
|
+ UserType.STUDENT);
|
|
|
|
+ adds.add(userNotice);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|