|
|
@@ -6096,7 +6096,16 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
|
|
|
}
|
|
|
|
|
|
// 今天在该店铺是否打过卡
|
|
|
- int today = (int) clockStoreList.stream().filter(item -> item.getCreatedTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate().equals(LocalDate.now())).count();
|
|
|
+// int today = (int) clockStoreList.stream().filter(item -> item.getCreatedTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate().equals(LocalDate.now())).count();
|
|
|
+ int today = clockStoreList.stream()
|
|
|
+ .anyMatch(item -> {
|
|
|
+ if (item.getCreatedTime() == null) return false;
|
|
|
+ Instant created = item.getCreatedTime().toInstant();
|
|
|
+ Instant now = Instant.now();
|
|
|
+ Duration diff = Duration.between(created, now);
|
|
|
+ return diff.compareTo(Duration.ofHours(24)) > 0;
|
|
|
+ })
|
|
|
+ ? 1 : 0;
|
|
|
if (today > 0) {
|
|
|
result.setClockInStoreToday(1);
|
|
|
} else {
|