Уведомление по утрам
This commit is contained in:
parent
c09d6b2bab
commit
c5144e1043
@ -24,17 +24,19 @@ public class SchedulerNotification {
|
|||||||
|
|
||||||
@Scheduled(cron = "0 9 * * MON-FRI")
|
@Scheduled(cron = "0 9 * * MON-FRI")
|
||||||
public void goodMorning() {
|
public void goodMorning() {
|
||||||
User user = userService.getByLogin("mstruchkov").get();
|
List<User> allRegister = userService.getAllRegister();
|
||||||
List<PullRequest> pullRequests = pullRequestsService.getAllByReviewerAndStatuses(
|
for (User user : allRegister) {
|
||||||
user.getLogin(),
|
List<PullRequest> pullRequests = pullRequestsService.getAllByReviewerAndStatuses(
|
||||||
ReviewerStatus.NEEDS_WORK
|
user.getLogin(),
|
||||||
);
|
ReviewerStatus.NEEDS_WORK
|
||||||
messageSendService.add(
|
);
|
||||||
MessageSend.builder()
|
messageSendService.add(
|
||||||
.telegramId(3000811L)
|
MessageSend.builder()
|
||||||
.message(Message.goodMorningStatistic(user.getFullName(), pullRequests))
|
.telegramId(3000811L)
|
||||||
.build()
|
.message(Message.goodMorningStatistic(user.getFullName(), pullRequests))
|
||||||
);
|
.build()
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user