From b802600ee7fccf92fe94714b5e38042f975d4159 Mon Sep 17 00:00:00 2001 From: upagge Date: Tue, 3 Mar 2020 09:11:40 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BE=D0=BF=D0=B5=D1=87=D0=B0=D1=82?= =?UTF-8?q?=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tsc/bitbucketbot/scheduler/SchedulerNotification.java | 4 ++-- src/main/java/com/tsc/bitbucketbot/utils/Message.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/tsc/bitbucketbot/scheduler/SchedulerNotification.java b/src/main/java/com/tsc/bitbucketbot/scheduler/SchedulerNotification.java index 7206fa2..bbfa82a 100644 --- a/src/main/java/com/tsc/bitbucketbot/scheduler/SchedulerNotification.java +++ b/src/main/java/com/tsc/bitbucketbot/scheduler/SchedulerNotification.java @@ -22,7 +22,7 @@ public class SchedulerNotification { private final PullRequestsService pullRequestsService; private final MessageSendService messageSendService; - @Scheduled(cron = "0 9 * * 1-5") + @Scheduled(cron = "0 30 8 * * MON-FRI") public void goodMorning() { List allRegister = userService.getAllRegister(); for (User user : allRegister) { @@ -32,7 +32,7 @@ public class SchedulerNotification { ); messageSendService.add( MessageSend.builder() - .telegramId(3000811L) + .telegramId(user.getTelegramId()) .message(Message.goodMorningStatistic(user.getFullName(), pullRequests)) .build() ); diff --git a/src/main/java/com/tsc/bitbucketbot/utils/Message.java b/src/main/java/com/tsc/bitbucketbot/utils/Message.java index d6ccff1..b8975ed 100644 --- a/src/main/java/com/tsc/bitbucketbot/utils/Message.java +++ b/src/main/java/com/tsc/bitbucketbot/utils/Message.java @@ -108,7 +108,7 @@ public class Message { StringBuilder message = new StringBuilder(SMILE_SUN).append(" Доброе утро, ").append(userName).append("!") .append(HR); if (!pullRequests.isEmpty()) { - message.append("Сегодня тебя ждет процерка целых ").append(pullRequests.size()).append(" ПР!").append(TWO_BREAK) + message.append("Сегодня тебя ждет проверка целых ").append(pullRequests.size()).append(" ПР!").append(TWO_BREAK) .append("Позволь представить, горячая десятка:").append(BREAK); pullRequests.stream() .sorted(new UpdateDataComparator()) @@ -116,12 +116,12 @@ public class Message { .forEach(pullRequest -> message.append(SMILE_PIN) .append("[").append(pullRequest.getName()).append("](").append(pullRequest.getUrl()).append(")").append(BREAK)); } else { - message.append("Ты либо самый лучший рабоник, либо тебе не доверяют проверку ПР :D").append(BREAK) + message.append("Ты либо самый лучший работник, либо тебе не доверяют проверку ПР :D").append(BREAK) .append("Поздравляю, у тебя ни одного ПР на проверку!").append(BREAK); } return message .append(BREAK) - .append("Удачной работы сегодня!") + .append("Удачной работы!") .toString(); }