notify if paper deadline in future

This commit is contained in:
Anton Romanov 2018-11-21 12:46:27 +04:00
parent 6adc96761b
commit 6314ca6ec5

View File

@ -31,7 +31,8 @@ public class PaperNotificationService {
private boolean needToSendDeadlineNotification(Paper paper, Date compareDate, boolean isDeadlineBeforeWeek) {
return (paper.getDeadlineDate() != null)
&& (compareDate.after(paper.getDeadlineDate()) && isDeadlineBeforeWeek
|| compareDate.before(paper.getDeadlineDate()) && !isDeadlineBeforeWeek);
|| compareDate.before(paper.getDeadlineDate()) && !isDeadlineBeforeWeek)
&& paper.getDeadlineDate().after(new Date());
}
private void sendMessageDeadline(Paper paper) {