Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
李苗
/
Vion-DevOps
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3415e6ca
authored
Dec 12, 2024
by
HlQ
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[add] 查询项目绑定的指标列表优化查询速度
1 parent
a522eaa1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
src/main/java/vion/service/impl/monitor/EventServiceImpl.java
src/main/java/vion/service/impl/monitor/EventServiceImpl.java
View file @
3415e6c
...
...
@@ -18,6 +18,9 @@ import vion.service.monitor.IEventRecordService;
import
vion.service.monitor.IEventService
;
import
vion.vo.monitor.EventVO
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.LocalTime
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
...
...
@@ -54,6 +57,7 @@ public class EventServiceImpl extends MPJBaseServiceImpl<EventMapper, Event> imp
var
eventRecWrapper
=
Wrappers
.<
EventRecord
>
query
()
.
select
(
"DISTINCT on (mall_uid,event_type) *"
)
.
eq
(
"mall_uid"
,
dto
.
getMallUid
())
.
ge
(
"create_time"
,
LocalDateTime
.
of
(
LocalDate
.
now
(),
LocalTime
.
MIN
))
.
orderByDesc
(
"mall_uid"
,
"event_type"
,
"create_time"
);
var
eventRecordList
=
eventRecordService
.
list
(
eventRecWrapper
);
var
eventUid2SelfMap
=
eventRecordList
.
stream
().
collect
(
Collectors
.
toMap
(
EventRecord:
:
getEventUid
,
Function
.
identity
()));
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment