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