@@ -41,7 +41,7 @@ public class Violation {
|
||||
|
||||
@CreatedDate
|
||||
@Column(name = "created_at", updatable = false)
|
||||
private LocalDateTime createdDate;
|
||||
private LocalDateTime createdDate = LocalDateTime.now();
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "file")
|
||||
|
||||
@@ -63,9 +63,7 @@ public class ViolationHandler implements RequestHandler {
|
||||
.msgId(request.getMsgId())
|
||||
.messageBody(groupedData)
|
||||
.build();
|
||||
}
|
||||
// Пагинация
|
||||
else {
|
||||
} else {
|
||||
Page<Violation> violationPage;
|
||||
|
||||
if (startDate != null && endDate != null) {
|
||||
|
||||
@@ -96,7 +96,7 @@ public class ViolationService {
|
||||
|
||||
return violations.stream()
|
||||
.collect(Collectors.groupingBy(
|
||||
v -> extractGroupKey(v.getUrl(), groupBy),
|
||||
v -> extractGroupKey(v.getPageUrl(), groupBy),
|
||||
Collectors.counting()
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user