Skip to content

Commit e6bdaa4

Browse files
committed
修复无法获取周日访问量问题
1 parent be3a322 commit e6bdaa4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tang-system/src/main/java/com/tang/system/service/impl/log/SysLogLoginServiceImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public List<Long> selectUserVisit() {
7272
var userId = SecurityUtils.getUser().getUserId();
7373
var now = LocalDate.now();
7474
var monday = now.with(DayOfWeek.MONDAY);
75-
var sunday = monday.plusDays(6);
75+
var nextMonday = monday.plusDays(7);
7676
var startDate = monday;
7777
var list = sysLogLoginMapper.selectUserVisit(userId, startDate);
7878
var listGrouped = list.stream()
@@ -81,7 +81,7 @@ public List<Long> selectUserVisit() {
8181
return LocalDate.of(loginTime.getYear(), loginTime.getMonth(), loginTime.getDayOfMonth());
8282
}));
8383
var userVisitList = new ArrayList<Long>();
84-
while (startDate.isBefore(sunday)) {
84+
while (startDate.isBefore(nextMonday)) {
8585
var count = listGrouped.get(startDate);
8686
if (count != null) {
8787
userVisitList.add(count.stream().count());

0 commit comments

Comments
 (0)