新增23:40报数的任务
This commit is contained in:
parent
92607bcaee
commit
4bbfdb4688
@ -143,7 +143,7 @@ public class DailyReport {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 一小时发送一次
|
// 一小时发送一次
|
||||||
@Scheduled(cron = "0 0 * * * ?")
|
@Scheduled(cron = "0 0 * * * ?, 0 40 23 * * ?")
|
||||||
public void generateTeamReportTask() {
|
public void generateTeamReportTask() {
|
||||||
LocalDateTime nowDateTime = LocalDateTime.now();
|
LocalDateTime nowDateTime = LocalDateTime.now();
|
||||||
LocalDate nowDate = LocalDate.now();
|
LocalDate nowDate = LocalDate.now();
|
||||||
@ -349,7 +349,7 @@ public class DailyReport {
|
|||||||
}
|
}
|
||||||
String percent = getPercent(totalNewFirstDeposit, totalNewMember);
|
String percent = getPercent(totalNewFirstDeposit, totalNewMember);
|
||||||
synchronized (rows) {
|
synchronized (rows) {
|
||||||
rows.add(new String[] {accountResp.getPlatformName(), String.valueOf(totalNewMember), String
|
rows.add(new String[]{accountResp.getPlatformName(), String.valueOf(totalNewMember), String
|
||||||
.valueOf(totalNewFirstDeposit), percent});
|
.valueOf(totalNewFirstDeposit), percent});
|
||||||
}
|
}
|
||||||
}, asyncTaskExecutor))
|
}, asyncTaskExecutor))
|
||||||
@ -360,7 +360,7 @@ public class DailyReport {
|
|||||||
// 对 rows 列表进行排序
|
// 对 rows 列表进行排序
|
||||||
rows.sort(Comparator.comparing((String[] row) -> row[0].length()).thenComparing(row -> row[0]));
|
rows.sort(Comparator.comparing((String[] row) -> row[0].length()).thenComparing(row -> row[0]));
|
||||||
|
|
||||||
rows.add(new String[] {"总计", String.valueOf(totals[0]), String.valueOf(totals[1]),
|
rows.add(new String[]{"总计", String.valueOf(totals[0]), String.valueOf(totals[1]),
|
||||||
getPercent(totals[1], totals[0])});
|
getPercent(totals[1], totals[0])});
|
||||||
String message = TableFormatter.formatTableAsHtml(rows);
|
String message = TableFormatter.formatTableAsHtml(rows);
|
||||||
telegramMessageService.sendMessage("6013830443:AAHUOS4v6Ln19ziZkH-L28-HZQLJrGcvhto", 6054562838L, message);
|
telegramMessageService.sendMessage("6013830443:AAHUOS4v6Ln19ziZkH-L28-HZQLJrGcvhto", 6054562838L, message);
|
||||||
|
Loading…
Reference in New Issue
Block a user